From a855bddf552b6684205cd0016598f5c40c94a354 Mon Sep 17 00:00:00 2001 From: michaelgloeckner <56082327+michaelgloeckner@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:32:20 +0100 Subject: [PATCH 1/2] add tolerations --- templates/deployment.yaml | 4 ++++ values.yaml | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index a397b6b..095bd50 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -53,6 +53,10 @@ spec: nodeSelector: {{- .Values.global.nodeSelector | toYaml | trim | nindent 8 }} {{- end }} + {{- if .Values.global.tolerations }} + tolerations: + {{- .Values.global.tolerations | toYaml | trim | nindent 8 }} + {{- end }} containers: - name: {{ template "app.fullname" $ }} image: {{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} diff --git a/values.yaml b/values.yaml index a6dc34a..c59200f 100644 --- a/values.yaml +++ b/values.yaml @@ -15,6 +15,14 @@ global: # node selector for the pods nodeSelector: + # tolerations for the pods + tolerations: + - key: "arch" + operator: "Equal" + value: "arm64" + effect: "NoSchedule" + + # Name of the instance, default {{ .Release.Name }}-{{ .Values.name | default .Chart.Name }} name: From fa2942229eaece14f086327ccd0a5a1cfe264ee1 Mon Sep 17 00:00:00 2001 From: michaelgloeckner <56082327+michaelgloeckner@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:42:46 +0100 Subject: [PATCH 2/2] added standard and global tolerations --- templates/deployment.yaml | 7 +++++-- values.yaml | 7 +++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 095bd50..a695b1d 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -53,10 +53,13 @@ spec: nodeSelector: {{- .Values.global.nodeSelector | toYaml | trim | nindent 8 }} {{- end }} - {{- if .Values.global.tolerations }} + {{- if .Values.tolerations }} + nodeSelector: + {{- .Values.tolerations | toYaml | trim | nindent 8 }} + {{- else if .Values.global.tolerations }} tolerations: {{- .Values.global.tolerations | toYaml | trim | nindent 8 }} - {{- end }} + {{- end }} containers: - name: {{ template "app.fullname" $ }} image: {{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} diff --git a/values.yaml b/values.yaml index c59200f..ccc04bd 100644 --- a/values.yaml +++ b/values.yaml @@ -17,10 +17,6 @@ global: # tolerations for the pods tolerations: - - key: "arch" - operator: "Equal" - value: "arm64" - effect: "NoSchedule" # Name of the instance, default {{ .Release.Name }}-{{ .Values.name | default .Chart.Name }} @@ -59,6 +55,9 @@ template: # node selector for the pods nodeSelector: +# tolerations for the pods +tolerations: + # pod pod: port: 8080