From 11a499e80d1e573e8cfe54c887d471306c0df199 Mon Sep 17 00:00:00 2001 From: Brendan Dalpe Date: Thu, 28 Dec 2023 09:50:18 -0600 Subject: [PATCH] Copy nodeSelector, affinity, and tolerations from local to remote chart --- .../templates/deployment.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/charts/cloudflare-tunnel-remote/templates/deployment.yaml b/charts/cloudflare-tunnel-remote/templates/deployment.yaml index 354b599..24c507d 100644 --- a/charts/cloudflare-tunnel-remote/templates/deployment.yaml +++ b/charts/cloudflare-tunnel-remote/templates/deployment.yaml @@ -51,3 +51,29 @@ spec: failureThreshold: 1 initialDelaySeconds: 10 periodSeconds: 10 + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + affinity: + {{- with .Values.affinity }} + {{- toYaml . | nindent 8 }} + {{- else }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchExpressions: + {{- range $k, $v := include "cloudflare-tunnel.selectorLabels" . | fromYaml }} + - key: {{ $k }} + operator: In + values: + - {{ $v }} + {{- end }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }}