[flant] added nodeselector and tolerations
This commit is contained in:
parent
48fe5993d2
commit
ca74cc5bfc
@ -1,6 +1,3 @@
|
|||||||
{{- $gpuRole := .Values.gpu.nodeRoleKey }}
|
|
||||||
{{- $tolKey := .Values.gpu.tolerationKey }}
|
|
||||||
{{- $tolVal := .Values.gpu.tolerationValue }}
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
@ -31,20 +28,11 @@ spec:
|
|||||||
app: {{ .Chart.Name }}
|
app: {{ .Chart.Name }}
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
weight: 100
|
weight: 100
|
||||||
{{- if $gpuRole }}
|
{{- if and .Values.gpu.enabled .Values.gpu.nodeSelector }}
|
||||||
nodeAffinity:
|
nodeSelector: {{ toYaml .Values.gpu.nodeSelector | nindent 8 }}
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
{{- end }}
|
||||||
nodeSelectorTerms:
|
{{- if and .Values.gpu.enabled .Values.gpu.tolerations }}
|
||||||
- matchExpressions:
|
tolerations: {{ toYaml .Values.gpu.tolerations | nindent 6 }}
|
||||||
- key: {{ $gpuRole | quote }}
|
|
||||||
operator: Exists
|
|
||||||
{{- end }}
|
|
||||||
{{- if and $tolKey $tolVal }}
|
|
||||||
tolerations:
|
|
||||||
- key: {{ $tolKey | quote }}
|
|
||||||
operator: Equal
|
|
||||||
value: {{ $tolVal | quote }}
|
|
||||||
effect: NoExecute
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registrysecret
|
- name: registrysecret
|
||||||
|
|||||||
@ -17,9 +17,14 @@ env:
|
|||||||
TRANSFORMERS_OFFLINE: 1
|
TRANSFORMERS_OFFLINE: 1
|
||||||
|
|
||||||
gpu:
|
gpu:
|
||||||
nodeRoleKey: node-role.deckhouse.io/worker
|
enabled: true
|
||||||
tolerationKey: dedicated
|
nodeSelector:
|
||||||
tolerationValue: ""
|
node-role.deckhouse.io/cuda-worker: ""
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated.deckhouse.io
|
||||||
|
operator: Equal
|
||||||
|
value: cuda-worker
|
||||||
|
effect: NoExecute
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
_default:
|
_default:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user