pyrra-dev / pyrra

Making SLOs with Prometheus manageable, accessible, and easy to use for everyone!
https://demo.pyrra.dev
Apache License 2.0
1.23k stars 110 forks source link

Environment variables support in Pyrra #1117

Open lukasmrtvy opened 7 months ago

lukasmrtvy commented 7 months ago

Would be great to support env vars in Pyrra, for example:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pyrra-api
  namespace: monitoring
spec:
  template:
    spec:
      containers:
        - name: pyrra
          env:
          - name: PASSWORD
            valueFrom:
              secretKeyRef:
                name: secrets
                key: password
          args:
            - api
            - --log-level=info
            - --prometheus-url=http://mimir-gateway.mimir:80/prometheus
            - --prometheus-basic-auth-password=$PASSWORD
            - --prometheus-basic-auth-username=mimir
            - --api-url=http://pyrra-kubernetes:9444
metalmatze commented 7 months ago

We could implement something like that, however, just like Prometheus, I'm in favour to use files containing passwords. Do you think using files would work too?