change postgres settings to import only password from secret

This commit is contained in:
2024-04-19 05:41:38 -06:00
parent 646e3a2c36
commit 1f498323a4
4 changed files with 15 additions and 38 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: kyoo name: kyoo
version: 0.1.8 version: 0.1.9
description: Chart for Kyoo description: Chart for Kyoo
keywords: keywords:
- media - media

View File

@@ -84,30 +84,18 @@ spec:
- name: PUBLIC_URL - name: PUBLIC_URL
value: "{{ .Values.config.publicUrl }}" value: "{{ .Values.config.publicUrl }}"
- name: POSTGRES_USER - name: POSTGRES_USER
valueFrom: value: "{{ .Values.config.postgresql.username }}"
secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.usernameKey }}"
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}" name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.passwordKey }}" key: "{{ .Values.config.postgresql.passwordKey }}"
- name: POSTGRES_DB - name: POSTGRES_DB
valueFrom: value: "{{ .Values.config.postgresql.database }}"
secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.databaseNameKey }}"
- name: POSTGRES_SERVER - name: POSTGRES_SERVER
valueFrom: value: "{{ .Values.config.postgresql.host }}"
secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.hostKey }}"
- name: POSTGRES_PORT - name: POSTGRES_PORT
valueFrom: value: "{{ .Values.config.postgresql.port }}"
secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.portKey }}"
{{ if .Values.config.oidc.enabled }} {{ if .Values.config.oidc.enabled }}
- name: OIDC_SERVICE_NAME - name: OIDC_SERVICE_NAME

View File

@@ -77,30 +77,18 @@ spec:
- name: PUBLIC_URL - name: PUBLIC_URL
value: "{{ .Values.config.publicUrl }}" value: "{{ .Values.config.publicUrl }}"
- name: POSTGRES_USER - name: POSTGRES_USER
valueFrom: value: "{{ .Values.config.postgresql.username }}"
secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.usernameKey }}"
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}" name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.passwordKey }}" key: "{{ .Values.config.postgresql.passwordKey }}"
- name: POSTGRES_DB - name: POSTGRES_DB
valueFrom: value: "{{ .Values.config.postgresql.database }}"
secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.databaseNameKey }}"
- name: POSTGRES_SERVER - name: POSTGRES_SERVER
valueFrom: value: "{{ .Values.config.postgresql.host }}"
secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.hostKey }}"
- name: POSTGRES_PORT - name: POSTGRES_PORT
valueFrom: value: "{{ .Values.config.postgresql.port }}"
secretKeyRef:
name: "{{ .Values.config.postgresql.existingSecretName }}"
key: "{{ .Values.config.postgresql.portKey }}"
{{ if .Values.config.oidc.enabled }} {{ if .Values.config.oidc.enabled }}
- name: OIDC_SERVICE_NAME - name: OIDC_SERVICE_NAME

View File

@@ -112,15 +112,16 @@ config:
secretIDKey: "" secretIDKey: ""
## Postgresql ## Postgresql
## All configuration is expected to be stored in a secret, reference the secret name and each key for the value
## ##
postgresql: postgresql:
username: ""
database: ""
host: ""
port: ""
# -- Use a secret to store the pasword
existingSecretName: "" existingSecretName: ""
usernameKey: ""
passwordKey: "" passwordKey: ""
databaseNameKey: ""
hostKey: ""
portKey: ""
## Configure the ingress resource that allows you to access the ## Configure the ingress resource that allows you to access the
## kyoo installation. Set up the URL ## kyoo installation. Set up the URL