Skip to content

Commit

Permalink
add gardener node-critical labels/annotations (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwennrich authored Mar 16, 2023
1 parent e69e9f9 commit 54c0d65
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions controllers/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,21 +711,35 @@ var (
}

// Node DaemonSet
nodeRoleLabels = map[string]string{"app": lbCSINodeName, "role": "node"}
csiNodeDaemonSet = apps.DaemonSet{
ObjectMeta: metav1.ObjectMeta{
Name: lbCSINodeName,
Namespace: namespace,
Labels: map[string]string{"shoot.gardener.cloud/no-cleanup": "true"},
Labels: map[string]string{
"shoot.gardener.cloud/no-cleanup": "true",
"node.gardener.cloud/critical-component": "true",
},
},
Spec: apps.DaemonSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: nodeRoleLabels},
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": lbCSINodeName,
"role": "node",
},
},
UpdateStrategy: apps.DaemonSetUpdateStrategy{
Type: apps.RollingUpdateDaemonSetStrategyType,
RollingUpdate: &apps.RollingUpdateDaemonSet{MaxUnavailable: &intstr.IntOrString{IntVal: 1}},
},
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{Labels: nodeRoleLabels},
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
"app": lbCSINodeName,
"role": "node",
"node.gardener.cloud/critical-component": "true",
},
Annotations: map[string]string{"node.gardener.cloud/wait-for-csi-node-lightbits": provisioner},
},
Spec: corev1.PodSpec{
InitContainers: []corev1.Container{
nodeInitContainer,
Expand Down

0 comments on commit 54c0d65

Please sign in to comment.