From d3275f80678c15fb88a765eb63cfab3a76b5cd9e Mon Sep 17 00:00:00 2001 From: alexlebens Date: Fri, 19 Apr 2024 04:58:46 -0600 Subject: [PATCH] create switch if various api keys are provided --- charts/kyoo/Chart.yaml | 2 +- charts/kyoo/templates/deployment-matcher.yaml | 7 +++++++ charts/kyoo/templates/deployment-scanner.yaml | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/charts/kyoo/Chart.yaml b/charts/kyoo/Chart.yaml index 1dbf641..60e133a 100644 --- a/charts/kyoo/Chart.yaml +++ b/charts/kyoo/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: kyoo -version: 0.1.3 +version: 0.1.4 description: Chart for Kyoo keywords: - media diff --git a/charts/kyoo/templates/deployment-matcher.yaml b/charts/kyoo/templates/deployment-matcher.yaml index cc34573..dac4394 100644 --- a/charts/kyoo/templates/deployment-matcher.yaml +++ b/charts/kyoo/templates/deployment-matcher.yaml @@ -62,16 +62,23 @@ spec: - name: KYOO_URL value: http://{{ template "kyoo.fullname" . }}-back.{{ .Release.Namespace }}:{{ .Values.back.service.port }} + + {{- if .Values.config.secretAPIKey.existingKyooSecretKey }} - name: KYOO_APIKEYS valueFrom: secretKeyRef: name: "{{ .Values.config.secretAPIKey.existingSecretName }}" key: "{{ .Values.config.secretAPIKey.existingKyooSecretKey }}" + {{- end }} + + {{- if .Values.config.secretAPIKey.existingTMDBSecretKey }} - name: THEMOVIEDB_APIKEY valueFrom: secretKeyRef: name: "{{ .Values.config.secretAPIKey.existingSecretName }}" key: "{{ .Values.config.secretAPIKey.existingTMDBSecretKey }}" + {{- end }} + - name: LIBRARY_LANGUAGES value: "{{ .Values.config.libraryLanguages }}" - name: RABBITMQ_HOST diff --git a/charts/kyoo/templates/deployment-scanner.yaml b/charts/kyoo/templates/deployment-scanner.yaml index acc318a..67a5a0d 100644 --- a/charts/kyoo/templates/deployment-scanner.yaml +++ b/charts/kyoo/templates/deployment-scanner.yaml @@ -65,16 +65,23 @@ spec: - name: KYOO_URL value: http://{{ template "kyoo.fullname" . }}-back.{{ .Release.Namespace }}:{{ .Values.back.service.port }} + + {{- if .Values.config.secretAPIKey.existingKyooSecretKey }} - name: KYOO_APIKEYS valueFrom: secretKeyRef: name: "{{ .Values.config.secretAPIKey.existingSecretName }}" key: "{{ .Values.config.secretAPIKey.existingKyooSecretKey }}" + {{- end }} + + {{- if .Values.config.secretAPIKey.existingTMDBSecretKey }} - name: THEMOVIEDB_APIKEY valueFrom: secretKeyRef: name: "{{ .Values.config.secretAPIKey.existingSecretName }}" key: "{{ .Values.config.secretAPIKey.existingTMDBSecretKey }}" + {{- end }} + - name: LIBRARY_LANGUAGES value: "{{ .Values.config.libraryLanguages }}" - name: LIBRARY_IGNORE_PATTERN