-
Notifications
You must be signed in to change notification settings - Fork 715
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
Tracking issue for tracking forced configuration parameters #1378
Comments
Another kubeadm override I'm aware of is here: it enforce authorization modes in the kube-apiserver overriding user ExtraArgs |
Looking at default config example I can see a lot of possible candidates to be overriden in a user config in a similar way to failSwapOn(#1254). Should we consider implementing some kind of validation for user-provided config where we can check all possible overrides? |
/cc @neolit123 |
my idea was to add some sort of an utility that accepts a slice of flag names and a "reason".
we can then use this utility in key locations that do overrides. |
@neolit123 How this will help to detect overrides made in user config (similar to failSwapOn)? For example, if user puts "makeIPTablesUtilChains = false" or "syncFrequency: 10s" or one of dozens other parameters into config and run "kubeadm init/join/upgrade/etc --config " with it. User would expect those parameters to be used and kubeadm should warn user if it's not the case. |
its manual, no detection. we basically need a wrapper that either updates + prints warning or a utility that prints that some fields were overwritten. |
I thought it's a purpose of this issue to detect things like this one, no? If we can't detect this kind of changes we can only address overrides of externalkubeletcfg parameters. |
in my opinion we should only address the kubelet overrides, for now. |
My understanding is that so far we know only two points into he code where kubeadm makes overrides one for kubelet config and one for the API servers extra args; Overall there are less then 10 attributes overwritten by kubeadm. However I`m a little bit concerned about how we want the warning to surface to the user, because those overrides a deep in the call stack, because I don't like the Idea of having printf spreading in the code base (we already have two much of them). Any thoughts about this? |
we can use an interface that collects the problem fields in a shared bucket and print them only on the CLI side. |
@fabriziopandini @neolit123 My main concern for now is silently ignored options from user config. Can you suggest how to discover which of those dozens of options there can be potentially ignored? The only method I'm aware of so far was to change options in the config, run kubeadm and see which of those have been ignored. Is there a better way? |
Once we gather a list of everything that is overridden (we will miss some and that's ok, we can improve with time) we will have the ability to let the user know ASAP when we're about to override a value they've set. The printfs won't be nested deep in the code and it could be on initial validation. It does require maintaining a list by hand though. edit: @bart0sh an improved list over time is the alternative (and imo better) way to trying to figure it all out up front perfectly. |
I'm in favour of list improved over time too. I'm also confident that kubeadm overrides are concentrated in few points:
Other places worth to check are the SetDynamic default functions and the function where kubelet ExtraArgs are written to file, but I don't expect the current list to grow up significantly |
Yet another issue that's caused by kubelet ignoring configuration file options. Copied from slack:
|
the yaml unmarsal is case sensitive. https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1 |
/help-wanted |
Looking to contribute to this issue, but have a couple clarifying questions. First, I want to make sure I understand the goal. Current Behavior: Desired Behavior: The discussion here seems to have been option (a). Has erroring and refusing to continue if the user configures these ignored options been considered? Because kubeadm is a tool used by other tools to automate cluster creation, and warnings are rarely surfaced in automated environments, it can be easy for a user to believe that their configuration has been applied despite kubeadm printing a warning. Errors are surfaced and provide immediate feedback. While the kubelet config passed in is for kubelet, in this case is also has be valid for kubeadm, and setting these values (other than to the required defaults) makes it an invalid kubeadm kubelet config. |
in today's kubeadm office hours we decided that kubeadm should not stomp the settings and we should allow the user configuration. |
@bart0sh feel free to work on this if you have the bandwidth... |
Hi, We configure Use case: Additional information: https://kubernetes.slack.com/archives/C13J86Z63/p1562355381313100 |
@chrischdi hi, if you are willing to work on this please go ahead. a single PR can be scoped in the following way:
|
/assign @neolit123 I will work on this issue, thanks a lot. |
fixed by: kubernetes/kubernetes#81903 |
@neolit123 one question: kubernetes/kubernetes#81903 fixes this issue for There are still enforced values for example for the pod manifests: So it is about the following config part:
Should this have been in-scope for this issue? |
@chrischdi kubeadm will still deploy using it's harcoded manifests for the static pods, but you can apply kustomizations to them (alpha in 1.16) |
This is a tracking issue for implementing correct handling of overriding configuration parameters. The goal of it is to list all overrides and decide how to handle them in a user-friendly and generic manner.
Currently at least some of the parameters are simply ignored, which confuses users. Example issues: #1254, #1252, #1028
Preliminary list of parameters to check::
Possible solution: Add warnings when parameters are overriden specifying a reason for override.
The text was updated successfully, but these errors were encountered: