From e8901a24228cae7219c8531f21b8ab3a55af0ddb Mon Sep 17 00:00:00 2001 From: Ryler Hockenbury Date: Tue, 13 Nov 2018 07:54:15 -0500 Subject: [PATCH] Apply linux node selector to coreDNS deployment (#3688) * Apply linux node selector to coreDNS deployment * Remove comment before linux node selector on manifests * mend --- roles/dnsmasq/templates/dnsmasq-autoscaler.yml.j2 | 1 - roles/dnsmasq/templates/dnsmasq-deploy.yml.j2 | 1 - .../kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 | 2 ++ .../kubernetes-apps/ansible/templates/kubedns-autoscaler.yml.j2 | 1 - roles/kubernetes-apps/ansible/templates/kubedns-deploy.yml.j2 | 1 - .../ansible/templates/netchecker-agent-ds.yml.j2 | 1 - .../ansible/templates/netchecker-agent-hostnet-ds.yml.j2 | 1 - .../ingress_nginx/templates/deploy-default-backend.yml.j2 | 1 - .../kubernetes/node/templates/manifests/kube-proxy.manifest.j2 | 1 - .../kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 | 1 - roles/network_plugin/flannel/templates/cni-flannel.yml.j2 | 1 - 11 files changed, 2 insertions(+), 10 deletions(-) diff --git a/roles/dnsmasq/templates/dnsmasq-autoscaler.yml.j2 b/roles/dnsmasq/templates/dnsmasq-autoscaler.yml.j2 index 5011b5798..ec7e43fdb 100644 --- a/roles/dnsmasq/templates/dnsmasq-autoscaler.yml.j2 +++ b/roles/dnsmasq/templates/dnsmasq-autoscaler.yml.j2 @@ -55,6 +55,5 @@ spec: - --default-params={"linear":{"nodesPerReplica":{{ dnsmasq_nodes_per_replica }},"preventSinglePointFailure":true}} - --logtostderr=true - --v={{ kube_log_level }} - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux diff --git a/roles/dnsmasq/templates/dnsmasq-deploy.yml.j2 b/roles/dnsmasq/templates/dnsmasq-deploy.yml.j2 index c89109757..665a53dc0 100644 --- a/roles/dnsmasq/templates/dnsmasq-deploy.yml.j2 +++ b/roles/dnsmasq/templates/dnsmasq-deploy.yml.j2 @@ -27,7 +27,6 @@ spec: tolerations: - effect: NoSchedule operator: Exists - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux containers: diff --git a/roles/kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 b/roles/kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 index 134392750..980130583 100644 --- a/roles/kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 @@ -27,6 +27,8 @@ spec: {% if kube_version is version('v1.11.1', '>=') %} priorityClassName: system-cluster-critical {% endif %} + nodeSelector: + beta.kubernetes.io/os: linux serviceAccountName: coredns tolerations: - key: node-role.kubernetes.io/master diff --git a/roles/kubernetes-apps/ansible/templates/kubedns-autoscaler.yml.j2 b/roles/kubernetes-apps/ansible/templates/kubedns-autoscaler.yml.j2 index 6426a969e..bf1d468a8 100644 --- a/roles/kubernetes-apps/ansible/templates/kubedns-autoscaler.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/kubedns-autoscaler.yml.j2 @@ -31,7 +31,6 @@ spec: {% if kube_version is version('v1.11.1', '>=') %} priorityClassName: system-cluster-critical {% endif %} - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux tolerations: diff --git a/roles/kubernetes-apps/ansible/templates/kubedns-deploy.yml.j2 b/roles/kubernetes-apps/ansible/templates/kubedns-deploy.yml.j2 index af6df513c..37ed1db4e 100644 --- a/roles/kubernetes-apps/ansible/templates/kubedns-deploy.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/kubedns-deploy.yml.j2 @@ -30,7 +30,6 @@ spec: {% if kube_version is version('v1.11.1', '>=') %} priorityClassName: system-cluster-critical {% endif %} - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux tolerations: diff --git a/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 b/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 index a90a1ad9a..ef947dcba 100644 --- a/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 @@ -18,7 +18,6 @@ spec: tolerations: - effect: NoSchedule operator: Exists - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux containers: diff --git a/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 b/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 index 79db63926..40d5036b4 100644 --- a/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 @@ -13,7 +13,6 @@ spec: app: netchecker-agent-hostnet spec: hostNetwork: True - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux {% if kube_version is version('v1.6', '>=') %} diff --git a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/deploy-default-backend.yml.j2 b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/deploy-default-backend.yml.j2 index b3359356e..679ad9ca2 100644 --- a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/deploy-default-backend.yml.j2 +++ b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/deploy-default-backend.yml.j2 @@ -45,6 +45,5 @@ spec: requests: cpu: 10m memory: 20Mi - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux diff --git a/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 b/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 index 83341f5e8..dcc533667 100644 --- a/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 +++ b/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 @@ -12,7 +12,6 @@ spec: {% if kube_version is version('v1.6', '>=') %} dnsPolicy: ClusterFirst {% endif %} - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux {% if kube_version is version('v1.11.1', '>=') %} diff --git a/roles/kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 b/roles/kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 index d3dd5d296..8a7b0cd41 100644 --- a/roles/kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 +++ b/roles/kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 @@ -7,7 +7,6 @@ metadata: k8s-app: kube-nginx spec: hostNetwork: true - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux {% if kube_version is version('v1.11.1', '>=') %} diff --git a/roles/network_plugin/flannel/templates/cni-flannel.yml.j2 b/roles/network_plugin/flannel/templates/cni-flannel.yml.j2 index 2e09d0383..578409d02 100644 --- a/roles/network_plugin/flannel/templates/cni-flannel.yml.j2 +++ b/roles/network_plugin/flannel/templates/cni-flannel.yml.j2 @@ -59,7 +59,6 @@ spec: priorityClassName: system-node-critical {% endif %} serviceAccountName: flannel - # When having win nodes in cluster without this patch, this pod cloud try to be created in windows nodeSelector: beta.kubernetes.io/os: linux containers: