-
Notifications
You must be signed in to change notification settings - Fork 716
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
Improvements to the handling of cluster addons #1091
Comments
I like the idea. A couple of notes though:
|
Should the images/repository field go in the manifest file instead of outside the custom configurations? If not, what makes the images/repository more special than the configuration of the plugin? |
If we use an array of images, we can handle the case with non-obvious dependencies (like in the kube-dns case) and still have a fully functional image pre-pulling. However, if we can use only a single image there, then I agree with you, that this is pointless. |
currently the manifests include types like |
@neolit123 thanks for kicking the ball on this topic
|
ok, these two are some good points.
this also makes perfect sense, except all the reports i've seen about this feature were about using custom changes in addon manifests with |
That's true and I'm fine in pushing the limit of kubeadm supported configurations as far as we can follow with a good test grid coverage and/or we can reasonably ensure stable and predictable workflows. |
@neolit123 @fabriziopandini I think we should support customization of add-on version to let users use the version which they want. This is useful and simple. A newer version can include many fixes... |
A caveat with version selection: CoreDNS for example typically has a new default configuration with every release. This configuration is not built in the binary - it's essentially hard coded in kubeadm. Therefore (theoretical example) if installing CoreDNS 1.2.2 with kubeadm 1.11, you'd get the CoreDNS 1.1.3 default k8s deployment configuration. So this would be a "use at your own risk" option. |
i see the common use case being:
this would install the two addons, based on hardcoded configuration. changing the kube-proxy image might not make a lot of sense because it's bound to k8s versioning, but this still allows
we have the option to make it so that if the user sets a different image for an addon a custom manifest file will be mandatory. but yes, they would be on their own if they want to use a custom image/config and we probably need to expose the default one as outlined in [1]. |
We should also consider, that allowing the user to have a custom config map (for example), might make upgrade impossible, to the point of breaking it. The user may be required to do manual upgrade of the addons if he/she used some config map option, that was changed and could not be upgraded automatically by kubeadm. On the other hand, allowing the use of the latest patch release might be desirable, since those are not expected to change configs or APIs, but fix bugs. |
i can definitely see the complication with upgrades, but again the users are on their own if they modify something beyond recognition. this is the case in most software upgrade scenarios. we can potentially |
Yes, CoreDNS policy is that 3rd dot releases wont introduce any config incompatibilities (e.g. 1.0.0 -> 1.0.1). 2nd dot release (e.g. 1.0.1 -> 1.1.0) means there is the possibility of config incompatibilities - although the default config may not be affected. Perhaps off topic: As it is now, how are we handling coredns corefile/configmap during upgrades? Do we try to detect if the corefile is at a prior default, and if so update it to the new default? Or do we always replace (clobbering customizations). Or do we never replace? I recall discussing ways to solve, such as putting a comment in the corefile, or label in configmap (e.g. restore-default-at-upgrade=true) - leaving it to the user to control. I suppose we could also test the existing corefile to see if it's valid on the new version, and abort/warn user if it is not. |
as in my previous comment:
my initial idea for this would be to tell the user something in the lines of "hey, we see that you have deviated your addon configuration from the default one like so..." and pretty much on upgrades we show this message "kubadm is now upgrading addon X to the default configuration automatic handling might be out of scope / hard to do. |
Currently, the corefile/configmap remains untouched during an upgrade if an existing coredns configmap is detected. |
@rajansandeep thanks, thats what I was asking. So, if left unaddressed, we will eventually have issues of config incompatibles during normal upgrades, where users never change their config from the default. |
@chrisohaver @rajansandeep the current handling is not optimal (AKA missing).
i may have missed these discussions. proposal:
ideas are welcome.
would this validation process, require vendoring coredns in kubeadm? |
@chrisohaver @rajansandeep |
This doesn't exist yet. The complexity/flexibility of the CoreDNS config makes this challenging to do 100% cleanly. We had some discussions about this a few months ago, and recently starting talking about it again. |
@chrisohaver ack.If there is a issue to follow such discussion I will add some comments about how to make this usable from kubeadm. |
in the meantime, if the proposal for addon customization is integrated in kubeadm before coredns gets the conversation and validation code in place we might have to go with the approach of instructing the users to do manual patching. this is extra handling, but it might be a good idea to diff the user deviations for addons regardless. i would like to remind that the demand for this feature seems high and if anyone notices a kubeadm issue in the lines of |
In the office hours yesterday we discussed need to figure out the balance here with bundles. https://github.com/GoogleCloudPlatform/k8s-cluster-bundle I don't want to overfit the config, only to change it at a later date. |
sorry for not attending - meetings and travel this week. what we know about bundles at the moment is only the theory. i'm considering doing that, but the project doesn't have documentation and examples: @roberthbailey @justinsb do you have any examples for usage of the c-bundle or perhaps i should log an issue about that? |
we already have coredns and kubeproxy addons in the config. some related topics:
as a side note kubectl now has kustomize built in. |
May I ask: What is the recommended way to patch those addons like
Are there any docs for doing that? Thanks and kind regards. EDITED: fix typo above |
There are no ways to do that currently. Also Coredns might be moving
outside of kubeadm.
You have two options. Let kubeadm deploy it and then patch with kubectl. Or
skip deploying coredns (search for "skipping phases" in the kubeadm init
docs)
|
Ok, thanks to @neolit123 . I will try to get the manifest with |
this is a tracking issue for addon improvements.
it has a proposal that possibly needs discussion.
a couple of problems:
addons don't follow the k8s versioning and the users don't have control of what version of an addon is pulled.
these complexities can be solved if addons are introduced in a separate structure in the kubeadm configuration.
rough pseudo example:
notes:
name
s for such.---
separated list of objects. Deployment, ConfigMap etc.minifestFile
is not defined use the defaults (hardcoded) values.image
is not defined use defaults./cc @chuckha @fabriziopandini
edit1: it was also proposed to have
restore-default-at-upgrade
as a possible knob per addon element.#1091 (comment)
The text was updated successfully, but these errors were encountered: