Browse Source

Implemented saberes app pod antiaffinity

master
Fábio Kaiser Rauber 3 years ago
parent
commit
3c11c6cdaf
  1. 16
      charts/saberes/v0.1.0/templates/deployment.yaml
  2. 2
      charts/saberes/v0.1.0/values.yaml

16
charts/saberes/v0.1.0/templates/deployment.yaml

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

2
charts/saberes/v0.1.0/values.yaml

@ -74,5 +74,3 @@ autoscaling:
nodeSelector: {} nodeSelector: {}
tolerations: [] tolerations: []
affinity: {}

Loading…
Cancel
Save