bitnamicharts/grafana-operator

Verified Publisher

By VMware

Updated 11 months ago

Bitnami Helm chart for Grafana Operator

Helm
Image
Languages & frameworks
Integration & delivery
Monitoring & observability
0

1M+

bitnamicharts/grafana-operator repository overview

Bitnami Secure Images Helm chart for Grafana Operator

Grafana Operator is a Kubernetes operator that enables the installation and management of Grafana instances, dashboards and plugins.

Overview of Grafana Operator

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

TL;DR

helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/grafana-operator

Note: You need to substitute the placeholders REGISTRY_NAME and REPOSITORY_NAME with a reference to your Helm chart registry and repository.

Introduction

Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.

This chart bootstraps a Grafana Operator Deployment Kubernetes cluster using the Helm package manager.

Differences between the Bitnami Grafana chart and the Bitnami Grafana Operator chart

The Bitnami catalog offers both the bitnami/grafana and bitnami/grafana-operator charts. Each solution covers different needs and use cases.

  • The bitnami/grafana chart deploys a single Grafana installation (with Grafana Image Renderer) using a Kubernetes Deployment object (together with Services, PVCs, ConfigMaps, etc.). Its lifecycle is managed using Helm and, at the Grafana container level, the following operations are automated: persistence management, configuration based on environment variables and plugin initialization. The chart also allows deploying dashboards and data sources using ConfigMaps. The Deployments do not require any ServiceAccounts with special RBAC privileges so this solution would fit better in more restricted Kubernetes installations.
                    +--------------+             +-----+
                    |              |             |     |
 Service & Ingress  |    Grafana   +<------------+ PVC |
<-------------------+              |             |     |
                    |  Deployment  |             +-----+
                    |              |
                    +-----------+--+
                                ^                +------------+
                                |                |            |
                                +----------------+ Configmaps |
                                                 |   Secrets  |
                                                 |            |
                                                 +------------+

  • The bitnami/grafana-operator chart deploys a Grafana Operator installation using a Kubernetes Deployment. The operator will extend the Kubernetes API with the following objects: Grafana, GrafanaDashboard and GrafanaDataSource. From that moment, the user will be able to deploy objects of these kinds and the previously deployed Operator will take care of deploying all the required Deployments, ConfigMaps and Services for running a Grafana instance. Its lifecycle is managed using kubectl on the Grafana, GrafanaDashboard and GrafanaDataSource objects.
+--------------------+
|                    |      +---------------+
|  Grafana Operator  |      |               |
|                    |      |     RBAC      |
|    Deployment      |      |   Privileges  |
|                    |      |               |
+-------+------------+      +-------+-------+
        ^                           |
        |   +-----------------+     |
        +---+ Service Account +<----+
            +-----------------+

The following figure shows the deployed objects after deploying a Grafana object using kubectl:

+--------------------+
|                    |      +---------------+
|  Grafana Operator  |      |               |
|                    |      |     RBAC      |
|    Deployment      |      |   Privileges  |
|                    |      |               |
+--+----+------------+      +-------+-------+
   |    ^                           |
   |    |   +-----------------+     |
   |    +---+ Service Account +<----+
   |        +-----------------+
   |
   |
   |
   |
   |                                                   Grafana
   |                     +---------------------------------------------------------------------------+
   |                     |                                                                           |
   |                     |                          +--------------+             +-----+             |
   |                     |                          |              |             |     |             |
   +-------------------->+       Service & Ingress  |    Grafana   +<------------+ PVC |             |
                         |      <-------------------+              |             |     |             |
                         |                          |  Deployment  |             +-----+             |
                         |                          |              |                                 |
                         |                          +-----------+--+                                 |
                         |                                      ^                +------------+      |
                         |                                      |                |            |      |
                         |                                      +----------------+ Configmaps |      |
                         |                                                       |   Secrets  |      |
                         |                                                       |            |      |
                         |                                                       +------------+      |
                         |                                                                           |
                         +---------------------------------------------------------------------------+

Note: As the operator automatically deploys Grafana installations, the Grafana Operator pods will require a ServiceAccount with privileges to create and destroy multiple Kubernetes objects. This may be problematic for Kubernetes clusters with strict role-based access policies.

Before you begin

  • Kubernetes 1.23+
  • Helm 3.8.0+

Installing the Chart

To install the chart with the release name my-release:

helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/grafana-operator

Note: You need to substitute the placeholders REGISTRY_NAME and REPOSITORY_NAME with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use REGISTRY_NAME=registry-1.docker.io and REPOSITORY_NAME=bitnamicharts.

These commands deploy grafana-operator on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Configuration and installation details

This section describes credentials, configuration, and other installation options.

Resource requests and limits

Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.

To make this process easier, the chart contains the resourcesPreset values, which automatically sets the resources section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.

Rolling vs Immutable tags

It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.

Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.

Backup and restore

To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.

Prometheus metrics

This chart exposes Prometheus metrics by default with a metrics service, which has the necessary annotations to be automatically scraped by Prometheus.

Prometheus requirements

It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the Bitnami Prometheus helm chart or the Bitnami Kube Prometheus helm chart to easily have a working Prometheus in your cluster.

Integration with Prometheus Operator

The chart can deploy ServiceMonitor objects for integration with Prometheus Operator installations. To do so, set the value operator.prometheus.serviceMonitor.enabled=true. Ensure that the Prometheus Operator CustomResourceDefinitions are installed in the cluster or it will fail with the following error:

no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"

Install the Bitnami Kube Prometheus helm chart for having the necessary CRDs and the Prometheus Operator.

Create Grafana Dashboards

After the installation, create Dashboards under a CRD of your Kubernetes cluster.

For more details regarding what is possible with those CRDs please have a look at Working with Dashboards.

Deploy extra Grafana resources or objects

There are cases where you may want to deploy extra objects, such as custom Grafana, GrafanaDashboard or GrafanaDataSource objects. For covering this case, the chart allows adding the full specification of other objects using the extraDeploy parameter.

For instance, to deploy a custom Grafana definition, install the Grafana Operator chart using the values below:

grafana:
  enabled: false
extraDeploy:
  - apiVersion: integreatly.org/v1alpha1
    baseImage: docker.io/bitnami/grafana:7
    kind: Grafana
    metadata:
      name: grafana
    spec:
      deployment:
        securityContext:
          runAsUser: 1001
          fsGroup: 1001
        containerSecurityContext:
          runAsUser: 1001
          fsGroup: 1001
          allowPrivilegeEscalation: false
      service:
        type: LoadBalancer
      ingress:
        enabled: false
      config:
        log:
          mode: "console"
          level: "warn"
        security:
          admin_user: "admin"
          admin_password: "hello"
        auth.anonymous:
          enabled: true
      dashboardLabelSelector:
        - matchExpressions:
            - { key: app, operator: In, values: [grafana] }
FIPS parameters

The FIPS parameters only have effect if you are using images from the Bitnami Secure Images catalog.

For more information on this new support, please refer to the FIPS Compliance section.

Parameters

The following subsections list global, common, and component-specific parameters.

Global parameters
NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.defaultFipsDefault value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overridden by the 'fips' objectrestricted
global.security.allowInsecureImagesAllows skipping image verificationfalse
global.compatibility.openshift.adaptSecurityContextAdapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)auto
Common parameters
NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override common.names.fullname template with a string (will prepend the release name)""
fullnameOverrideString to fully override common.names.fullname template with a string""
namespaceOverrideString to fully override common.names.namespace""
extraDeployArray of extra objects to deploy with the release[]
commonLabelsCommon Labels which are applied to every resource deployed{}
commonAnnotationsCommon Annotations which are applied to every ressource deployed{}
clusterDomainKubernetes cluster domain namecluster.local
Grafana Operator parameters
NameDescriptionValue
operator.enabledEnable the deployment of the Grafana Operatortrue
operator.commandDefault container command (useful when using custom images)[]
operator.argsDefault container args (useful when using custom images)[]
operator.schedulerNameAlternative scheduler""
operator.runtimeClassNameName of the runtime class to be used by pod(s)""
operator.lifecycleHooksfor the grafana-operator container to automate configuration before or after startup{}
operator.replicaCountNumber of grafana-operator Pod replicas1
operator.customLivenessProbeOverride default liveness probe{}
operator.customReadinessProbeOverride default readiness probe{}
operator.customStartupProbeOverride default startup probe{}
operator.extraVolumesOptionally specify extra list of additional volumes for Grafana Operator pods[]
operator.extraVolumeMountsOptionally specify extra list of additional volumeMounts for Grafana Operator container(s)[]
operator.initContainersAdd additional init containers to the Grafana Operator pods[]
operator.pdb.createEnable/disable a Pod Disruption Budget creationtrue
operator.pdb.minAvailableMinimum number/percentage of pods that should remain scheduled""
operator.pdb.maxUnavailableMaximum number/percentage of pods that may be made unavailable. Defaults to 1 if both operator.pdb.minAvailable and operator.pdb.maxUnavailable are empty.""
operator.sidecarsAdd additional sidecar containers to the Grafana Operator pods[]
operator.namespaceScopeIf the operator should run in namespace-scope mode or not,false
operator.watchNamespaceOverride the namespace to watch

Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-app-doc/apps-charts-grafana-operator-index.html

Tag summary

Content type

Image

Digest

sha256:a767e28dc

Size

7.8 kB

Last updated

11 months ago

docker pull bitnamicharts/grafana-operator:sha256-bc8872c8f1ef26673c210c852c540ee193c0e9582fbc0176025c4e865c737a53

This week's pulls

Pulls:

18,962

Jun 29 to Jul 5

Bitnami