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 ...@@ -5,7 +5,7 @@ name: influxdb2
description: A Helm chart for InfluxDB v2 description: A Helm chart for InfluxDB v2
home: https://www.influxdata.com/products/influxdb-overview/influxdb-2-0/ home: https://www.influxdata.com/products/influxdb-overview/influxdb-2-0/
type: application type: application
version: 1.0.4 version: 1.0.5
maintainers: maintainers:
- name: rawkode - name: rawkode
email: rawkode@influxdata.com email: rawkode@influxdata.com
......
...@@ -49,3 +49,7 @@ The [InfluxDB](https://quay.io/influxdb/influxdb:2.0.0-beta) image stores data i ...@@ -49,3 +49,7 @@ 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. 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. 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: ...@@ -5,5 +5,14 @@ metadata:
{{- include "influxdb.labels" . | nindent 4 }} {{- include "influxdb.labels" . | nindent 4 }}
name: {{ template "influxdb.fullname" . }}-auth name: {{ template "influxdb.fullname" . }}-auth
data: 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 }} 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: ...@@ -30,6 +30,10 @@ adminUser:
organization: "influxdata" organization: "influxdata"
bucket: "default" bucket: "default"
user: "admin" 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 ## 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