suxess-it / kubriX

https://kubrix.io
19 stars 3 forks source link

[grafana] prune datasources #855

Open jkleinlercher opened 5 days ago

jkleinlercher commented 5 days ago

grafana datasources are searched via sidecar via config https://github.com/grafana/helm-charts/blob/aa5f26297b7d61eb2f8bd29dff938f293ea86dee/charts/grafana/values.yaml#L1048

however, deleted datasource secrets doesn't mean they get pruned in grafana. Is their an additional config needed or is this a missing feature?

jkleinlercher commented 5 days ago

This seems to be the solution but a little bit weird (imperative vs descriptive) to list datasources which should get deleted

https://github.com/grafana/helm-charts/issues/898

jkleinlercher commented 5 days ago

Better: https://grafana.com/docs/grafana/latest/administration/provisioning/

You can configure Grafana to automatically delete provisioned data sources when they’re removed from the provisioning file. To do so, add prune: true to the root of your provisioning file. With this configuration, Grafana also removes the provisioned data sources if you remove the provisioning file entirely.