-
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
Easy all-in-one launch command (was Run configuration generator) #1695
Comments
I have not digested all your ideas today, but here's my one requirement: I On Thu, Oct 9, 2014 at 2:40 PM, bgrant0607 notifications@github.com wrote:
|
Well, even without run, 2 commands is sufficient. That could easily be scripted or wrapped with a library, if it's even worth it. |
I am fine with 2 commands. what I don't want is
On Thu, Oct 9, 2014 at 10:16 PM, bgrant0607 notifications@github.com
|
With the above proposal, a human would have to write at most 1 file, and not any file if we provided a way to generate the json. The number of commands required would depend on the amount of tooling/scripting we provided. That said, a library of test utility/helper functions would be useful, and something like Run could go in such a library. It could also be implemented as a contrib script. Run is not a primitive. |
ACK that run is not a primitive, but we should make useful tools that cover On Thu, Oct 9, 2014 at 11:14 PM, bgrant0607 notifications@github.com
|
For further inspiration, a comparison with Fig: https://gist.github.com/proppy/8e714bf41b6b0978ab0e#fig2kube I'm happy for kubectl to be able to invoke this directly (ideally as some kind of plugin, at least eventually), though it should also be possible to just dump the generated configs, as discussed in #1905. |
I like the idea of pluggable transformation steps at some point - an example I was talking about today with someone was taking a pod generated by Podex and then transforming that into an openshift deployment config and image repository (find the docker repository the pod names, import it into openshift, then turn the pod template / replication controller into a deployment config and point to the image repository). Encouraging multiple step transformation / generation via plugins or other community ecosystem tools seems extremely positive, but it does potentially lead to more support issues. |
@smarterclayton Let's discuss pluggability/composability in #1905. |
Initial concrete proposal (feel free to bikeshed on the name, though I'm assuming we rename service to something more appropriate):
If/when we add additional fields to replicationController, as discussed in #3058, they should be bundled into a struct that can be inlined here (except selector, which would collide with the selector from ServiceSpec, though maybe the service reorg discussed in #2585 will also make that easy to avoid). With aggressive defaulting, propagation of common metadata, and support for json on the command line as suggested in #3233, this could enable fairly simple configurations while including much of the power of the API in a maintainable way. For example:
The command-line arguments could be mapped to the generator schema in a generic way. Yes, the containers list is a little ugly, but having dealt with a system where I had to learn different syntaxes and schemas and default behaviors for multiple configuration DSLs and CLIs, as well as the API, I'd much prefer to just learn essentially one schema for object details. We could also add an optional I could also imagine an all-in-one API synthetic "macro" control resource that would perform this expansion, rather than doing it on the client side, but we may not want to bite that off yet. After deploying the microservice, if a user wanted to add another replicationController, such as for a canary, it should be straightforward, with the newly proposed kubectl commands, to add labels to the existing pods and replication controller, and then create the new one under the same service. They'd then use the label-selector-based multi-object kubectl commands to manage the whole constellation of objects. |
With some reflection, I think the following could be made to work, without adding an image field:
I'd be ok if the initial implementation weren't fully generic, but I don't want to start with CLI syntax that isn't extensible to the full realization. |
Initial version of run-container is in. There are various improvements we could make (e.g., integrating podex, multi-container pods), but let's capture those in other issues and in cli-roadmap.md. |
The
run
operation has not yet been implemented in the new kubectl command, for reasons discussed in #1325 and #2144. The high-level goal is to be able to make simple use cases simple and concise, while not creating a dead-end usage path that can't extend to more complex use cases or isn't composable with our other config/deployment/CLI tooling. For example, supporting or mimicking the (current) docker command line isn't a viable solution.Requirements for a replacement:
Not all of this needs to be supported out the gate, but whatever we build needs to be a compatible subset. For instance, we should decide whether command-line argument order should matter, how to specify schema fields on the command line, what flags we should use for a dry run (generation only), etc.
/cc @smarterclayton @ghodss @brendandburns @jlowdermilk @kmerker
The text was updated successfully, but these errors were encountered: