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

Make localkube flag passing more robust #512

Closed
dlorenc opened this issue Aug 23, 2016 · 3 comments
Closed

Make localkube flag passing more robust #512

dlorenc opened this issue Aug 23, 2016 · 3 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@dlorenc
Copy link
Contributor

dlorenc commented Aug 23, 2016

Right now minikube passes a set of flags to localkube via ssh at startup time. This works, but is problematic as we try to let minikube support multiple versions of localkube, and change the flags localkube takes over time. See #511 for one example of adding a flag.

Here are some ideas:

Add a localkube command (or just parse the help text) to output what flags it takes.

Then minikube could first call that command, compare the list of valid flags with the list of flags the user wants to pass, and warn/error appropriately.

Move flag passing to a config file

Then locallkube could only use the flags it knows about, and log a warning about ignored flags. This would be harder to get the warning back to the user automatically, but would avoid errors in the case of extra flags.

Any other ideas? Depending on what we do here, we might need to go back and re-release the last several localkube builds.

cc @aaron-prindle @r2d4

@dlorenc
Copy link
Contributor Author

dlorenc commented Aug 25, 2016

We could also consider reflection, to support dynamically configuring flags. Something like a config file to minikube with options like:

kubernetesOptions:
  controllerManagerOptions:
    VolumeConfiguration.EnableHostPathProvisioning=true

would turn into setting:
config.VolumeConfiguration.EnableHostPathProvisioning = true in https://github.com/kubernetes/minikube/blob/master/pkg/localkube/controller-manager.go.

@dlorenc dlorenc added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 25, 2016
@dlorenc dlorenc self-assigned this Aug 25, 2016
@dlorenc
Copy link
Contributor Author

dlorenc commented Aug 26, 2016

Rough reflection prototype here: https://play.golang.org/p/7IJfIz8AuP

It can set strings and ints on nested structs.

@aaron-prindle
Copy link
Contributor

I believe this was fixed with #529. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants