-
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
Configuring PodNodeSelector via variables #10456
Conversation
|
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. |
[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 |
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace kubeadm with Kubeadm uppercase
@yankay can you review it, please ? |
@@ -138,6 +138,8 @@ kube_webhook_token_auth_url_skip_tls_verify: false | |||
kube_webhook_authorization: false | |||
kube_webhook_authorization_url_skip_tls_verify: false | |||
|
|||
# Default podnodeselector | |||
kube_apiserver_admission_plugins_podnodeselector_default_node_selector: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The clusterDefaultNodeSelector is string
not a dict.
It's better to use
# Define the default node selector, by default all the workloads will be scheduled on nodes, like "network=srv1"
# kube_apiserver_admission_plugins_podnodeselector_default_node_selector: ""
docs/hardening.md
Outdated
@@ -54,6 +54,11 @@ kube_apiserver_enable_admission_plugins: | |||
- PodNodeSelector | |||
- PodSecurity | |||
kube_apiserver_admission_control_config_file: true | |||
# Creates config file for PodNodeSelector | |||
kube_apiserver_admission_plugins_needs_configuration: [PodNodeSelector] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it not must be required, it's better to use #
comment the line.
docs/hardening.md
Outdated
kube_apiserver_admission_plugins_needs_configuration: [PodNodeSelector] | ||
# Define the default node selector, by default all the workloads will be scheduled on nodes | ||
# with label network=srv1 | ||
kube_apiserver_admission_plugins_podnodeselector_default_node_selector: "network=srv1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it not must be required, it's better to use # comment the line.
dest: "{{ kube_config_dir }}/admission-controls/podnodeselector.yaml" | ||
mode: 0640 | ||
when: | ||
- kube_apiserver_admission_plugins_podnodeselector_default_node_selector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better changed to
when:
- kube_apiserver_admission_plugins_podnodeselector_default_node_selector is defined
- kube_apiserver_admission_plugins_podnodeselector_default_node_selector | length > 0
Thanks @titansmc Nice PR, And the commit needs to be rebased to one commit :-) |
The clusterDefaultNodeSelector is string not a dict.
If it not must be required, it's better to use # comment the line.
Update kubeadm-setup.yml with configuration for default podnodeselector Update hardening.md regarding podnodeselector Update kubeadm-setup.yml with upper case Kubeadm Update main.yml with default empty Update main.yml The clusterDefaultNodeSelector is string not a dict. Update hardening.md If it not must be required, it's better to use # comment the line. Update kubeadm-setup.yml
I am not very familiar with the rebase and I think I screwed it up... |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Allows the users to configure the the
clusterDefaultNodeSelector
from the config fileWhich issue(s) this PR fixes:
Fixes #10412
Special notes for your reviewer: