use config as secret

This commit is contained in:
Uzmar Gomez 2024-05-13 15:31:17 +01:00
parent 65393cd4bf
commit dd56a6732d
2 changed files with 20 additions and 3 deletions

View File

@ -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

View File

@ -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: |-