diff --git a/charts/saberes/v0.1.0/templates/deployment.yaml b/charts/saberes/v0.1.0/templates/deployment.yaml index 550c24d..2911b4d 100644 --- a/charts/saberes/v0.1.0/templates/deployment.yaml +++ b/charts/saberes/v0.1.0/templates/deployment.yaml @@ -88,10 +88,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 "saberes.name" . }} + - key: app.kubernetes.io/instance + operator: In + values: + - {{ .Release.Name }} + topologyKey: "kubernetes.io/hostname" {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/charts/saberes/v0.1.0/values.yaml b/charts/saberes/v0.1.0/values.yaml index dbc727d..577d44e 100644 --- a/charts/saberes/v0.1.0/values.yaml +++ b/charts/saberes/v0.1.0/values.yaml @@ -73,6 +73,4 @@ autoscaling: nodeSelector: {} -tolerations: [] - -affinity: {} +tolerations: [] \ No newline at end of file