-
Notifications
You must be signed in to change notification settings - Fork 40k
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 dockercfg secret command #7975
Conversation
80c9159
to
b0ce650
Compare
We'll want commands to generate secrets for kubernetes auth and arbitrary user secrets (e.g., SSL keys). What would you expect those commands to look like? cc @jlowdermilk |
@bgrant0607, I think kubernetes auth/user secrets should just contain a kubeconfig serialization. We already support loading kubeconfig from arbitrary |
I think @bgrant0607 was suggesting that we will need something like |
I don't know if all secret types are worthy of having their own commands. If the files that are used to store them are tight (only contain the relevant information) and well understood (ssl keys), then the basic
I see these:
|
b0ce650
to
a8daaff
Compare
Everywhere else, we use -f for the file, though everywhere else, the files contain API resources. This is essentially a config generator. It should be versioned. Did you consider using generator.go? |
a8daaff
to
a681b43
Compare
I'm not familiar with that file.
Maybe this one instead: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/api/generate.go? I'm against generating a name for an object that will later be referenced. Secrets aren't cattle, they're pets. You care about exactly which one you're using and you need to be able to reference that particular one to get the behavior you want. |
Just so I'm sure I understand correctly, you'd like me to use the external type package to build up the secret? |
@deads2k see: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/kubectl/generate.go @bgrant0607 is saying that the generation itself needs to be versioned. Otherwise people will take a dependency on your implementation of generating the secret, and you will break them if you change that implementation. See https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/kubectl/service.go for a concrete example. |
Our other generators, run-container (which we plan to rename to just run) and expose, are just verbs. I'll ponder alternative syntax. |
With respect to generate.go (sorry about the misspelling) and generator versioning: Specifically, for our internal package manager, our generator became virtually unchangeable due to the massive number of dependencies on its precise behavior. We had to spawn new "versions" (with new names) in order to change it. I could imagine something like If you didn't want to bite off the more generic mechanism (though it doesn't sound too hard), something like It needs to be possible to invoke the library directly rather than execute the kubectl command (#7311). Also, we'll want to be able to invoke this mechanism declaratively. I'm fine with starting with an imperative command, but imagine doing |
I guess |
Another generator example: |
changed. |
I left a few comments on the last commit-- nothing too major. |
I'm not able to devote the time this deserves, so I'm closing. I'll take these comments into account when I have time to submit it again. |
Part 4 of #7894.
This adds a command to easily create dockercfg secrets. This builds upon #7966.
@brendandburns ptal.