Commit 11a60b88 by michelia feng Committed by Craig Jellick

Added linux node tolerations

parent 296f2ecc
...@@ -75,7 +75,8 @@ spec: ...@@ -75,7 +75,8 @@ spec:
matchLabels: matchLabels:
app: {{ template "app.name" . }} app: {{ template "app.name" . }}
alertmanager: {{ .Release.Name }} alertmanager: {{ .Release.Name }}
{{- if .Values.tolerations }}
tolerations: tolerations:
{{- include "linux-node-tolerations" . | nindent 8 }}
{{- if .Values.tolerations }}
{{ toYaml .Values.tolerations | indent 4 }} {{ toYaml .Values.tolerations | indent 4 }}
{{- end }} {{- end }}
...@@ -50,8 +50,9 @@ spec: ...@@ -50,8 +50,9 @@ spec:
securityContext: securityContext:
{{ toYaml .Values.securityContext | indent 8 }} {{ toYaml .Values.securityContext | indent 8 }}
{{- end }} {{- end }}
{{- if .Values.tolerations }}
tolerations: tolerations:
{{- include "linux-node-tolerations" . | nindent 8}}
{{- if .Values.tolerations }}
{{ toYaml .Values.tolerations | indent 8 }} {{ toYaml .Values.tolerations | indent 8 }}
{{- end }} {{- end }}
nodeSelector: nodeSelector:
......
...@@ -123,8 +123,9 @@ spec: ...@@ -123,8 +123,9 @@ spec:
{{- if .Values.enabledRBAC }} {{- if .Values.enabledRBAC }}
serviceAccountName: {{ default (default (include "app.fullname" .) .Values.serviceAccountName) .Values.serviceAccountNameOverride }} serviceAccountName: {{ default (default (include "app.fullname" .) .Values.serviceAccountName) .Values.serviceAccountNameOverride }}
{{- end }} {{- end }}
{{- if .Values.tolerations }}
tolerations: tolerations:
{{- include "linux-node-tolerations" . | nindent 8 }}
{{- if .Values.tolerations }}
{{ toYaml .Values.tolerations | indent 8 }} {{ toYaml .Values.tolerations | indent 8 }}
{{- end }} {{- end }}
securityContext: securityContext:
......
...@@ -69,7 +69,8 @@ spec: ...@@ -69,7 +69,8 @@ spec:
{{- if .Values.enabledRBAC }} {{- if .Values.enabledRBAC }}
serviceAccountName: {{ default (include "app.fullname" .) .Values.serviceAccountName }} serviceAccountName: {{ default (include "app.fullname" .) .Values.serviceAccountName }}
{{- end }} {{- end }}
{{- if .Values.tolerations }}
tolerations: tolerations:
{{- include "linux-node-tolerations" . | nindent 8 }}
{{- if .Values.tolerations }}
{{ toYaml .Values.tolerations | indent 8 }} {{ toYaml .Values.tolerations | indent 8 }}
{{- end }} {{- end }}
...@@ -182,8 +182,9 @@ spec: ...@@ -182,8 +182,9 @@ spec:
matchLabels: matchLabels:
app: {{ template "app.name" . }} app: {{ template "app.name" . }}
prometheus: {{ .Release.Name }} prometheus: {{ .Release.Name }}
{{- if .Values.tolerations }}
tolerations: tolerations:
{{- include "linux-node-tolerations" . | nindent 4}}
{{- if .Values.tolerations }}
{{ toYaml .Values.tolerations | indent 4 }} {{ toYaml .Values.tolerations | indent 4 }}
{{- end }} {{- end }}
{{- if (include "additional-scrape-configs.yaml" .) }} {{- if (include "additional-scrape-configs.yaml" .) }}
......
...@@ -126,3 +126,14 @@ ...@@ -126,3 +126,14 @@
{{- "" -}} {{- "" -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/*
Windows cluster will add default taint for linux nodes,
add below linux tolerations to workloads could be scheduled to those linux nodes
*/}}
{{- define "linux-node-tolerations" -}}
- key: "cattle.io/os"
value: "linux"
effect: "NoSchedule"
operator: "Equal"
{{- end -}}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment