From f42017eab12fddd491b67f1a630004e6c00e187e Mon Sep 17 00:00:00 2001 From: Rufina Talalaeva Date: Thu, 31 Aug 2023 10:54:56 +0300 Subject: [PATCH] fix: allow using influxDB credentials from existing secret --- charts/flagsmith/Chart.yaml | 2 +- charts/flagsmith/templates/_api_environment.yaml | 5 +++++ charts/flagsmith/values.yaml | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/flagsmith/Chart.yaml b/charts/flagsmith/Chart.yaml index dc7ed48..443ca70 100644 --- a/charts/flagsmith/Chart.yaml +++ b/charts/flagsmith/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: flagsmith description: Flagsmith type: application -version: 0.22.0 +version: 0.22.1 appVersion: 2.57.0 dependencies: - name: postgresql diff --git a/charts/flagsmith/templates/_api_environment.yaml b/charts/flagsmith/templates/_api_environment.yaml index 3a9da25..433f3c0 100644 --- a/charts/flagsmith/templates/_api_environment.yaml +++ b/charts/flagsmith/templates/_api_environment.yaml @@ -28,8 +28,13 @@ - name: INFLUXDB_TOKEN valueFrom: secretKeyRef: + {{- if .Values.influxdb2.adminUser.existingSecret }} + name: {{ .Values.influxdb2.adminUser.existingSecret }} + key: admin-token + {{- else }} name: {{ template "flagsmith.influxdb.fullname" . }}-auth key: admin-token + {{- end }} {{- else if .Values.influxdbExternal.enabled }} - name: INFLUXDB_URL value: {{ .Values.influxdbExternal.url | required "Must specify a URL for an external InfluxDB" }} diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index c975eac..84caa01 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -246,6 +246,10 @@ influxdb2: ## Or fill any of these values to use fixed values. password: '' token: '' + ## The password and token are obtained from an existing secret. The expected + ## keys are `admin-password` and `admin-token`. + ## If set, the password and token values above are ignored. + existingSecret: null persistence: enabled: false # storageClass: "-"