From 798de3e1c46f8eb8d78e43f5b449667db7049d66 Mon Sep 17 00:00:00 2001 From: Fabio Date: Tue, 21 Mar 2023 11:15:08 -0300 Subject: [PATCH] Try to schedule plone in same server as zeoserver --- .../v0.5.0/templates/plone-deployment.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml b/charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml index 0e7d0d6..c65c16e 100644 --- a/charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml +++ b/charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml @@ -116,6 +116,27 @@ spec: {{- end }} {{- with .Values.affinity }} affinity: + {{- if .Values.instance.zeoclient }} + podAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 50 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - {{ include "portalmodelo.name" . }} + - key: app.kubernetes.io/component + operator: In + values: + - zeoserver + - key: app.kubernetes.io/instance + operator: In + values: + - {{ .Release.Name }} + topologyKey: kubernetes.io/hostname + {{- end }} {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }}