Add nodeSelctor for other services and node labels before CNI setup (#7613)
This commit is contained in:
parent
bcf695913f
commit
7db76f8809
10 changed files with 20 additions and 7 deletions
|
@ -86,8 +86,8 @@
|
||||||
roles:
|
roles:
|
||||||
- { role: kubespray-defaults }
|
- { role: kubespray-defaults }
|
||||||
- { role: kubernetes/kubeadm, tags: kubeadm}
|
- { role: kubernetes/kubeadm, tags: kubeadm}
|
||||||
- { role: network_plugin, tags: network }
|
|
||||||
- { role: kubernetes/node-label, tags: node-label }
|
- { role: kubernetes/node-label, tags: node-label }
|
||||||
|
- { role: network_plugin, tags: network }
|
||||||
|
|
||||||
- hosts: calico_rr
|
- hosts: calico_rr
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
|
|
@ -10,15 +10,18 @@ dns_prevent_single_point_failure: "{{ 'true' if dns_min_replicas|int > 1 else 'f
|
||||||
enable_coredns_reverse_dns_lookups: true
|
enable_coredns_reverse_dns_lookups: true
|
||||||
coredns_ordinal_suffix: ""
|
coredns_ordinal_suffix: ""
|
||||||
# dns_extra_tolerations: [{effect: NoSchedule, operator: "Exists"}]
|
# dns_extra_tolerations: [{effect: NoSchedule, operator: "Exists"}]
|
||||||
|
coredns_deployment_nodeselector: "kubernetes.io/os: linux"
|
||||||
|
|
||||||
# nodelocaldns
|
# nodelocaldns
|
||||||
nodelocaldns_cpu_requests: 100m
|
nodelocaldns_cpu_requests: 100m
|
||||||
nodelocaldns_memory_limit: 170Mi
|
nodelocaldns_memory_limit: 170Mi
|
||||||
nodelocaldnsdns_memory_requests: 70Mi
|
nodelocaldns_memory_requests: 70Mi
|
||||||
|
nodelocaldns_ds_nodeselector: "kubernetes.io/os: linux"
|
||||||
|
|
||||||
# Limits for dns-autoscaler
|
# Limits for dns-autoscaler
|
||||||
dns_autoscaler_cpu_requests: 20m
|
dns_autoscaler_cpu_requests: 20m
|
||||||
dns_autoscaler_memory_requests: 10Mi
|
dns_autoscaler_memory_requests: 10Mi
|
||||||
|
dns_autoscaler_deployment_nodeselector: "kubernetes.io/os: linux"
|
||||||
|
|
||||||
# Netchecker
|
# Netchecker
|
||||||
deploy_netchecker: false
|
deploy_netchecker: false
|
||||||
|
|
|
@ -25,9 +25,9 @@ spec:
|
||||||
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
|
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
|
||||||
createdby: 'kubespray'
|
createdby: 'kubespray'
|
||||||
spec:
|
spec:
|
||||||
priorityClassName: system-cluster-critical
|
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
{{ coredns_deployment_nodeselector }}
|
||||||
|
priorityClassName: system-cluster-critical
|
||||||
serviceAccountName: coredns
|
serviceAccountName: coredns
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: node-role.kubernetes.io/master
|
- key: node-role.kubernetes.io/master
|
||||||
|
|
|
@ -32,6 +32,8 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
|
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
{{ dns_autoscaler_deployment_nodeselector}}
|
||||||
priorityClassName: system-cluster-critical
|
priorityClassName: system-cluster-critical
|
||||||
securityContext:
|
securityContext:
|
||||||
supplementalGroups: [ 65534 ]
|
supplementalGroups: [ 65534 ]
|
||||||
|
|
|
@ -18,6 +18,8 @@ spec:
|
||||||
prometheus.io/scrape: 'true'
|
prometheus.io/scrape: 'true'
|
||||||
prometheus.io/port: '9253'
|
prometheus.io/port: '9253'
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
{{ nodelocaldns_ds_nodeselector }}
|
||||||
priorityClassName: system-cluster-critical
|
priorityClassName: system-cluster-critical
|
||||||
serviceAccountName: nodelocaldns
|
serviceAccountName: nodelocaldns
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
|
@ -35,7 +37,7 @@ spec:
|
||||||
memory: {{ nodelocaldns_memory_limit }}
|
memory: {{ nodelocaldns_memory_limit }}
|
||||||
requests:
|
requests:
|
||||||
cpu: {{ nodelocaldns_cpu_requests }}
|
cpu: {{ nodelocaldns_cpu_requests }}
|
||||||
memory: {{ nodelocaldnsdns_memory_requests }}
|
memory: {{ nodelocaldns_memory_requests }}
|
||||||
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns" ]
|
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns" ]
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
|
|
|
@ -4,6 +4,7 @@ calico_policy_controller_cpu_limit: 100m
|
||||||
calico_policy_controller_memory_limit: 256M
|
calico_policy_controller_memory_limit: 256M
|
||||||
calico_policy_controller_cpu_requests: 30m
|
calico_policy_controller_cpu_requests: 30m
|
||||||
calico_policy_controller_memory_requests: 64M
|
calico_policy_controller_memory_requests: 64M
|
||||||
|
calico_policy_controller_deployment_nodeselector: "kubernetes.io/os: linux"
|
||||||
|
|
||||||
# SSL
|
# SSL
|
||||||
calico_cert_dir: "/etc/calico/certs"
|
calico_cert_dir: "/etc/calico/certs"
|
||||||
|
|
|
@ -20,7 +20,7 @@ spec:
|
||||||
k8s-app: calico-kube-controllers
|
k8s-app: calico-kube-controllers
|
||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
{{ calico_policy_controller_deployment_nodeselector }}
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
serviceAccountName: calico-kube-controllers
|
serviceAccountName: calico-kube-controllers
|
||||||
tolerations:
|
tolerations:
|
||||||
|
|
|
@ -39,6 +39,9 @@ calico_node_memory_requests: 64M
|
||||||
calico_node_cpu_requests: 150m
|
calico_node_cpu_requests: 150m
|
||||||
calico_felix_chaininsertmode: Insert
|
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”.
|
# Virtual network ID to use for VXLAN traffic. A value of 0 means “use the kernel default”.
|
||||||
calico_vxlan_vni: 4096
|
calico_vxlan_vni: 4096
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@ spec:
|
||||||
prometheus.io/port: "{{ calico_felix_prometheusmetricsport }}"
|
prometheus.io/port: "{{ calico_felix_prometheusmetricsport }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
{{ calico_ds_nodeselector }}
|
||||||
priorityClassName: system-node-critical
|
priorityClassName: system-node-critical
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
serviceAccountName: calico-node
|
serviceAccountName: calico-node
|
||||||
|
|
|
@ -96,5 +96,5 @@
|
||||||
roles:
|
roles:
|
||||||
- { role: kubespray-defaults }
|
- { role: kubespray-defaults }
|
||||||
- { role: kubernetes/kubeadm, tags: kubeadm }
|
- { role: kubernetes/kubeadm, tags: kubeadm }
|
||||||
- { role: network_plugin, tags: network }
|
|
||||||
- { role: kubernetes/node-label, tags: node-label }
|
- { role: kubernetes/node-label, tags: node-label }
|
||||||
|
- { role: network_plugin, tags: network }
|
||||||
|
|
Loading…
Reference in a new issue