From 8057f0a0857845ab9eb1827fd56931f239842ef8 Mon Sep 17 00:00:00 2001 From: GreedHub <39564497+GreedHub@users.noreply.github.com> Date: Sun, 16 Jul 2023 14:30:20 -0300 Subject: [PATCH] Added skew topology spread constraints to deployment.yaml --- .../templates/deployment.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/charts/nfs-subdir-external-provisioner/templates/deployment.yaml b/charts/nfs-subdir-external-provisioner/templates/deployment.yaml index 15a574b2..51cef4e7 100644 --- a/charts/nfs-subdir-external-provisioner/templates/deployment.yaml +++ b/charts/nfs-subdir-external-provisioner/templates/deployment.yaml @@ -23,6 +23,15 @@ spec: labels: {{- include "nfs-subdir-external-provisioner.podLabels" . | nindent 8 }} spec: + {{- if .Values.skew }} + topologySpreadConstraints: + - maxSkew: {{ .Values.skew.maxSkew }} + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: {{ .Values.skew.whenUnsatisfiable }} + labelSelector: + matchLabels: + app: {{ template "nfs-subdir-external-provisioner.fullname" . }} + {{- end }} serviceAccountName: {{ template "nfs-subdir-external-provisioner.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}