Skip to content

Commit 446a932

Browse files
committed
fix: use fixed pod affinity label
1 parent ab71810 commit 446a932

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

charts/cluster-api-runtime-extensions-nutanix/addons/registry/cncf-distribution/values-template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tolerations:
3131
effect: "NoSchedule"
3232

3333
podLabels:
34-
caren.nutanix.com/cluster-uuid: {{ .ClusterUUID }} # ensure the labels match with pod AntiAffinity.
34+
cncf-distribution-registry: "true" # ensure the labels match with pod AntiAffinity.
3535

3636
affinity:
3737
nodeAffinity:
@@ -46,5 +46,5 @@ affinity:
4646
podAffinityTerm:
4747
labelSelector:
4848
matchLabels:
49-
caren.nutanix.com/cluster-uuid: {{ .ClusterUUID }}
49+
cncf-distribution-registry: "true"
5050
topologyKey: kubernetes.io/hostname

test/e2e/registry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ func EnsureAntiAffnityForRegistryAddon(
143143
Expect(podAffinityTerm.LabelSelector).ToNot(BeNil())
144144
affinityLabels := podAffinityTerm.LabelSelector.MatchLabels
145145
Expect(
146-
affinityLabels[v1alpha1.ClusterUUIDAnnotationKey],
147-
).To(Equal(input.WorkloadCluster.Annotations[v1alpha1.ClusterUUIDAnnotationKey]))
146+
affinityLabels["cncf-distribution-registry"],
147+
).To(Equal("true")) // Ensure the label matches the pod AntiAffinity.
148148

149149
// test node affinity
150150
nodeAffinity := sts.Spec.Template.Spec.Affinity.NodeAffinity

0 commit comments

Comments
 (0)