From cc6fac83d04034b8a8ca556ced418d56449c7a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Mon, 8 Jul 2024 10:48:25 +0200 Subject: [PATCH] feat(helm): allow setting affinity for deployment --- chart/templates/deployment.yaml | 5 +++++ chart/values.yaml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 782a58df..ee6ad901 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -52,6 +52,11 @@ spec: {{ toYaml .Values.nodeSelector | nindent 8 }} {{- end }} + {{- if gt (len .Values.affinity) 0 }} + affinity: + {{ toYaml .Values.affinity | nindent 8 }} + {{- end }} + {{- if $.Values.networking.enabled }} hostNetwork: true {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 041cb4ea..6aa3876e 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -110,6 +110,9 @@ additionalTolerations: [] nodeSelector: {} # node-role.kubernetes.io/control-plane: "" +# Set the affinity for pods. (Only works with kind=Deployment) +affinity: {} + robot: # Set to true to enable support for Robot (Dedicated) servers. enabled: false