-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Adds PodNodeSelector to the list of plugins to be configured #10733
Conversation
…_vars/k8s_cluster/k8s-cluster.yml
Hi @titansmc. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
So, I've taken a closer look at what we do with that variable, and IMO we should not have it in defaults to be modified: Could you add the plugin you care about in the list instead ? (that would be nice if you added all of the plugins which needs configuration, but that's not a requirements to merge) Also, please follow the PR template and add a proper release note. /ok-to-test |
…_vars/k8s_cluster/k8s-cluster.yml
I see... @VannTen Let me know how it looks now |
Just one more thing and I think we'll be good: I think with that change you can remove the task "Kubeadm | Configure default cluster podnodeslector" introduced in #10607 since I think it will be handled by the generic one just above. |
Hi @titansmc Follow https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#which-plugins-are-enabled-by-default. The kubespray may not have a solid reason to add the Best Regards :-) |
@yankay In that case it's not about defaults, but about which admission plugins needs a config file (which we use to conditionally push one) |
Thanks @VannTen I got it. :-) Follow the https://blog.opstree.com/2020/03/24/ansible-directory-structure-default-vs-vars/,
How about changing the |
Precisely, this is the approach I think we should **not** use. We already have a variable defining which admission plugins are enabled:
kube_apiserver_enable_admission_plugins
See:
- name: Kubeadm | Push admission control config files
template:
src: "{{ item | lower }}.yaml.j2"
dest: "{{ kube_config_dir }}/admission-controls/{{ item | lower }}.yaml"
mode: 0640
when:
- kube_apiserver_admission_control_config_file
- item in kube_apiserver_admission_plugins_needs_configuration
loop: "{{ kube_apiserver_enable_admission_plugins }}"
That means that we only use kube_apiserver_admission_plugins_needs_configuration as the set of admission plugins for which we will push a dedicated configuration file (one per admission plugin).
That set of admission plugins should not be configurable, because the existing admission plugins are fixed (compiled in the apiserver), not user-supplied. Ultimately we should list all admission plugins which needs a config file here (ref: https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#what-does-each-admission-controller-do).
That does not mean they will be enabled, just that when an user adds them in kube_apiserver_enable_admission_plugins, we correctly push the corresponding configuration file.
|
@titansmc any chance you can address the previous comment ? |
no need for this task since it is handled when adding the configuration of the plugin by default
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: titansmc The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@VannTen should be fine now |
Yeah, that's fine this way ! 👍 |
…ce handled by generic one
|
I think I managed to screw it up even more....not sure how to follow from here |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Those are the defaults but if I want to add another plugin that needs configuration to
inventory/ops_k1/group_vars/k8s_cluster/k8s-cluster.yml
it won't work, because the variables defined inmain.yaml
will take preference over what is written in the inventory. So the only way I have is to run kubespray like this, from now on:Which issue(s) this PR fixes:
Fixes #10588