Commit 2aa2d6e4 authored by Angelo Fausti's avatar Angelo Fausti Committed by GitHub

[stable/kapacitor] Use an existing secret for the InfluxDB auth (#19594)

* Use an existing secret for the InfluxDB auth - Sometimes you need to check in the values.yaml in a repo and you don't want to expose the secrets. With the existingSecret option you can use and existing kubernetes secret with the keys `influxdb-user` and `infuxdb-password` to set the corresponding environment variables in Kapacitor. The keys are the same as the ones used in the `influxdb-auth` secret created by the InfluxDB Helm chart. Signed-off-by: 's avatarAngelo Fausti <afausti@lsst.org> * Bump minor version instead Signed-off-by: 's avatarAngelo Fausti <afausti@lsst.org>
parent 38fafc98
apiVersion: v1
name: kapacitor
version: 1.1.4
version: 1.2.0
appVersion: 1.5.2
description: InfluxDB's native data processing engine. It can process both stream
and batch data from InfluxDB.
......
......@@ -62,6 +62,7 @@ The following table lists the configurable parameters of the Kapacitor chart and
| `resources.limits.cpu` | Kapacitor cpu limit | `2` |
| `envVars` | Environment variables to set initial Kapacitor configuration (https://hub.docker.com/_/kapacitor/) | `{}` |
| `influxURL` | InfluxDB url used to interact with Kapacitor (also can be set with ```envVars.KAPACITOR_INFLUXDB_0_URLS_0```) | `http://influxdb-influxdb.tick:8086` |
| `existingSecret` | Name of an existing Secrect used to set the environment variables for the InfluxDB user and password. The expected keys in the secret are `influxdb-user` and `influxdb-password`. |
The configurable parameters of the Kapacitor chart and the default values are listed in `values.yaml`.
......
......@@ -29,6 +29,18 @@ spec:
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- if .Values.existingSecret }}
- name: KAPACITOR_INFLUXDB_0_USERNAME
valueFrom:
secretKeyRef:
key: influxdb-user
name: {{ .Values.existingSecret }}
- name: KAPACITOR_INFLUXDB_0_PASSWORD
valueFrom:
secretKeyRef:
key: influxdb-password
name: {{ .Values.existingSecret }}
{{- end }}
ports:
- containerPort: 9092
volumeMounts:
......
......@@ -60,3 +60,9 @@ resources:
## ref: https://docs.influxdata.com/kapacitor/v1.1/introduction/getting_started/
##
# influxURL: http://influxdb-influxdb.tick:8086
## Name of an existing Secrect used to set the environment variables for the
## InfluxDB user and password. The expected keys in the secret are
## `influxdb-user` and `influxdb-password`.
##
# existingSecret: influxdb-auth
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment