diff --git a/charts/incubator/kopia/Chart.yaml b/charts/incubator/kopia/Chart.yaml index 545f241c922..3f8737c2239 100644 --- a/charts/incubator/kopia/Chart.yaml +++ b/charts/incubator/kopia/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v2 -appVersion: "0.12.1" +appVersion: "0.13.0" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 12.13.0 description: Kopia is a simple, cross-platform tool for managing encrypted backups in the cloud. It provides fast, incremental backups, secure, client-side end-to-end encryption, compression and data deduplication. home: https://truecharts.org/charts/incubator/kopia icon: https://truecharts.org/img/hotlink-ok/chart-icons/kopia.png @@ -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: 5.0.0 +version: 6.0.0 annotations: truecharts.org/catagories: | - utility diff --git a/charts/incubator/kopia/ci/test-values.yaml b/charts/incubator/kopia/ci/test-values.yaml new file mode 100644 index 00000000000..3d8a16608ab --- /dev/null +++ b/charts/incubator/kopia/ci/test-values.yaml @@ -0,0 +1,10 @@ +workload: + main: + podSpec: + containers: + main: + args: + - server + - start + - --address=http://0.0.0.0:10238 + - --insecure diff --git a/charts/incubator/kopia/questions.yaml b/charts/incubator/kopia/questions.yaml index 9b2e61d1974..3c6168ae978 100644 --- a/charts/incubator/kopia/questions.yaml +++ b/charts/incubator/kopia/questions.yaml @@ -11,19 +11,26 @@ questions: # Include{podSpec} # Include{containerMain} - - variable: env + - variable: kopia group: "App Configuration" label: "Image Environment" schema: additional_attrs: true type: dict attrs: + - variable: USER + label: "Kopia User" + description: "Repository user" + schema: + type: string + default: "secret" + required: true - variable: KOPIA_PASSWORD label: "KOPIA_PASSWORD" description: "Repository password" schema: type: string - default: "" + default: "secret" required: true private: true - variable: KOPIA_SERVER_USERNAME @@ -31,14 +38,14 @@ questions: description: "Username for WebUI" schema: type: string - default: "" + default: "server_user" required: true - variable: KOPIA_SERVER_PASSWORD label: "KOPIA_SERVER_PASSWORD" description: "Password for WebUI" schema: type: string - default: "" + default: "server_password" required: true private: true # Include{containerBasic} diff --git a/charts/incubator/kopia/templates/NOTES.txt b/charts/incubator/kopia/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/kopia/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/kopia/templates/_secret.tpl b/charts/incubator/kopia/templates/_secret.tpl new file mode 100644 index 00000000000..a9753ada237 --- /dev/null +++ b/charts/incubator/kopia/templates/_secret.tpl @@ -0,0 +1,10 @@ +{{/* 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_password | default "server_user" }} + KOPIA_SERVER_PASSWORD: {{ .Values.kopia.server_password | default "server_password" }} +{{- end }} diff --git a/charts/incubator/kopia/templates/common.yaml b/charts/incubator/kopia/templates/common.yaml index c1a366e1cf0..8a2de2a0ad8 100644 --- a/charts/incubator/kopia/templates/common.yaml +++ b/charts/incubator/kopia/templates/common.yaml @@ -1 +1,11 @@ -{{ include "tc.common.loader.all" . }} +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} + +{{/* Render secrets for kopia */}} +{{- $secrets := include "kopia.secret" . | fromYaml -}} +{{- if $secrets -}} +{{- $_ := set .Values.secret "kopia-secret" $secrets -}} +{{- end -}} + +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/kopia/values.yaml b/charts/incubator/kopia/values.yaml index 0d4271e3730..367e571c905 100644 --- a/charts/incubator/kopia/values.yaml +++ b/charts/incubator/kopia/values.yaml @@ -1,19 +1,44 @@ image: repository: tccr.io/truecharts/kopia - tag: 0.12.1@sha256:8f1c82292cf0c2271be78a9ede514858ba16a80c9105d258aabbde899dd7f1eb + tag: 0.13.0@sha256:72ed1856efdd443be31e23535d24242056639a387587aa3ade5413e75dad0603 pullPolicy: IfNotPresent -extraArgs: ["server", "--address=http://0.0.0.0:10238", "--ui", "--insecure"] -secretEnv: - KOPIA_PASSWORD: "" - KOPIA_SERVER_USERNAME: "user" - KOPIA_SERVER_PASSWORD: "password" + +workload: + main: + podSpec: + containers: + main: + envFrom: + - secretRef: + name: "kopia-secret" + args: + - server + - start + - --address=http://0.0.0.0:10238 + - --insecure + - --server-username={{ .Values.kopia.server_username }} + - --server-password={{ .Values.kopia.server_password }} + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false + +kopia: + kopia_user: "user" + kopia_password: "secret" + kopia_server_username: "user" + kopia_server_password: "password" service: main: ports: main: + protocol: http port: 10238 persistence: @@ -31,4 +56,5 @@ persistence: mountPath: "/app/rclone" portal: - enabled: true + open: + enabled: true