Add nodeSelctor for other services and node labels before CNI setup (#7613)

pull/7648/head
efrikin 2021-05-25 23:40:43 +03:00 committed by GitHub
parent bcf695913f
commit 7db76f8809
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 7 deletions

View File

@ -86,8 +86,8 @@
roles:
- { role: kubespray-defaults }
- { role: kubernetes/kubeadm, tags: kubeadm}
- { role: network_plugin, tags: network }
- { role: kubernetes/node-label, tags: node-label }
- { role: network_plugin, tags: network }
- hosts: calico_rr
gather_facts: False

View File

@ -10,15 +10,18 @@ dns_prevent_single_point_failure: "{{ 'true' if dns_min_replicas|int > 1 else 'f
enable_coredns_reverse_dns_lookups: true
coredns_ordinal_suffix: ""
# dns_extra_tolerations: [{effect: NoSchedule, operator: "Exists"}]
coredns_deployment_nodeselector: "kubernetes.io/os: linux"
# nodelocaldns
nodelocaldns_cpu_requests: 100m
nodelocaldns_memory_limit: 170Mi
nodelocaldnsdns_memory_requests: 70Mi
nodelocaldns_memory_requests: 70Mi
nodelocaldns_ds_nodeselector: "kubernetes.io/os: linux"
# Limits for dns-autoscaler
dns_autoscaler_cpu_requests: 20m
dns_autoscaler_memory_requests: 10Mi
dns_autoscaler_deployment_nodeselector: "kubernetes.io/os: linux"
# Netchecker
deploy_netchecker: false

View File

@ -25,9 +25,9 @@ spec:
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
createdby: 'kubespray'
spec:
priorityClassName: system-cluster-critical
nodeSelector:
kubernetes.io/os: linux
{{ coredns_deployment_nodeselector }}
priorityClassName: system-cluster-critical
serviceAccountName: coredns
tolerations:
- key: node-role.kubernetes.io/master

View File

@ -32,6 +32,8 @@ spec:
annotations:
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
spec:
nodeSelector:
{{ dns_autoscaler_deployment_nodeselector}}
priorityClassName: system-cluster-critical
securityContext:
supplementalGroups: [ 65534 ]

View File

@ -18,6 +18,8 @@ spec:
prometheus.io/scrape: 'true'
prometheus.io/port: '9253'
spec:
nodeSelector:
{{ nodelocaldns_ds_nodeselector }}
priorityClassName: system-cluster-critical
serviceAccountName: nodelocaldns
hostNetwork: true
@ -35,7 +37,7 @@ spec:
memory: {{ nodelocaldns_memory_limit }}
requests:
cpu: {{ nodelocaldns_cpu_requests }}
memory: {{ nodelocaldnsdns_memory_requests }}
memory: {{ nodelocaldns_memory_requests }}
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns" ]
securityContext:
privileged: true

View File

@ -4,6 +4,7 @@ calico_policy_controller_cpu_limit: 100m
calico_policy_controller_memory_limit: 256M
calico_policy_controller_cpu_requests: 30m
calico_policy_controller_memory_requests: 64M
calico_policy_controller_deployment_nodeselector: "kubernetes.io/os: linux"
# SSL
calico_cert_dir: "/etc/calico/certs"

View File

@ -20,7 +20,7 @@ spec:
k8s-app: calico-kube-controllers
spec:
nodeSelector:
kubernetes.io/os: linux
{{ calico_policy_controller_deployment_nodeselector }}
hostNetwork: true
serviceAccountName: calico-kube-controllers
tolerations:

View File

@ -39,6 +39,9 @@ calico_node_memory_requests: 64M
calico_node_cpu_requests: 150m
calico_felix_chaininsertmode: Insert
# Calico daemonset nodeselector
calico_ds_nodeselector: "kubernetes.io/os: linux"
# Virtual network ID to use for VXLAN traffic. A value of 0 means “use the kernel default”.
calico_vxlan_vni: 4096

View File

@ -26,6 +26,8 @@ spec:
prometheus.io/port: "{{ calico_felix_prometheusmetricsport }}"
{% endif %}
spec:
nodeSelector:
{{ calico_ds_nodeselector }}
priorityClassName: system-node-critical
hostNetwork: true
serviceAccountName: calico-node

View File

@ -96,5 +96,5 @@
roles:
- { role: kubespray-defaults }
- { role: kubernetes/kubeadm, tags: kubeadm }
- { role: network_plugin, tags: network }
- { role: kubernetes/node-label, tags: node-label }
- { role: network_plugin, tags: network }