Skip to content

Commit

Permalink
default affinity rules
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-dubnik committed Nov 5, 2021
1 parent 94c771a commit 90edbef
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deployments/charts/kuma/templates/cp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ spec:
{{- with .Values.controlPlane.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- else }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ include "kuma.name" . }}-control-plane
topologyKey: kubernetes.io/hostname
{{- end }}
serviceAccountName: {{ include "kuma.name" . }}-control-plane
{{- with .Values.controlPlane.nodeSelector }}
Expand Down
13 changes: 13 additions & 0 deletions deployments/charts/kuma/templates/ingress-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ spec:
{{- with .Values.ingress.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- else }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- kuma-ingress
topologyKey: kubernetes.io/hostname
{{- end }}
serviceAccountName: {{ include "kuma.name" . }}-ingress
{{- with .Values.ingress.nodeSelector }}
Expand Down

0 comments on commit 90edbef

Please sign in to comment.