I can’t find any documentation on this, and it’s very possible it’s just my admittedly limited understanding of helm.
I’m simply trying to use basic auth to connect to the Loki instance while using a Kubernetes secret instead of plaintext credentials in the helm values
This works perfect:
snippets:
extraClientConfigs: |
basic_auth:
username: myusername
password: mypassword
I created a secret like this:
kubectl create secret generic loki-credentials -n monitoring --from-literal=password="mypassword" --from-literal=username="myusername"
and now I want to use that in the values.yaml file.
This is what I got so far:
extraEnv:
- name: LOKI_USERNAME
valueFrom:
secretKeyRef:
name: loki-credentials
key: username
- name: LOKI_PASSWORD
valueFrom:
secretKeyRef:
name: loki-credentials
key: password
extraArgs:
- -client.external-labels=stack=development
- -config.expand-env=true
config:
serverPort: 3101
lokiAddress: myurl
snippets:
extraClientConfigs: |
basic_auth:
username: ${LOKI_USERNAME}
password: ${LOKI_PASSWORD}
Chart version: 3.1.0
Promtail version: 2.1.0
Any help would be much appreciated!