From fe24a656040baa9033c463b4df82d20714907697 Mon Sep 17 00:00:00 2001 From: rbo54 Date: Wed, 26 Jan 2022 12:47:13 -0500 Subject: [PATCH] Add pod topology spread to helm chart and update storage class for unity-nfs --- test/podmontest/deploy/templates/test.yaml | 9 +++++++++ test/podmontest/deploy/values-unity-nfs.yaml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/podmontest/deploy/templates/test.yaml b/test/podmontest/deploy/templates/test.yaml index 59beea6..916181f 100644 --- a/test/podmontest/deploy/templates/test.yaml +++ b/test/podmontest/deploy/templates/test.yaml @@ -30,6 +30,7 @@ spec: labels: app: podmontest-{{ .Release.Namespace }} podmon.dellemc.com/driver: {{ required "Must set driver label" .Values.podmonTest.driverLabel }} + affinity: affinity spec: {{- if ne .Values.podmonTest.zone "" }} affinity: @@ -54,6 +55,14 @@ spec: - podmontest-{{ .Release.Namespace }} topologyKey: "kubernetes.io/hostname" {{end}} + topologySpreadConstraints: + - maxSkew: {{ required "Number of replicas" .Values.podmonTest.replicas }} # + topologyKey: kubernetes.io/hostname + # whenUnsatisfiable: ScheduleAnyway + whenUnsatisfiable: DoNotSchedule + labelSelector: + matchLabels: + affinity: affinity serviceAccount: podmontest containers: - name: podmontest diff --git a/test/podmontest/deploy/values-unity-nfs.yaml b/test/podmontest/deploy/values-unity-nfs.yaml index d94094a..de826c1 100644 --- a/test/podmontest/deploy/values-unity-nfs.yaml +++ b/test/podmontest/deploy/values-unity-nfs.yaml @@ -2,7 +2,7 @@ podmonTest: image: "registry:port/podmontest:v0.0.54" namespace: "podmontest" driverLabel: csi-unity - storageClassName: unity-virt21048j9rzz-nfs + storageClassName: unity-nfs nvolumes: 2 ndevices: 0 # deploymentType can be "statefulset" or "deployment"