File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
helm/aws-load-balancer-controller Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ The default values set by the application itself can be confirmed [here](https:/
176
176
| ` priorityClassName ` | Controller pod priority class | system-cluster-critical |
177
177
| ` nodeSelector ` | Node labels for controller pod assignment | ` {} ` |
178
178
| ` tolerations ` | Controller pod toleration for taints | ` {} ` |
179
- | ` affinity ` | Affinity for pod assignment | ` {} ` |
179
+ | ` affinity ` | Affinity for pod assignment (string or map) (soft affinity if string "default", set explicitly if map) | ` default ` |
180
180
| ` topologySpreadConstraints ` | Topology Spread Constraints for pod assignment | ` {} ` |
181
181
| ` podAnnotations ` | Annotations to add to each pod | ` {} ` |
182
182
| ` podLabels ` | Labels to add to each pod | ` {} ` |
Original file line number Diff line number Diff line change @@ -172,10 +172,14 @@ spec:
172
172
nodeSelector :
173
173
{{- toYaml . | nindent 8 }}
174
174
{{- end }}
175
- {{- if .Values.affinity }}
175
+ {{- if kindIs "map" .Values.affinity }}
176
+ {{- with .Values.affinity }}
176
177
affinity :
177
- {{- toYaml .Values.affinity | nindent 8 }}
178
- {{- else }}
178
+ {{- toYaml . | nindent 8 }}
179
+ {{- end }}
180
+ {{- end }}
181
+ {{- if kindIs "string" .Values.affinity }}
182
+ {{- if eq .Values.affinity "default" }}
179
183
affinity :
180
184
podAntiAffinity :
181
185
preferredDuringSchedulingIgnoredDuringExecution :
@@ -189,6 +193,7 @@ spec:
189
193
- {{ include "aws-load-balancer-controller.name" . }}
190
194
topologyKey : kubernetes.io/hostname
191
195
{{- end }}
196
+ {{- end }}
192
197
{{- with .Values.tolerations }}
193
198
tolerations :
194
199
{{- toYaml . | nindent 8 }}
Original file line number Diff line number Diff line change @@ -65,7 +65,15 @@ nodeSelector: {}
65
65
66
66
tolerations : []
67
67
68
- affinity : {}
68
+ # affinity can be either a string or map.
69
+ #
70
+ # if affinity is a string, and if that string is "default", set an antiAffinity policy on
71
+ # the podSpec to prevent colocation on the same node.
72
+ #
73
+ # if affinity is a map, set the affinity attribute on the podSpec with this exact value (do NOT
74
+ # use the default, as described above).
75
+ # affinity: {}
76
+ affinity : default
69
77
70
78
# topologySpreadConstraints is a stable feature of k8s v1.19 which provides the ability to
71
79
# control how Pods are spread across your cluster among failure-domains such as regions, zones,
You can’t perform that action at this time.
0 commit comments