Giter Club home page Giter Club logo

Comments (6)

weisdd avatar weisdd commented on June 8, 2024 1

@jamalaitahmed I think you get this problem simply because you're not redefining settings for grafana container, but, instead, you're adding a test container, where, obviously, an image must be provided, because configuration for extra containers is passed to k8s without changes from the operator side.

apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
  labels:
    dashboards: grafana
  name: test
  namespace: test
spec:
  config:
    auth:
      disable_login_form: 'false'
    log:
      mode: console
  deployment:
    spec:
      template:
        spec:
          containers:
            - env:
                - name: GF_SECURITY_ADMIN_USER
                  valueFrom:
                    secretKeyRef:
                      key: GF_SECURITY_ADMIN_USER
                      name: test
                - name: GF_SECURITY_ADMIN_PASSWORD
                  valueFrom:
                    secretKeyRef:
                      key: GF_SECURITY_ADMIN_PASSWORD
                      name: test
              name: grafana # FIX IS HERE

P.S. You can see grafana container name in the example that @NissesSenap shared, so it's already documented.

from grafana-operator.

NissesSenap avatar NissesSenap commented on June 8, 2024

This is not a bug with GitOps, it's very possible to create a secret using sealed-secrets.
I use custom secrets for my grafana admin user, in my own setup and I have done it ever since version 5 was released.
The issue is that you can't set GF_SECURITY_ADMIN_USER etc. without also setting the container image.

How to do that is documented here: https://grafana.github.io/grafana-operator/docs/examples/grafana_deployment/readme/

I would argue, this isn't a huge issue, since I recommend that everyone always set a custom version of the grafana image. The main reason behind this is that grafana-operator will never be in sync with upstream grafana and minor and patches are constantly getting released by grafana.

But this is definitely a bug, and it should be able to set env variables without also setting the grafana container image.
It's a problem in our merge logic for overwriting settings.
If anyone wants to help out with this, we would love a PR.

from grafana-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.