File tree 3 files changed +29
-0
lines changed
3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -345,3 +345,17 @@ clientCache numLocks
345
345
{ {- end -} }
346
346
{ {- end -} }
347
347
{ {- end -} }
348
+
349
+ { {/*
350
+ topologySpreadConstraints appends the " vso.chart.selectorLabels" to .Values.controller.topologySpreadConstraints if no labelSelector was specified
351
+ */} }
352
+ { {- define " vso.topologySpreadConstraints" -} }
353
+ { {- $defaultLabelSelector := dict " labelSelector" (dict " matchLabels" (include " vso.chart.selectorLabels" . | fromYaml)) -} }
354
+ { {- range $topologySpreadConstraint := .Values.controller.topologySpreadConstraints -} }
355
+ { {- if hasKey $topologySpreadConstraint " labelSelector" -} }
356
+ { {- $topologySpreadConstraint | list | toYaml -} }
357
+ { {- else -} }
358
+ { {- merge $topologySpreadConstraint $defaultLabelSelector | list | toYaml -} }
359
+ { {- end -} }
360
+ { {- end -} }
361
+ { {- end -} }
Original file line number Diff line number Diff line change @@ -155,6 +155,10 @@ spec:
155
155
affinity :
156
156
{{- toYaml .Values.controller.affinity | nindent 8 }}
157
157
{{- end }}
158
+ {{- if .Values.controller.topologySpreadConstraints }}
159
+ topologySpreadConstraints :
160
+ {{- include "vso.topologySpreadConstraints" . | nindent 8 }}
161
+ {{- end }}
158
162
volumes :
159
163
- downwardAPI :
160
164
items :
Original file line number Diff line number Diff line change @@ -66,6 +66,17 @@ controller:
66
66
# - antarctica-west1
67
67
affinity : {}
68
68
69
+ # TopologySpreadConstraints settings for vault-secrets-operator pod.
70
+ # The value is an array of PodSpec TopologySpreadConstraint maps.
71
+ # A labelSelector for the pods will be added automatically to the template in case it is not set.
72
+ # ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
73
+ # Example:
74
+ # topologySpreadConstraints:
75
+ # - maxSkew: 1
76
+ # topologyKey: zone
77
+ # whenUnsatisfiable: DoNotSchedule
78
+ topologySpreadConstraints : []
79
+
69
80
# Configure the PodDisruptionBudget for the controller deployment.
70
81
podDisruptionBudget :
71
82
You can’t perform that action at this time.
0 commit comments