-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve validation for extra-config. #10886
Merged
medyagh
merged 9 commits into
kubernetes:master
from
vishjain:user/vishjain/extra-config
Apr 1, 2021
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c402edd
Added error for quotation.
vishjain e916793
Add check for opening and closing quote.
vishjain e1f9fb1
Check suffix ends with quotation.
vishjain 28f2697
Fixed end quote.
vishjain 198fa8d
Improve error message.
vishjain b565130
Added unit test.
vishjain bdd4aa1
Added comment.
vishjain 21477e3
Ran make lint
vishjain f125300
Reset test.
vishjain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you verify if this is actually true ? Could it be it hangs only if the there is One Qutation without closing ?
Do u mind posting the output of minikube fore and after this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake: There is only hanging currently if at the end there is a quotation mark:
minikube vishal$ ./out/minikube start --driver=docker --extra-config=etcd.client-cert-auth=false“
😄 minikube v1.18.1 on Darwin 10.14.6
✨ Using the docker driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🏃 Updating the running docker "minikube" container ...
🐳 Preparing Kubernetes v1.20.2 on Docker 20.10.3 ...
▪ etcd.client-cert-auth=false“
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already an error that shows up when there is a quote at the beginning too:
./out/minikube start --driver=docker --extra-config=“etcd.client-cert-auth=false”
😄 minikube v1.18.1 on Darwin 10.14.6
✨ Using the docker driver based on existing profile
❗ These --extra-config parameters are invalid: [“etcd]
❌ Exiting due to MK_USAGE: Valid components are: [apiserver controller-manager scheduler etcd kubeadm kubelet kube-proxy]
So we need to just check the end of the string for a quote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./out/minikube start --driver=docker --extra-config=“etcd.client-cert-auth=false
😄 minikube v1.18.1 on Darwin 10.14.6
✨ Using the docker driver based on existing profile
❗ These --extra-config parameters are invalid: [“etcd]
❌ Exiting due to MK_USAGE: Valid components are: [apiserver controller-manager scheduler etcd kubeadm kubelet kube-proxy]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have preserved the initial errors and also added the error when there's a suffix quote at the end:
./out/minikube start --driver=docker --extra-config=etcd.client-cert-auth=false”
Error: invalid argument "etcd.client-cert-auth=false”" for "--extra-config" flag: invalid value: cannot contain end quotation: "etcd.client-cert-auth=false”"