Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Allow for passing influx passwords as secrets #53

Open
justinrush opened this issue Oct 30, 2018 · 4 comments
Open

Allow for passing influx passwords as secrets #53

justinrush opened this issue Oct 30, 2018 · 4 comments

Comments

@justinrush
Copy link

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
Copy link
Contributor

can you set it as an env var?

@ivankudibal
Copy link

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

@justinrush
Copy link
Author

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
Copy link

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 -

env:
# This pulls HOSTNAME from the node, not the pod.
- name: HOSTNAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
# In test clusters where hostnames are resolved in /etc/hosts on each node,
# the HOSTNAME is not resolvable from inside containers
# So inject the host IP as well
- name: HOSTIP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: "HOST_PROC"
value: "/rootfs/proc"
- name: "HOST_SYS"
value: "/rootfs/sys"
- current implementation doesn't allow this. Check #56 asking for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants