From 1f498323a4fa7b85e4d8796c2497f6d2471cc96a Mon Sep 17 00:00:00 2001 From: alexlebens Date: Fri, 19 Apr 2024 05:41:38 -0600 Subject: [PATCH] change postgres settings to import only password from secret --- charts/kyoo/Chart.yaml | 2 +- charts/kyoo/templates/deployment-back.yaml | 20 ++++--------------- .../kyoo/templates/deployment-migrations.yaml | 20 ++++--------------- charts/kyoo/values.yaml | 11 +++++----- 4 files changed, 15 insertions(+), 38 deletions(-) diff --git a/charts/kyoo/Chart.yaml b/charts/kyoo/Chart.yaml index 1fc373b..9e20cd1 100644 --- a/charts/kyoo/Chart.yaml +++ b/charts/kyoo/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: kyoo -version: 0.1.8 +version: 0.1.9 description: Chart for Kyoo keywords: - media diff --git a/charts/kyoo/templates/deployment-back.yaml b/charts/kyoo/templates/deployment-back.yaml index 7ca0e5c..4d1b116 100644 --- a/charts/kyoo/templates/deployment-back.yaml +++ b/charts/kyoo/templates/deployment-back.yaml @@ -84,30 +84,18 @@ spec: - name: PUBLIC_URL value: "{{ .Values.config.publicUrl }}" - name: POSTGRES_USER - valueFrom: - secretKeyRef: - name: "{{ .Values.config.postgresql.existingSecretName }}" - key: "{{ .Values.config.postgresql.usernameKey }}" + value: "{{ .Values.config.postgresql.username }}" - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: "{{ .Values.config.postgresql.existingSecretName }}" key: "{{ .Values.config.postgresql.passwordKey }}" - name: POSTGRES_DB - valueFrom: - secretKeyRef: - name: "{{ .Values.config.postgresql.existingSecretName }}" - key: "{{ .Values.config.postgresql.databaseNameKey }}" + value: "{{ .Values.config.postgresql.database }}" - name: POSTGRES_SERVER - valueFrom: - secretKeyRef: - name: "{{ .Values.config.postgresql.existingSecretName }}" - key: "{{ .Values.config.postgresql.hostKey }}" + value: "{{ .Values.config.postgresql.host }}" - name: POSTGRES_PORT - valueFrom: - secretKeyRef: - name: "{{ .Values.config.postgresql.existingSecretName }}" - key: "{{ .Values.config.postgresql.portKey }}" + value: "{{ .Values.config.postgresql.port }}" {{ if .Values.config.oidc.enabled }} - name: OIDC_SERVICE_NAME diff --git a/charts/kyoo/templates/deployment-migrations.yaml b/charts/kyoo/templates/deployment-migrations.yaml index 6003dab..e92789c 100644 --- a/charts/kyoo/templates/deployment-migrations.yaml +++ b/charts/kyoo/templates/deployment-migrations.yaml @@ -77,30 +77,18 @@ spec: - name: PUBLIC_URL value: "{{ .Values.config.publicUrl }}" - name: POSTGRES_USER - valueFrom: - secretKeyRef: - name: "{{ .Values.config.postgresql.existingSecretName }}" - key: "{{ .Values.config.postgresql.usernameKey }}" + value: "{{ .Values.config.postgresql.username }}" - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: "{{ .Values.config.postgresql.existingSecretName }}" key: "{{ .Values.config.postgresql.passwordKey }}" - name: POSTGRES_DB - valueFrom: - secretKeyRef: - name: "{{ .Values.config.postgresql.existingSecretName }}" - key: "{{ .Values.config.postgresql.databaseNameKey }}" + value: "{{ .Values.config.postgresql.database }}" - name: POSTGRES_SERVER - valueFrom: - secretKeyRef: - name: "{{ .Values.config.postgresql.existingSecretName }}" - key: "{{ .Values.config.postgresql.hostKey }}" + value: "{{ .Values.config.postgresql.host }}" - name: POSTGRES_PORT - valueFrom: - secretKeyRef: - name: "{{ .Values.config.postgresql.existingSecretName }}" - key: "{{ .Values.config.postgresql.portKey }}" + value: "{{ .Values.config.postgresql.port }}" {{ if .Values.config.oidc.enabled }} - name: OIDC_SERVICE_NAME diff --git a/charts/kyoo/values.yaml b/charts/kyoo/values.yaml index 6d3ddf4..a0f71a2 100644 --- a/charts/kyoo/values.yaml +++ b/charts/kyoo/values.yaml @@ -112,15 +112,16 @@ config: secretIDKey: "" ## Postgresql - ## All configuration is expected to be stored in a secret, reference the secret name and each key for the value ## postgresql: + username: "" + database: "" + host: "" + port: "" + + # -- Use a secret to store the pasword existingSecretName: "" - usernameKey: "" passwordKey: "" - databaseNameKey: "" - hostKey: "" - portKey: "" ## Configure the ingress resource that allows you to access the ## kyoo installation. Set up the URL