Unverified Commit c043fedf authored by Gustavo's avatar Gustavo Committed by GitHub

feat(influxdb2): add optional values for password and token (#146)

* feat(influxdb2): add optional values for password and token to avoid random values generation. * bump Chart.yaml version
parent 715175a4
......@@ -5,7 +5,7 @@ name: influxdb2
description: A Helm chart for InfluxDB v2
home: https://www.influxdata.com/products/influxdb-overview/influxdb-2-0/
type: application
version: 1.0.4
version: 1.0.5
maintainers:
- name: rawkode
email: rawkode@influxdata.com
......
......@@ -48,4 +48,8 @@ The [InfluxDB](https://quay.io/influxdb/influxdb:2.0.0-beta) image stores data i
If persistence is enabled, a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) associated with StatefulSet is provisioned. The volume is created using dynamic volume provisioning. In case of a disruption (for example, a node drain), Kubernetes ensures that the same volume is reattached to the Pod, preventing any data loss. However, when persistence is **not enabled**, InfluxDB data is stored in an empty directory, so if a Pod restarts, data is lost.
Check out our [Slack channel](https://www.influxdata.com/slack) for support and information.
\ No newline at end of file
Check out our [Slack channel](https://www.influxdata.com/slack) for support and information.
## Fixed Auth Credentials
If you need to use fixed token and/or password you can fill `adminUser.password` and `adminUser.token` on your values file to avoid using random values generation.
......@@ -5,5 +5,14 @@ metadata:
{{- include "influxdb.labels" . | nindent 4 }}
name: {{ template "influxdb.fullname" . }}-auth
data:
admin-password: {{ randAlphaNum 32 | b64enc | quote }}
{{- if .Values.adminUser.token }}
admin-token: {{ .Values.adminUser.token | b64enc | quote }}
{{- else }}
admin-token: {{ randAlphaNum 32 | b64enc | quote }}
{{- end }}
{{- if .Values.adminUser.password }}
admin-password: {{ .Values.adminUser.password | b64enc | quote }}
{{- else }}
admin-password: {{ randAlphaNum 32 | b64enc | quote }}
{{- end }}
......@@ -30,6 +30,10 @@ adminUser:
organization: "influxdata"
bucket: "default"
user: "admin"
## Leave empty to generate a random password and token.
## Or fill any of these values to use fixed values.
password: ""
token: ""
## Persist data to a persistent volume
##
......
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