From 49e55bab463ea0f076e26f1edbb9a3493d5e380c Mon Sep 17 00:00:00 2001 From: "Egorov, Stanislav" Date: Thu, 26 Sep 2019 16:10:43 -0700 Subject: [PATCH] Fix calico chart for hyperkube 1.12 During bootstrap process kubernetes node is not ready due to missed CNI. It will be installed later but for a few deployments/jobs it's critical. They can't start pods and looping in a while. Workaround is here: add tolerations. Change-Id: I8b3dacb71a7f102e7f74a6e4b6aee963ef12b8ed --- calico/templates/daemonset-calico-node.yaml | 3 +++ calico/templates/deployment-calico-kube-controllers.yaml | 3 +++ calico/templates/job-calico-settings.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/calico/templates/daemonset-calico-node.yaml b/calico/templates/daemonset-calico-node.yaml index cb0deba52..a2a866e87 100644 --- a/calico/templates/daemonset-calico-node.yaml +++ b/calico/templates/daemonset-calico-node.yaml @@ -125,6 +125,9 @@ spec: # Make sure calico-node gets scheduled on all nodes. - effect: NoSchedule operator: Exists + - key: node.kubernetes.io/not-ready + effect: NoSchedule + operator: Exists # Mark the pod as a critical add-on for rescheduling. - key: CriticalAddonsOnly operator: Exists diff --git a/calico/templates/deployment-calico-kube-controllers.yaml b/calico/templates/deployment-calico-kube-controllers.yaml index 1c5937d8e..84d0083c0 100644 --- a/calico/templates/deployment-calico-kube-controllers.yaml +++ b/calico/templates/deployment-calico-kube-controllers.yaml @@ -105,6 +105,9 @@ spec: operator: Exists - key: node-role.kubernetes.io/master effect: NoSchedule + - key: node.kubernetes.io/not-ready + operator: Exists + effect: NoSchedule serviceAccountName: {{ $serviceAccountName }} initContainers: {{ tuple $envAll "calico_kube_controllers" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} diff --git a/calico/templates/job-calico-settings.yaml b/calico/templates/job-calico-settings.yaml index 1154241ca..2329bbc94 100644 --- a/calico/templates/job-calico-settings.yaml +++ b/calico/templates/job-calico-settings.yaml @@ -42,6 +42,9 @@ spec: tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule + - key: node.kubernetes.io/not-ready + operator: Exists + effect: NoSchedule # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode. # This, along with the annotation above marks this pod as a critical add-on. - key: CriticalAddonsOnly