Browse Source

Merge "[k8s] Improve the taint of master node kubelet"

tags/10.0.0.0rc1
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
f619485a41
4 changed files with 20 additions and 14 deletions
  1. +1
    -1
      magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh
  2. +7
    -6
      magnum/drivers/common/templates/kubernetes/fragments/enable-helm-tiller.sh
  3. +7
    -7
      magnum/drivers/common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh
  4. +5
    -0
      releasenotes/notes/improve-k8s-master-kubelet-taint-0c56ffede270116d.yaml

+ 1
- 1
magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh View File

@@ -432,7 +432,7 @@ if [ -f /etc/sysconfig/docker ] ; then
fi

KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
KUBELET_ARGS="${KUBELET_ARGS} --register-with-taints=CriticalAddonsOnly=True:NoSchedule,dedicated=master:NoSchedule"
KUBELET_ARGS="${KUBELET_ARGS} --register-with-taints=node-role.kubernetes.io/master=:NoSchedule"
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=magnum.openstack.org/role=${NODEGROUP_ROLE}"
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=magnum.openstack.org/nodegroup=${NODEGROUP_NAME}"



+ 7
- 6
magnum/drivers/common/templates/kubernetes/fragments/enable-helm-tiller.sh View File

@@ -139,13 +139,14 @@ spec:
readOnly: true
serviceAccountName: tiller
tolerations:
# make runnable on master nodes
- key: dedicated
value: master
effect: NoSchedule
# Make sure the pod can be scheduled on master kubelet.
- effect: NoSchedule
operator: Exists
# Mark the pod as a critical add-on for rescheduling.
- key: CriticalAddonsOnly
value: "True"
effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
# run only on master nodes
nodeSelector:
node-role.kubernetes.io/master: ""


+ 7
- 7
magnum/drivers/common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh View File

@@ -378,14 +378,14 @@ spec:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule
# this is to have the daemonset runnable on master nodes
# the taint may vary depending on your cluster setup
- key: dedicated
value: master
effect: NoSchedule
# Make sure the pod can be scheduled on master kubelet.
- effect: NoSchedule
operator: Exists
# Mark the pod as a critical add-on for rescheduling.
- key: CriticalAddonsOnly
value: "True"
effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
# this is to restrict CCM to only run on master nodes
# the node selector may vary depending on your cluster setup
nodeSelector:


+ 5
- 0
releasenotes/notes/improve-k8s-master-kubelet-taint-0c56ffede270116d.yaml View File

@@ -0,0 +1,5 @@
---
fixes:
- |
The taint of master node kubelet has been improved to get the
conformance test (sonobuoy) passed.

Loading…
Cancel
Save