grafana-operator

by joaquinito2051

Helm chartv2.7.8App 4.7.1

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

About this chart

Grafana Operator packaged by Bitnami

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.

Azure-ready Charts with Containers from marketplace.azurecr.io

This Helm Chart has been configured to pull the Container Images from the Azure Marketplace Public Repository. The following command allows you to download and install all the charts from this repository.

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo

TL;DR

$ helm repo add my-repo https://charts.bitnami.com/bitnami
$ helm install my-release my-repo/grafana-operator

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.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+

Installing the Chart

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

$ helm repo add my-repo https://charts.bitnami.com/bitnami
$ helm install my-release my-repo/grafana-operator

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

Uninstalling the Chart

To uninstall/delete the my-release helm release:

$ helm uninstall my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

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.

  • 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.

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.

For more information, refer to the documentation on the differences between these charts, including more information on the differences in the deployment objects.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]

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.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 etcd pods[]
operator.extraVolumeMountsOptionally specify extra list of additional volumeMounts for etcd container(s)[]
operator.initContainersAdd additional init containers to the etcd pods[]
operator.sidecarsAdd additional sidecar containers to the etcd pods[]
operator.watchNamespaceOverride the namespace to watch""
operator.topologySpreadConstraintsTopology Spread Constraints for pod assignment[]
operator.priorityClassName%%MAIN_CONTAINER_NAME%% pods' priorityClassName""
operator.terminationGracePeriodSecondsIn seconds, time the given to the %%MAIN_CONTAINER_NAME%% pod needs to terminate gracefully""
operator.updateStrategy.typeSet up update strategy for Grafana Operator installation.Recreate
operator.image.registryGrafana Operator image registrydocker.io
operator.image.repositoryGrafana Operator image namebitnami/grafana-operator
operator.image.tagGrafana Operator image tag4.7.1-debian-11-r0
operator.image.digestGrafana Operator image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
operator.image.pullPolicyGrafana Operator image pull policyIfNotPresent
operator.image.pullSecretsGrafana Operator image pull secrets[]
operator.leaderElectEnables or disables the operator leader Election.true
operator.scanAllNamespacesSpecify if all namespace should be scanned for dashboards and datasources. (Creates ClusterRole)false
operator.scanNamespacesSpecify the namespaces which should be scanned for dashboards and datasources (Creates ClusterRole)[]
operator.zapDevelEnable zap development mode (changes defaults to console encoder, debug log level, disables sampling and stacktrace from 'warning' level)false
operator.zapEncoderZap log encoding ('json' or 'console')""
operator.zapLevelZap log level (one of 'debug', 'info', 'error' or any integer value > 0) (default info)""
operator.zapSampleEnable zap log sampling. Sampling will be disabled for integer log levels > 1""
`ope

Deploy grafana-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has grafana-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgrafana-operator is pinned at v2.7.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply