helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

[kube-prometheus-stack] Adding support for Grafana Operator

Open jtyr opened this issue 3 years ago • 7 comments

What this PR does / why we need it:

This PR is adding the possibility to use Grafana Operator instead of the simple Grafana instance. The main driver is to be able to use the GrafanaDashboard and GrafanaDatasource custom resources instead of ConfigMap.

Which issue this PR fixes

  • related to issue #1418

Special notes for your reviewer:

The looks so big because all the auto-generated dashboards from templates/dashboards-1.14 were moved to the top level of the chart and are now shared across the templates/grafana and templates/grafana-operator templates.

Checklist

  • [x] DCO signed
  • [x] Chart Version bumped
  • [x] Title of the PR starts with chart name

jtyr avatar Jun 18 '22 09:06 jtyr

Thank you for your comment, @monotek. You could say the same about the grafana chart as well. The advantage of having the Grafana Operator as a part this chart is that people get automatically configured datasource as well as all the dashboards in their Grafana instance and they can keep extending it through standard GrafanaDataSource and GrafanaDashboard custom resources that goes through CRD validation during the installation. That's something that's hard to achieve through configuration pushed via ConfigMap without any operator or validating wekbook.

jtyr avatar Jun 18 '22 10:06 jtyr

@andrewgkew @bismarck @desaintmartin @gianrubio @gkarthiks @scottrigby @Xtigyro Please could I ask you for your review?

jtyr avatar Jun 21 '22 08:06 jtyr

Adding this optional functionality to the be able to use the custom resources provided by Grafana Operator when using this chart would be a huge advantage.

The current option of disabling Grafana in this chart and adding to the Grafana Operator chart means having to manage the out of the box dashboards. These dashboards are so frequently deployed that end users expect them to be available and doing so separately and keeping them up to date is a problem

dwalker-sabiogroup avatar Jun 21 '22 10:06 dwalker-sabiogroup

@andrewgkew @bismarck @desaintmartin @gianrubio @gkarthiks @scottrigby @Xtigyro Please could review this PR?

jtyr avatar Jun 28 '22 09:06 jtyr

Having Grafana Operator bundled together with a Prometheus Operator will help to address multi-tenanted environments, where at the moment, we need to deploy a separate Grafana Helm chart together with Prometheus CR in order to create a dedicated monitoring stack for every developer team.

Apart from the above, it also unifies the experience of managing all kube-prom-stack resources:

  • Prometheus instances
  • AlertManager instances
  • Grafana instances
  • Prometheus resources: rules, monitors, etc
  • Grafana resources: dashboards, datasources, notification channels

In other words, you're just one CR away from your entire monitoring stack, which hugely simplifies deployment and is one of the main goals of this project.

The other huge benefit I see is the ability to define dashboards via CRD. Apart from automated validation of resources and ease of error discovery through a status field, the user will get the ability to author dashboards with jsonnet, add plugin requirements, map datasources, and manage folders.

vladimir-babichev avatar Jul 01 '22 23:07 vladimir-babichev

@monotek it looks like you are the only person who cares about this Helm chart as the rest of the assigned reviewers don't bother to provide any feedback. Please could you reconsider this PR in regards of the feedback from the community above?

jtyr avatar Jul 05 '22 08:07 jtyr

@monotek @andrewgkew @bismarck @desaintmartin @gianrubio @gkarthiks @scottrigby @Xtigyro Can you guys review and/or comment on this PR? I think this PR will make life easier for many of us, especially for those running heterogeneous (k8s and OpenShift) multi-tenanted environments.

vladimir-babichev avatar Jul 17 '22 22:07 vladimir-babichev

Seems like a valid use-case, maybe we should reconsider this.

Does any grafana-operator users tested the PR chart?

@jtyr @monotek @dwalker-sabiogroup @vladimir-babichev

dotdc avatar Sep 29 '22 21:09 dotdc

I still dislike the idea. The grafana operator can be installed separately easily while disabling the internal grafana with a single value.

Besides the grafana operator is not even maintained by the grafana community and the values.yaml and chart.yaml files of the kube Prometheus chart will be blown up even more with a redundant option.

monotek avatar Sep 29 '22 21:09 monotek

If you don't like the idea, maybe we should close this PR then? Unless there's hope for them? If yes how?

If not, I'll guess they could make a chart with kube-prometheus-stack, grafana-operator and whatever they need on their side.

Both options LGTM

dotdc avatar Sep 29 '22 21:09 dotdc

I'm not a maintainer of the chart, so i would not be in the way if the maintainers think it's a good idea.

monotek avatar Sep 30 '22 13:09 monotek

My bad... I thought you were because it seems you're the most active on this chart/repository.

dotdc avatar Sep 30 '22 14:09 dotdc

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] avatar Oct 30 '22 14:10 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] avatar Dec 04 '22 13:12 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] avatar Jan 05 '23 02:01 stale[bot]

Adding any chart from https://charts.bitnami.com/bitnami as dependency is always a really bad idea.

Bitnami has some retention policies on the chart repository, e.g. they remove older chart version from the repo.

https://github.com/bitnami/charts/issues/10539

At some point, older kube-prometheus-stack version can not be installed anymore, if the grafana-operator version is not longer available.

I personally would not pull the grafana-operator helm chart into this stack.

From my point of view, if kube-prometheus-stack exposes GrafanaDataSource and GrafanaDashboard CR, it would be sufficient to support the Grafana Operator. Users can bundle the installation with an local umbrella chart.

jkroepke avatar Jan 06 '23 09:01 jkroepke

Adding any chart from https://charts.bitnami.com/bitnami as dependency is always a really bad idea. Bitnami has some retention policies on the chart repository, e.g. they remove older chart version from the repo. https://github.com/bitnami/charts/issues/10539 At some point, older kube-prometheus-stack version can not be installed anymore, if the grafana-operator version is not longer available.

I believe it shouldn't be a problem, as helm packages all dependency charts into one single .tgz file. It does so, to specifically resolve dependency management problem.

From my point of view, if kube-prometheus-stack exposes GrafanaDataSource and GrafanaDashboard CR, it would be sufficient to support the Grafana Operator. Users can bundle the installation with an local umbrella chart.

kube-prometheus-stack is an "uber" chart that does everything for you out of the box, hence it makes grafana-operator a perfect fit for it. But for sure, there should be an option to disable operator installation, if somebody would prefer not to deploy one.

vladimir-babichev avatar Jan 06 '23 11:01 vladimir-babichev

The other problem, I personally find, is the lack of prometheus-operator chart that installs the operator itself with its CRDs. Having one would resolve issues like this, as users could create wrapper charts and bundle dependencies according to their needs.

vladimir-babichev avatar Jan 06 '23 11:01 vladimir-babichev

Hi

Has there been any progress on this?

I would like to help get this through. However I would like to move away from the bitnami charts as they don't support arm as of yet.

Edit: I cannot seem to find another non bitnami helm chart

Any thoughts

Thanks

rhysxevans avatar Jan 07 '23 09:01 rhysxevans

@rhysxevans I don't believe there is non-bitnami chart for grafana-operator, but there is an official image published to quay.io that has arm builds.

vladimir-babichev avatar Jan 16 '23 15:01 vladimir-babichev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] avatar Feb 19 '23 13:02 stale[bot]

+1. I'm registering my interest here

DWebb0 avatar Feb 27 '23 16:02 DWebb0

Bitnami has just released arm support for the majority of their images apparently https://blog.bitnami.com/2023/02/bitnami-arm-containers-available-at.html?m=1 and https://hub.docker.com/r/bitnami/grafana-operator/tags

rhysxevans avatar Feb 27 '23 17:02 rhysxevans

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] avatar Apr 02 '23 02:04 stale[bot]

This issue is being automatically closed due to inactivity.

stale[bot] avatar Apr 26 '23 01:04 stale[bot]