-
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
Add addons flag to 'minikube start' in order to enable specified addons #5543
Add addons flag to 'minikube start' in order to enable specified addons #5543
Conversation
Welcome @govargo! |
Hi @govargo. 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/test-infra repository. |
Can one of the admins verify this patch? |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: govargo The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/remove-kind bug |
/assign @RA489 /cc @tstromberg |
cmd/minikube/cmd/start.go
Outdated
@@ -162,6 +164,7 @@ func initMinikubeFlags() { | |||
startCmd.Flags().String(containerRuntime, "docker", "The container runtime to be used (docker, crio, containerd).") | |||
startCmd.Flags().Bool(createMount, false, "This will start the mount daemon and automatically mount files into minikube.") | |||
startCmd.Flags().String(mountString, constants.DefaultMountDir+":/minikube-host", "The argument to pass the minikube mount command on start.") | |||
startCmd.Flags().StringArrayVar(&addonList, addons, nil, "Enable addons. see addon list if you want to check them `minikube addons list`") |
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.
remove repetitive addon list.
also please provide before after output in the PR description.
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.
@medyagh Thank you for review!
I removed repetitive addon list.
Before
"Enable addons. see addon list if you want to check them `minikube addons list`"
After
"Enable addons. see `minikube addons list` if you want to check"
And I edited the PR description(user-facing change and Additional documentation).
Should I also include this above change in the PR description?
If I misunderstand your intention, please let me know.
Thank you for this PR ! this will provide a better user experience. I added some minor knits but overall looks good. |
@minikube-bot OK to test! |
Also please check if there is a place in website we could inform the users of this new flag |
Codecov Report
@@ Coverage Diff @@
## master #5543 +/- ##
==========================================
- Coverage 36.86% 36.85% -0.02%
==========================================
Files 102 102
Lines 7349 7354 +5
==========================================
+ Hits 2709 2710 +1
- Misses 4289 4293 +4
Partials 351 351
|
Sorry, I didn't prepare for documents. |
@govargo thank you for following up and fixing, I commented again just couple more improvements and then we could merge this after those requested changes are done |
@medyagh Thank you for your reply. (I rebased my branch and force-pushed, so comments may be lost...) |
cmd/minikube/cmd/start.go
Outdated
@@ -342,6 +345,15 @@ func runStart(cmd *cobra.Command, args []string) { | |||
// pull images or restart cluster | |||
bootstrapCluster(bs, cr, mRunner, config.KubernetesConfig, preExists, isUpgrade) | |||
configureMounts() | |||
|
|||
// enable addons with start command | |||
for _, addonName := range addonList { |
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.
addonName
is a shortlived variable, so it doesn't need to be that long. how about a
as a name?
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.
@sharifelgamal Thank you for your review! I understood It's Golang way.
I modified as you mentioned.
@@ -16,6 +16,7 @@ minikube start [flags] | |||
### Options | |||
|
|||
``` | |||
--addons Enable addons. see `minikube addons list` if you want to check |
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.
Let's change this description to "Enables addons. See minikube addons list
for a list of valid addon names."
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.
Thanks to you, the help message became easier to understand!
I changed it as you mentioned.
I modified a shortlived variable and the |
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.
Thanks for addressing the comments on the review !
What type of PR is this?
/kind feature
What this PR does / why we need it:
So far we have to use the
minikube addons enable
command to enable the addons.Now, this PR enables us to use addons with
minikube start --addons
command flag withoutminikube addons enable
.Which issue(s) this PR fixes:
Fixes #5503
Does this PR introduce a user-facing change?
Yes. this PR add flag option to
minikube start
command .Before this PR, addons flow to enable is following
After this PR, addons flow to enable is following
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: