grafana / grafana-operator

An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
https://grafana.github.io/grafana-operator/
Apache License 2.0
863 stars 384 forks source link

HELM: Enable deploying additional objects with helm chart #1607

Closed gitbluf closed 1 month ago

gitbluf commented 2 months ago

Sometimes additional objects are needed, such as ExternalSecret for Grafana api token, (Cilium) Network policies etc.

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

NissesSenap commented 1 month ago

Hi @gitbluf , thanks for your contribution.

This is probably not where I would add Grafana API tokens, I would personally do it in the deployment solution that you have for your grafana instance since they are more tightly coupled. But I agree with networpolicy and similar features.

Please run run make helm/docs to fix the CI and then I will merge the PR.

gitbluf commented 1 month ago

Hi @gitbluf , thanks for your contribution.

This is probably not where I would add Grafana API tokens, I would personally do it in the deployment solution that you have for your grafana instance since they are more tightly coupled. But I agree with networpolicy and similar features.

  • I love the extraObjects in all the grafana related helm charts.

Please run run make helm/docs to fix the CI and then I will merge the PR.

Hi @NissesSenap !

Just did that.

I guess external-secret(or similar) might be used in case you're using AWS Managed Grafana and the token is generated outside of the cluster(during the provisioning of it, which is our use case).

NissesSenap commented 1 month ago

That part if completely understand. But personally, I have 2 deployments:

But you can of course order your yaml how over you want, my recommendation would just be to keep stuff related to your grafan instance together with the grafana deployment. If the secret is missing when the operator tries to create the grafana deployment from the CR, Kubernetes retries will fix that part, so it's not the end of the world if the secret is there or not.

gitbluf commented 1 month ago

@NissesSenap When can we expect this change to be released?