diff --git a/charts/simple-app/templates/deployment.yaml b/charts/simple-app/templates/deployment.yaml index 1f93fc2..73859ab 100644 --- a/charts/simple-app/templates/deployment.yaml +++ b/charts/simple-app/templates/deployment.yaml @@ -131,3 +131,10 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name }} + maxSkew: {{ .Values.skew }} + topologyKey: "kubernetes.io/hostname" + whenUnsatisfiable: {{ .Values.skewPolicy }} \ No newline at end of file diff --git a/charts/simple-app/values.yaml b/charts/simple-app/values.yaml index 5e15d04..76f996a 100644 --- a/charts/simple-app/values.yaml +++ b/charts/simple-app/values.yaml @@ -4,6 +4,9 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +skew: 1 +skewPolicy: ScheduleAnyway + nameOverride: "" fullnameOverride: ""