-
Notifications
You must be signed in to change notification settings - Fork 5k
New flag to allow option for passing a config file for addon configure command. #20255
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
Conversation
instead of forcing prompts Fixes kubernetes#20124
Hi @panyam. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
Can one of the admins verify this patch? |
This comment has been minimized.
This comment has been minimized.
…ance to interfere with other possible user defaults
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
this PR is exciting and its getting closer ! just a few more changes
cmd/minikube/cmd/config/configure.go
Outdated
fmt.Sprintf("error opening config file: %v", err)) | ||
return nil, err | ||
} else if err = json.Unmarshal(confData, &configFileData); err != nil { | ||
exit.Message(reason.Kind{ExitCode: reason.ExProgramConfig, Advice: "provide a valid config file"}, |
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.
"ensure the json format of the config file is valid"
cmd/minikube/cmd/config/configure.go
Outdated
return nil, err | ||
} else if err = json.Unmarshal(confData, &configFileData); err != nil { | ||
exit.Message(reason.Kind{ExitCode: reason.ExProgramConfig, Advice: "provide a valid config file"}, | ||
fmt.Sprintf("error opening config file: %v", err)) |
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.
error wrap
errors.Wrapf(err, "addon config %s" ... )
cmd/minikube/cmd/config/configure.go
Outdated
} else if err = json.Unmarshal(confData, &configFileData); err != nil { | ||
exit.Message(reason.Kind{ExitCode: reason.ExProgramConfig, Advice: "provide a valid config file"}, | ||
fmt.Sprintf("error opening config file: %v", err)) | ||
return nil, err |
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.
if exit no need to return
cmd/minikube/cmd/config/configure.go
Outdated
return nil, err | ||
} | ||
|
||
// Make sure the addon specific config exists and it is a map |
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.
make a helper function and put the nested ifs in there
@@ -304,6 +305,64 @@ func validateIngressAddon(ctx context.Context, t *testing.T, profile string) { | |||
} | |||
} | |||
|
|||
// validateRegistryCredsAddon tests the registry-creds addon by trying to load its configs | |||
func validateRegistryCredsAddon(ctx context.Context, t *testing.T, profile string) { |
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.
lets use a struct for the regsitry cred addons so it can be typed checked
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/ok-to-test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/lgtm |
@@ -0,0 +1,257 @@ | |||
package config |
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.
this new files needs copyright boiler plate to be added to the header
Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages. The list of commits with invalid commit messages:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
kvm2 driver with docker runtime
Times for minikube start: 51.6s 52.0s 50.2s 51.9s 52.2s Times for minikube (PR 20255) ingress: 19.1s 19.1s 19.0s 19.1s 19.0s docker driver with docker runtime
Times for minikube ingress: 13.3s 13.4s 12.3s 13.3s 12.3s Times for minikube start: 26.2s 22.2s 26.9s 25.6s 23.2s docker driver with containerd runtime
Times for minikube ingress: 26.8s 38.8s 22.8s 38.8s 22.8s Times for minikube start: 22.2s 23.1s 22.4s 24.4s 22.3s |
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh, panyam The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Minor UI Change (Before and After described in the ticket) but tl;dr:
BEFORE
Currently when configuring addons with the command:
eg:
The user is prompted to input the values one by one, eg:
and so on. This makes it hard to store/load values in a scripted environemnt. Some times it easier to provide a config file containing so that the values can be read from this.
AFTER
Add a "-f" local flag to the addon configure command, eg:
etc
Fixes #20124