Skip to content

Commit eef257f

Browse files
Merge pull request #4794 from rccrdpccl/add-kubelet-labels-base-template
MGMT-19337: enable injection of custom kubelet labels via env var in base template
2 parents 38fb1b8 + dcbddc5 commit eef257f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/master/01-master-kubelet/_base/units/kubelet.service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ contents: |
2828
--kubeconfig=/var/lib/kubelet/kubeconfig \
2929
--container-runtime-endpoint=/var/run/crio/crio.sock \
3030
--runtime-cgroups=/system.slice/crio.service \
31-
--node-labels=node-role.kubernetes.io/control-plane,node-role.kubernetes.io/master,node.openshift.io/os_id=${ID} \
31+
--node-labels=node-role.kubernetes.io/control-plane,node-role.kubernetes.io/master,node.openshift.io/os_id=${ID},${CUSTOM_KUBELET_LABELS} \
3232
{{- if or (eq .IPFamilies "DualStack") (eq .IPFamilies "DualStackIPv6Primary") }}
3333
--node-ip=${KUBELET_NODE_IPS} \
3434
{{- else}}

templates/worker/01-worker-kubelet/_base/units/kubelet.service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ contents: |
2828
--kubeconfig=/var/lib/kubelet/kubeconfig \
2929
--container-runtime-endpoint=/var/run/crio/crio.sock \
3030
--runtime-cgroups=/system.slice/crio.service \
31-
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_id=${ID} \
31+
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_id=${ID},${CUSTOM_KUBELET_LABELS} \
3232
{{- if or (eq .IPFamilies "DualStack") (eq .IPFamilies "DualStackIPv6Primary") }}
3333
--node-ip=${KUBELET_NODE_IPS} \
3434
{{- else}}

0 commit comments

Comments
 (0)