diff --git a/charts/clearml-agent/templates/agentk8sglue-deployment.yaml b/charts/clearml-agent/templates/agentk8sglue-deployment.yaml index 713348d..f5bf546 100644 --- a/charts/clearml-agent/templates/agentk8sglue-deployment.yaml +++ b/charts/clearml-agent/templates/agentk8sglue-deployment.yaml @@ -67,7 +67,7 @@ spec: volumeMounts: - name: {{ include "clearmlAgent.fullname" . }}-pt mountPath: /root/template - {{ if .Values.clearml.clearmlConfig }} + {{ if or (.Values.clearml.clearmlConfig) (.Values.clearml.existingClearmlConfigSecret) }} - name: k8sagent-clearml-conf-volume mountPath: /root/clearml.conf subPath: clearml.conf @@ -103,7 +103,7 @@ spec: - name: K8S_GLUE_EXTRA_ARGS value: "--namespace {{ .Release.Namespace }} --template-yaml /root/template/template.yaml" {{- end }} - {{- if .Values.clearml.clearmlConfig }} + {{ if or (.Values.clearml.clearmlConfig) (.Values.clearml.existingClearmlConfigSecret) }} - name: CLEARML_CONFIG_FILE value: /root/clearml.conf {{- end }} @@ -160,7 +160,14 @@ spec: - name: {{ include "clearmlAgent.fullname" . }}-pt configMap: name: {{ include "clearmlAgent.fullname" . }}-pt - {{ if .Values.clearml.clearmlConfig }} + {{ if .Values.clearml.existingClearmlConfigSecret }} + - name: k8sagent-clearml-conf-volume + secret: + secretName: {{ .Values.clearml.existingClearmlConfigSecret }} + items: + - key: clearml.conf + path: clearml.conf + {{ else if .Values.clearml.clearmlConfig }} - name: k8sagent-clearml-conf-volume secret: secretName: {{ include "clearmlAgent.fullname" . }}-ac diff --git a/charts/clearml-agent/values.yaml b/charts/clearml-agent/values.yaml index 68b9a0a..43d12b0 100644 --- a/charts/clearml-agent/values.yaml +++ b/charts/clearml-agent/values.yaml @@ -28,6 +28,16 @@ clearml: agentk8sglueSecret: "SECRETKEY" # -- If this is set, chart will not generate a secret but will use what is defined here + # The secret should be defined as the following example + # + # apiVersion: v1 + # kind: Secret + # metadata: + # name: secret-name + # stringData: + # clearml.conf: |- + # sdk { + # } existingClearmlConfigSecret: "" # -- ClearML configuration file clearmlConfig: |-