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

start: Comma-delimited --addons silently ignored #9319

Closed
tstromberg opened this issue Sep 24, 2020 · 4 comments · Fixed by #9957
Closed

start: Comma-delimited --addons silently ignored #9319

tstromberg opened this issue Sep 24, 2020 · 4 comments · Fixed by #9957
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@tstromberg
Copy link
Contributor

Oddly, our --addons flag does not allow comma-delimited addons. Worse, it completely ignores your choice rather than returning an error:

 ./out/minikube start --addons=dashboard,efk,freshpod,istio,istio-provisioner,olm --memory=16384 --driver=hyperkit                    5.3s  Thu Sep 24 12:12:02 2020
😄  minikube v1.13.1 on Darwin 10.15.6
✨  Using the hyperkit driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🔥  Creating hyperkit VM (CPUs=2, Memory=16384MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.19.2 on Docker 19.03.12 ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner

❗  /usr/local/bin/kubectl is version 1.16.6-beta.0, which may have incompatibilites with Kubernetes 1.19.2.
💡  Want kubectl v1.19.2? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" by default
@tstromberg tstromberg added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. labels Sep 28, 2020
@tstromberg tstromberg self-assigned this Sep 28, 2020
@tstromberg
Copy link
Contributor Author

tstromberg commented Sep 28, 2020

It may be possible to fix this by switching this line in cmd/minikube/cmd/start_flags.go to use a Slice instead of an Array, but I suspect there are devils in the implementation details:

startCmd.Flags().StringArrayVar(&config.AddonList, "addons", nil, "Enable addons. see minikube addons list for a list of valid addon names.")

Someone will also need to make sure that the existing usage is preserved though (multiple --addon flags), and that it errors out if an unknown addon is supplied. Help wanted!

@marcosinger
Copy link

@tstromberg I'm a newcomer here and I'd like to help with this one. I have some comments/questions before start:

to use a Slice instead of an Array, but I suspect there are devils in the implementation details

Accordingly to the docs, StringSliceVar might fix this issue without any drawbacks.

and that it errors out if an unknown addon is supplied

As far as I can see, both addon.Set and addon.RunCalbbacks functions handle with invalid addon name, but the command entry-point is addon.Start, which is filtering from invalid names. Do you think worth removing that check to keep the same behavior across commands?

WDYT?

Thanks!

@tstromberg
Copy link
Contributor Author

@marcosinger - good find. I think you are on the right track. We aim to follow the principle of least surprise, so keeping the same behavior sounds correct. I agree that removing that filter would help.

One concern is that we should probably detect that the addons are invalid as soon as possible - certainly before starting the cluster, otherwise we may be wasting the users time.

@medyagh medyagh added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Sep 29, 2020
@tstromberg tstromberg added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Dec 11, 2020
@Aut0R3V
Copy link
Contributor

Aut0R3V commented Dec 14, 2020

@tstromberg I'd like to work on this.
/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants