influxdata / tick-charts

A repository for Helm Charts for the full TICK Stack
Apache License 2.0
90 stars 72 forks source link

Allow for passing influx passwords as secrets #53

Open justinrush opened 6 years ago

justinrush commented 6 years ago

I have a large chart that includes some custom containers and influx and telegraf. We let influx create a random password and all the other charts just read the secret to get the password. It would be helpful if telegraf could read this out of the secret rather than me passing it in raw.

timhallinflux commented 5 years ago

can you set it as an env var?

ivankudibal commented 5 years ago

...k8s secret? Please would you be more specific or provide steps to reproduce?

justinrush commented 5 years ago

Yes, a k8s secret. For example, when influx is deployed, the default secret name is namespace-influxdb-auth. My chart deploys both Influx and Telegraf, it would be great if we could have telegraf reference the namespace-influxdb-auth secret rather than having me pass it in as a string (since I won't know what it is because influx hasn't set it yet)

stanislav-zaprudskiy commented 5 years ago

can you set it as an env var?

Yes, it is possible to make the config file to read values from env vars. But it's not possible to pass these vars to the pod - https://github.com/influxdata/tick-charts/blob/dc5e913d9f789a10e337606d8047c3da54052d8e/telegraf-ds/templates/daemonset.yaml#L25-L41 - current implementation doesn't allow this. Check #56 asking for this.