Added: affinity parameter

This commit is contained in:
Valeriano Manassero 2023-02-02 11:57:33 +01:00
parent 12baef0d75
commit c387501693
3 changed files with 32 additions and 3 deletions

View File

@ -172,6 +172,17 @@ data:
{{- toYaml . | nindent 10 }} {{- toYaml . | nindent 10 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if $value.templateOverrides.affinity }}
{{- with $value.templateOverrides.affinity }}
affinity:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- else if $.Values.agentk8sglue.basePodTemplate.affinity }}
{{- with $.Values.agentk8sglue.basePodTemplate.affinity }}
affinity:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
secrets.yaml: | secrets.yaml: |
{{- range $key, $value := $.Values.enterpriseFeatures.queues }} {{- range $key, $value := $.Values.enterpriseFeatures.queues }}
@ -250,6 +261,10 @@ data:
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.agentk8sglue.basePodTemplate.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.sessions.portModeEnabled }} {{- if .Values.sessions.portModeEnabled }}
{{- range untilStep 1 ( ( add .Values.sessions.maxServices 1 ) | int ) 1 }} {{- range untilStep 1 ( ( add .Values.sessions.maxServices 1 ) | int ) 1 }}

View File

@ -177,6 +177,14 @@ spec:
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.agentk8sglue.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.agentk8sglue.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes: volumes:
- name: {{ include "clearml.name" . }}-pt - name: {{ include "clearml.name" . }}-pt
configMap: configMap:

View File

@ -82,6 +82,10 @@ agentk8sglue:
# -- nodeSelector setup for Agent pod (example in values.yaml comments) # -- nodeSelector setup for Agent pod (example in values.yaml comments)
nodeSelector: {} nodeSelector: {}
# fleet: agent-nodes # fleet: agent-nodes
# -- tolerations setup for Agent pod (example in values.yaml comments)
tolerations: []
# -- affinity setup for Agent pod (example in values.yaml comments)
affinity: {}
# -- volumes definition for Glue Agent (example in values.yaml comments) # -- volumes definition for Glue Agent (example in values.yaml comments)
volumes: [] volumes: []
# - name: "yourvolume" # - name: "yourvolume"
@ -162,14 +166,16 @@ agentk8sglue:
resources: {} resources: {}
# limits: # limits:
# nvidia.com/gpu: 1 # nvidia.com/gpu: 1
# -- nodeSelector setup for pods spawned to consume ClearML Task (example in values.yaml comments)
nodeSelector: {}
# fleet: gpu-nodes
# -- tolerations setup for pods spawned to consume ClearML Task (example in values.yaml comments) # -- tolerations setup for pods spawned to consume ClearML Task (example in values.yaml comments)
tolerations: [] tolerations: []
# - key: "nvidia.com/gpu" # - key: "nvidia.com/gpu"
# operator: Exists # operator: Exists
# effect: "NoSchedule" # effect: "NoSchedule"
# -- nodeSelector setup for pods spawned to consume ClearML Task (example in values.yaml comments) # -- affinity setup for pods spawned to consume ClearML Task
nodeSelector: {} affinity: {}
# fleet: gpu-nodes
# -- securityContext setup for pods spawned to consume ClearML Task (example in values.yaml comments) # -- securityContext setup for pods spawned to consume ClearML Task (example in values.yaml comments)
securityContext: {} securityContext: {}
# runAsUser: 1001 # runAsUser: 1001