diff --git a/charts/incubator/kopia/Chart.yaml b/charts/incubator/kopia/Chart.yaml index dcfa8416de2..d20dbe98510 100644 --- a/charts/incubator/kopia/Chart.yaml +++ b/charts/incubator/kopia/Chart.yaml @@ -19,7 +19,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/kopia - https://kopia.io/docs/installation/#docker-images - https://github.com/kopia/kopia -version: 6.0.5 +version: 6.0.6 annotations: truecharts.org/catagories: | - utility diff --git a/charts/incubator/kopia/questions.yaml b/charts/incubator/kopia/questions.yaml index c8031adc461..f33b0cf80a2 100644 --- a/charts/incubator/kopia/questions.yaml +++ b/charts/incubator/kopia/questions.yaml @@ -11,42 +11,43 @@ questions: # Include{podSpec} # Include{containerMain} - - variable: kopia - group: App Configuration - label: Kopia Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: user - label: Repo User - schema: - type: string - default: "" - required: true - - variable: password - label: Repo Password - schema: - type: string - default: "" - private: true - required: true - - variable: server_username - label: Server UserName - schema: - type: string - default: "" - required: true - - variable: server_password - label: Server Password - schema: - type: string - default: "" - private: true - required: true - # Include{containerBasic} # Include{containerAdvanced} + + - variable: kopia + group: App Configuration + label: Kopia Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: user + label: Repo User + schema: + type: string + required: true + default: "" + - variable: password + label: Repo Password + schema: + type: string + private: true + required: true + default: "" + - variable: server_username + label: Server User + schema: + type: string + required: true + default: "" + - variable: server_password + label: Server Password + schema: + type: string + private: true + required: true + default: "" + # Include{containerConfig} # Include{podOptions} # Include{serviceRoot} diff --git a/charts/incubator/kopia/templates/_secret.tpl b/charts/incubator/kopia/templates/_secret.tpl deleted file mode 100644 index 2e6a40a02bb..00000000000 --- a/charts/incubator/kopia/templates/_secret.tpl +++ /dev/null @@ -1,10 +0,0 @@ -{{/* Define the secret */}} -{{- define "kopia.secret" -}} - -enabled: true -data: - USER: {{ .Values.kopia.user | default "user" }} - KOPIA_PASSWORD: {{ .Values.kopia.password | default "secret" }} - KOPIA_SERVER_USERNAME: {{ .Values.kopia.server_username | default "server_user" }} - KOPIA_SERVER_PASSWORD: {{ .Values.kopia.server_password | default "server_password" }} -{{- end }} diff --git a/charts/incubator/kopia/templates/_secrets.tpl b/charts/incubator/kopia/templates/_secrets.tpl new file mode 100644 index 00000000000..222ee7dfcfa --- /dev/null +++ b/charts/incubator/kopia/templates/_secrets.tpl @@ -0,0 +1,11 @@ +{{/* Define the secret */}} +{{- define "kopia.secrets" -}} +{{- $secretName := (printf "%s-kopia-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) -}} + +{{- $kopia := .Values.kopia -}} + +enabled: true +data: + USER: {{ $kopia.user | default "user" | quote }} + KOPIA_PASSWORD: {{ $kopia.password | default "secret" | quote }} +{{- end }} diff --git a/charts/incubator/kopia/templates/common.yaml b/charts/incubator/kopia/templates/common.yaml index 8a2de2a0ad8..17dd4a5c77a 100644 --- a/charts/incubator/kopia/templates/common.yaml +++ b/charts/incubator/kopia/templates/common.yaml @@ -2,9 +2,9 @@ {{- include "tc.v1.common.loader.init" . }} {{/* Render secrets for kopia */}} -{{- $secrets := include "kopia.secret" . | fromYaml -}} +{{- $secrets := include "kopia.secrets" . | fromYaml -}} {{- if $secrets -}} -{{- $_ := set .Values.secret "kopia-secret" $secrets -}} + {{- $_ := set .Values.secret "kopia-secrets" $secrets -}} {{- end -}} {{/* Render the templates */}} diff --git a/charts/incubator/kopia/values.yaml b/charts/incubator/kopia/values.yaml index 389f33aa907..dc55d697980 100644 --- a/charts/incubator/kopia/values.yaml +++ b/charts/incubator/kopia/values.yaml @@ -23,7 +23,7 @@ workload: main: envFrom: - secretRef: - name: "kopia-secret" + name: "kopia-secrets" args: - server - start