Browse Source

Implement podAntiAffinity for nginx

master
Fábio Kaiser Rauber 3 years ago
parent
commit
03027f15fc
  1. 16
      charts/mailproxy/v0.1.0/templates/nginx-deployment.yaml

16
charts/mailproxy/v0.1.0/templates/nginx-deployment.yaml

@ -64,10 +64,20 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "mailproxy.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}

Loading…
Cancel
Save