You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
proposal: Add --kind, --node-selectors, --set flags to support Helm init --net-host #2299
Helm init --net-host sets Tiller to be installed with HostNetwork enabled which facilitates loading a CNI overlay (like flannel) but operator cannot control where the pod is scheduled. There is also an issue with Kubernetes 1.6 where Deployments will not load CNI at that early stage but Daemonsets will correctly load CNI.
New Flags
We propose adding the following flags to helm init
--node-selectors
Specifies which labels are required on a node for Tiller to be scheduled on it. A node must posses all of the specified labels to be acceptable for Tiller.
# a single label
helm init --node-selectors="app=helm"
# specifying multiple labels (all are required)
helm init --node-selectors="app=helm,type=label1,other=label2"
--set
Specifies additional keys and values to be set in the Tiller template.
Dumps the Tiller resource to stdout instead of installing it and does not install the client. Can be used with --set to modify the manifest on the fly and save it to file (e.g. manifests directory).
Nice to Have Flags (Deferred)
The following flags would be nice to have to enable the currently blocked CNI installation (need --kind=daemonset) and allow user to set node-selector labels conveniently.
--kind
Specifies which type of of object Tiller should be instantiated as: deployment, daemonset
# set to daemonset. --node-selectors flag is required for daemonset
helm init --kind=daemonset --node-selectors="app=helm"
# default
helm init --kind=deployment
Notes
To land Tiller on the master node, the master will need to have the NoSchedule taint removed.
At this point I wonder if it's just better to send a formatted spec template as input to helm init, or else we're going to be writing out the entire Deployment spec as feature flags to deploy tiller.
yeah, I wondered about that myself. the benefit is it would be infinitely configurable. though that can be done today by just uploading a yaml manually and skipping helm init all together. The drawback is that it would require more then grabbing a helm binary to get going. It would be really nice to do something like:
kubeadm init;
helm init --daemonset;
helm install stable/flannel (or other sdn of choice);
helm install kube-advanced #installs kube-dns, kube-proxy, kube-dashboard, etc
Then almost everything is easily upgradable/managed via helm.
Just a though but could use --set and be smart about setting tolerations and labels in YAML path dot notation. Keep --daemonset and add --file for everything else.
in theory you wouldn't need daemonset nor net-host then too. you could do everything through --set or --values with a values file to merge on top of the template.
It, would be infinitely flexible, but not simple to use from the above example?
Seems using --set for damonset would be possible but difficult as it changes the object type.
--values gets into templating which I guess we could explore but seems like overkill (correct me if im wrong).
Last example seems like nice balance of hitting the 80% easily but having complete control also using --file (and --set i guess)
for the 90% case of this use case, at least on 1.6, you would need
net=host, a nodeSelector to limit it to one node, and kind=daemonset.
It would be nice to limit the length of string needed to enable the use case.
remembering to do:
helm init --net-host --daemonset --set spec.template.nodeSelector=app=helm is rather verbose.
also, specifically --node-selector is very useful outside of this use case in a regular 'helm init' case when you have a hybrid cluster. none of my k8s systems have just one node type and helm really should be pinned to only controllers. So, I kind of think it shoudl get its own flag?
changed the title [-]proposal: Add --daemonset, --node-selectors, --tolerations flags to support Helm init --net-host[/-][+]proposal: Add --kind, --node-selectors, --set flags to support Helm init --net-host[/+]on Apr 20, 2017
I've been using a --kind=pod like config for a while now, and its extremely handy to launch helm before you have a fully working k8s. I'm guessing it will become more common for others to attempt it in time.
If I could get my top wishlist though, I think it would be in this order I think:
-o json (or something similar. Give me the raw object that will be loaded instead of doing it. I can more easily manipulate it with jq to do stuff to it before loading. This prevents having to upload a broken tiller config, then edit it.)
--node-selector (Not a single cluster I've deployed was homogenious. Landing it into a pool I need it to go is critical)
--kind DaemonSet (Allows for sdn helm packages to start getting written. That will take time, so the earlier the better) This also needs --net-host to function
--kind static-pod (This, implies --net-host and -o json, should allow helm to be easily launched and used to manage all the k8s services in a boot2kube like environment. helm init --kind=pod > /etc/kubermentes/manifest; You then can have a helm managed kube-apiserver, kube-proxy, sdn plugin, kube-dashboard/kube-dns, etc)
--set. Sets cool, but syntactic suger for option number 1.
I'm thinking all of this stuff shouldn't be much of a burden on the helm devs long term? I think once its implemented it should be pretty static in the future. number one and number five will allow great flexibility for edge case handling I think?
I agree with @kfox1111 on this one, but also think --file should be an option. With an --output option and --file, it gives you the flexibility to set up things as you'd like to or to just provide a file.
For the first pass, I would think the output, node-selector, and file options would be good in one PR and then we can break out the others into their own features. That sound good @technosophos and @jascott1? I would love to see this move forward
@kfox1111 I was just talking about the --file flag mentioned earlier. Basically so you can output a tiller manifest using -o json and then modify it to your liking and provide it to helm init using --file. But I guess you could also just use kubectl create with the manifest, so maybe it isn't actually worth it to have a --file flag.
tl;dr: Never mind, forget I said anything about the --file flag.
Also, when you said "I think we should be able to get a version of this up and running pretty quickly," did you mean you are already working on it?
I would like to add a special note about Tolerations. I want to use nodeSelector in conjunction with Toleration since I have a taint on the node I want to deploy Tiller on.
I just look at the PR and it seems that the --set option might allow us to set Tolerations. Any specific reasons why the NodeSelector parameter as its own option VS using the --set option? Maybe I'm missing something with regards to the --set option...
@djsly You can use --set for nodeSelectors but --node-selectors is commonly needed to control where Tiller lands so its included as a flag for convenience. We are currently hard-coding a linux nodeSelector (that can be overridden) but this PR will remove that and allow users that still need it to specify with --node-selectors easily.
Activity
bacongobbler commentedon Apr 19, 2017
At this point I wonder if it's just better to send a formatted spec template as input to
helm init, or else we're going to be writing out the entire Deployment spec as feature flags to deploy tiller.kfox1111 commentedon Apr 19, 2017
yeah, I wondered about that myself. the benefit is it would be infinitely configurable. though that can be done today by just uploading a yaml manually and skipping helm init all together. The drawback is that it would require more then grabbing a helm binary to get going. It would be really nice to do something like:
Then almost everything is easily upgradable/managed via helm.
jascott1 commentedon Apr 19, 2017
Just a though but could use
--setand be smart about setting tolerations and labels in YAML path dot notation. Keep--daemonsetand add--filefor everything else.So could do
kfox1111 commentedon Apr 19, 2017
in theory you wouldn't need daemonset nor net-host then too. you could do everything through --set or --values with a values file to merge on top of the template.
It, would be infinitely flexible, but not simple to use from the above example?
jascott1 commentedon Apr 19, 2017
Seems using --set for damonset would be possible but difficult as it changes the object type.
--values gets into templating which I guess we could explore but seems like overkill (correct me if im wrong).
Last example seems like nice balance of hitting the 80% easily but having complete control also using --file (and --set i guess)
jascott1 commentedon Apr 19, 2017
Forgot net-host. Would be
kfox1111 commentedon Apr 20, 2017
for the 90% case of this use case, at least on 1.6, you would need
net=host, a nodeSelector to limit it to one node, and kind=daemonset.
It would be nice to limit the length of string needed to enable the use case.
remembering to do:
helm init --net-host --daemonset --set spec.template.nodeSelector=app=helm is rather verbose.
also, specifically --node-selector is very useful outside of this use case in a regular 'helm init' case when you have a hybrid cluster. none of my k8s systems have just one node type and helm really should be pinned to only controllers. So, I kind of think it shoudl get its own flag?
kfox1111 commentedon Apr 20, 2017
maybe we do those 3 things as flags, and the rest with --set?
jascott1 commentedon Apr 20, 2017
Sounds reasonable:
jascott1 commentedon Apr 20, 2017
+1 for future compatibility for --kind
[-]proposal: Add --daemonset, --node-selectors, --tolerations flags to support Helm init --net-host[/-][+]proposal: Add --kind, --node-selectors, --set flags to support Helm init --net-host[/+]jascott1 commentedon Apr 20, 2017
@bacongobbler have any strong feelings on
--file? Seems we can get by with these alone but can see the utility of having --file.kfox1111 commentedon Apr 20, 2017
one other possibility. rather then add --set,
there could be a --template flag. it could spit out the rendered template in json format to stdout.
The user could then use jq. to tweak it to their liking and upload it via kubectl.
kfox1111 commentedon Apr 20, 2017
the --template flag would also work nicely if kind=pod if you wanted to run tiller as a static pod, you would:
jascott1 commentedon Apr 20, 2017
We might want to keep that for next rev if someone demands kind=pod for this flexibility. Plus we might be shot if we add 4 flags at once :)
12 remaining items
kfox1111 commentedon May 26, 2017
I've been using a --kind=pod like config for a while now, and its extremely handy to launch helm before you have a fully working k8s. I'm guessing it will become more common for others to attempt it in time.
If I could get my top wishlist though, I think it would be in this order I think:
I'm thinking all of this stuff shouldn't be much of a burden on the helm devs long term? I think once its implemented it should be pretty static in the future. number one and number five will allow great flexibility for edge case handling I think?
kfox1111 commentedon May 26, 2017
btw, for grins, here's a first stab at flannel as a helm package. :)
https://github.com/kfox1111/charts/tree/flannel/stable/flannel
Once helm has support for the use case, I plan on submitting it to the kubernetes/charts repo.
thomastaylor312 commentedon May 31, 2017
I agree with @kfox1111 on this one, but also think
--fileshould be an option. With an--outputoption and--file, it gives you the flexibility to set up things as you'd like to or to just provide a file.For the first pass, I would think the output, node-selector, and file options would be good in one PR and then we can break out the others into their own features. That sound good @technosophos and @jascott1? I would love to see this move forward
kfox1111 commentedon May 31, 2017
@thomastaylor312 Not sure I understand the difference between -o json and --file. Can we nail down those semantics real quick?
I think we should be able to get a version of this up and running pretty quickly.
thomastaylor312 commentedon May 31, 2017
@kfox1111 I was just talking about the
--fileflag mentioned earlier. Basically so you can output a tiller manifest using-o jsonand then modify it to your liking and provide it tohelm initusing--file. But I guess you could also just usekubectl createwith the manifest, so maybe it isn't actually worth it to have a--fileflag.tl;dr: Never mind, forget I said anything about the
--fileflag.Also, when you said "I think we should be able to get a version of this up and running pretty quickly," did you mean you are already working on it?
kfox1111 commentedon May 31, 2017
@jascott1 said he was going to work on it. but if he can't do it in the next day or two, I can take a quick stab at it.
djsly commentedon Jul 13, 2017
I would like to add a special note about
Tolerations. I want to usenodeSelectorin conjunction withTolerationsince I have atainton the node I want to deployTilleron.djsly commentedon Jul 13, 2017
I just look at the PR and it seems that the
--setoption might allow us to setTolerations. Any specific reasons why the NodeSelector parameter as its own option VS using the--setoption? Maybe I'm missing something with regards to the--setoption...jascott1 commentedon Jul 13, 2017
@djsly You can use
--setfor nodeSelectors but--node-selectorsis commonly needed to control where Tiller lands so its included as a flag for convenience. We are currently hard-coding a linux nodeSelector (that can be overridden) but this PR will remove that and allow users that still need it to specify with--node-selectorseasily.WIP feat(helm): Add --node-selectors and --output flags to helm init
WIP feat(helm): Add --node-selectors and --output flags to helm init
WIP feat(helm): Add --node-selectors and --output flags to helm init
WIP feat(helm): Add --node-selectors and --output flags to helm init
feat(helm): Add --node-selectors and --output flags to helm init