Skip to content
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

Merged
merged 4 commits into from
Oct 10, 2019
Merged

Add addons flag to 'minikube start' in order to enable specified addons #5543

merged 4 commits into from
Oct 10, 2019

Conversation

govargo
Copy link
Contributor

@govargo govargo commented Oct 4, 2019

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 without minikube 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

1. Search the available addons
minikube addons list

2. Enable addons
minikube addons enable <name>

3. Start minikube
minikube start

After this PR, addons flow to enable is following

1. Search the available addons
minikube addons list

2. Start minikube with available addons
minikube addons --addons <name1> --addons <name2> --addons <nameN>

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot
Copy link
Contributor

Welcome @govargo!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 4, 2019
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 4, 2019
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 4, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: govargo
To complete the pull request process, please assign ra489
You can assign the PR to them by writing /assign @ra489 in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@govargo
Copy link
Contributor Author

govargo commented Oct 4, 2019

/remove-kind bug

@k8s-ci-robot k8s-ci-robot removed the kind/bug Categorizes issue or PR as related to a bug. label Oct 4, 2019
@govargo
Copy link
Contributor Author

govargo commented Oct 4, 2019

/assign @RA489

/cc @tstromberg

@@ -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`")
Copy link
Member

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.

Copy link
Contributor Author

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.

@medyagh
Copy link
Member

medyagh commented Oct 4, 2019

Thank you for this PR ! this will provide a better user experience. I added some minor knits but overall looks good.

@medyagh
Copy link
Member

medyagh commented Oct 4, 2019

@minikube-bot OK to test!

@medyagh
Copy link
Member

medyagh commented Oct 5, 2019

Also please check if there is a place in website we could inform the users of this new flag

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 6, 2019
@codecov-io
Copy link

codecov-io commented Oct 6, 2019

Codecov Report

Merging #5543 into master will decrease coverage by 0.01%.
The diff coverage is 20%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
cmd/minikube/cmd/start.go 22.63% <20%> (-0.03%) ⬇️

@govargo
Copy link
Contributor Author

govargo commented Oct 6, 2019

@medyagh

Also please check if there is a place in website we could inform the users of this new flag

Sorry, I didn't prepare for documents.
So, I added the new --addons flag to documentaion in new additional commits.
・site/content/en/docs/Reference/Commands/start.md
・site/content/en/docs/Reference/Commands/addons.md
・site/content/en/docs/Tasks/addons.md

@medyagh
Copy link
Member

medyagh commented Oct 8, 2019

@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

@govargo
Copy link
Contributor Author

govargo commented Oct 8, 2019

@medyagh Thank you for your reply.
But I'm sorry I cannot find your additional improvements comment anywhere...
Could you tell me what it is?

(I rebased my branch and force-pushed, so comments may be lost...)

@@ -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 {
Copy link
Collaborator

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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."

Copy link
Contributor Author

@govargo govargo Oct 10, 2019

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.

@govargo
Copy link
Contributor Author

govargo commented Oct 10, 2019

I modified a shortlived variable and the --addons help message.
Thank you for review @sharifelgamal!

Copy link
Member

@medyagh medyagh left a 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 !

cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
site/content/en/docs/Reference/Commands/start.md Outdated Show resolved Hide resolved
site/content/en/docs/Tasks/addons.md Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --addons flag to minikube start
7 participants