Token/secret from file #24362
-
QuestionI need to load a secret from file (eg Right now, I've modified the helm chart I'm thinking that maybe there could a generic approach to this (values from files) in vector config processing OR at least in the helm chart. I'd be happy to create a PR if there's some direction on the preferred approach. Vector Configcommand:
- /bin/sh
- -c
- |
export KUBE_TOKEN="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
exec /usr/local/bin/vector --config-dir "/etc/vector/"
customConfig:
sources:
...
pod_metrics:
type: prometheus_scrape
endpoints:
- https://kubernetes.default.svc/api/v1/nodes/$VECTOR_SELF_NODE_NAME/proxy/metrics/cadvisor
auth:
strategy: bearer
token: "$KUBE_TOKEN"
tls:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
...Vector LogsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @fopina, you might want to look into the built in secret management which is likely what you're looking for. |
Beta Was this translation helpful? Give feedback.
Hi @fopina, you might want to look into the built in secret management which is likely what you're looking for.