8000 Add addons flag to 'minikube start' in order to enable specified addons by govargo · Pull Request #5543 · kubernetes/minikube · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
medyagh merged 4 commits into
kubernetes:masterfrom
govargo:feature/start-with-addons-flag
Oct 10, 2019
Merged

medyagh merged 4 commits into
kubernetes:masterfrom
govargo:feature/start-with-addons-flag

Conversation

@govargo
@govargo govargo commented Oct 4, 2019 •
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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.

Details

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
Copy Markdown
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
Copy Markdown
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.

Details 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
govargo commented Oct 4, 2019
Copy link
Copy Markdown
Contributor Author

/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
govargo commented Oct 4, 2019
Copy link
Copy Markdown
Contributor Author

/assign @RA489

/cc @tstromberg

Comment thread cmd/minikube/cmd/start.go Outdated
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
Copy Markdown
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
Copy Markdown
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
medyagh commented Oct 4, 2019
Copy link
Copy Markdown
Member

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

@medyagh
medyagh commented Oct 4, 2019
Copy link
Copy Markdown
Member

@minikube-bot OK to test!

@medyagh
medyagh commented Oct 5, 2019
Copy link
Copy Markdown
Member

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
codecov-io commented Oct 6, 2019 •
Copy link
Copy Markdown

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
govargo commented Oct 6, 2019
Copy link
Copy Markdown
Contributor Author

@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
medyagh commented Oct 8, 2019
Copy link
Copy Markdown
Member

@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
govargo commented Oct 8, 2019 •
Copy link
Copy Markdown
Contributor Author

@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...)

Comment thread cmd/minikube/cmd/start.go Outdated
8BD0
configureMounts()

// enable addons with start command
for _, addonName := range addonList {
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

### Options

```
--addons Enable addons. see `minikube addons list` if you want to check
Copy link
Copy Markdown
Contributor

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

@govargo govargo Oct 10, 2019 •
Copy link
Copy Markdown
Contributor Author

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
govargo commented Oct 10, 2019
Copy link
Copy Markdown
Contributor Author

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

@medyagh medyagh left a comment
Copy link
Copy Markdown
Member

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 !

Comment thread cmd/minikube/cmd/start.go Resolved
Comment thread cmd/minikube/cmd/start.go Resolved
Comment thread site/content/en/docs/Tasks/addons.md 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

0