grafana-operator

by Helm

Helm chartv0.3.18App master

Grafana-operator Helm chart for Kubernetes

About this chart

grafana-operator

grafana-operator is an Operator which introduces Lifecycle Management for Grafana Dashboards and Plugins. This chart is based on bitnami's [grafana-operator]https://github.com/bitnami/charts) chart.

TL;DR

$ helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
$ helm repo update
$ helm install banzaicloud-stable/grafana-operator

Introduction

This chart bootstraps a [Grafana Operator]https://github.com/integr8ly/grafana-operator) deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.16+ with Beta APIs enabled

Installing the Chart

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

$ helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
$ helm install banzaicloud-stable/grafana-operator

CRDs

Use createCustomResource=false with Helm v3 to avoid trying to create CRDs from the crds folder and from templates at the same time.

The command deploys Grafana operator on the Kubernetes cluster with the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

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

Parameters

The following tables lists the configurable parameters of the grafana-operator chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.registryGrafana Operator image registryquay.io
image.repositoryGrafana Operator image nameintegreatly/grafana-operator
image.tagGrafana Operator image tag{TAG_NAME}
image.pullPolicyGrafana Operator image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
replicaCountSpecify the amount of replicas running1
updateStrategySpecify the updateStrategy of the containers{"type": "RollingUpdate"}
args.scanAllNamespacesSpecify if all namespace should be scanned for dashboards and datasources. (Creates ClusterRole)false
args.scanNamespacesSpecify the namespaces which should be scanned for dashboards and datasources (Creates ClusterRole)[] (does not add ClusterRole or Namespaces)
grafana.image.registryGrafana image registrydocker.io
grafana.image.repositoryGrafana image namegrafana/grafana
grafana.image.tagGrafana image tag{TAG_NAME}
grafana.deployment.annotationsAdditional annotations for the service{}
grafana.deployment.labelsAdditional labels for the service{}
grafana.deployment.nodeSelectorAdditional labels for the running grafana pods in a labeled node.{}
grafana.deployment.tolerationsAdditonal labels for running grafana pods in tained nodes.[]
grafana.deployment.affinityAdditonal labels for running grafana pods with affinity properties.{}
grafana.deployment.envFromEnvironment variables from Secret or ConfigMap.[]
grafana.deployment.skipCreateAdminAccountDisable creating a random admin userfalse
grafana.deployment.priorityClassNamePod priority class name``
grafana.deployment.annotationsAdditional annotations for the service{}
grafanaPluginInit.image.registryGrafana Plugin Init image registryquay.io
grafanaPluginInit.image.repositoryGrafana Plugin Init image nameintegreatly/grafana_plugins_init
grafanaPluginInit.image.tagGrafana Plugin Init image tag{TAG_NAME}
resources.limitsSpecify resource limits which the container is not allowed to succeed.{} (does not add resource limits to deployed pods)
resources.requestsSpecify resource requests which the container needs to spawn.{} (does not add resource limits to deployed pods)
nodeSelectorNode labels for controller pod assignment{}
tolerationsTolerations for controller pod assignment[]
affinityAffinity for controller pod assignment{}
podAnnotationsController Pod annotations{}
serviceAccount.createcreate a serviceAccount for the controller podtrue
serviceAccount.nameuse the serviceAccount with the specified name``
securityContext.enabledEnable pods' security contexttrue
securityContext.runAsNonRootMetalLB Controller must runs as nonRoot.true
securityContext.runAsUserUser ID for the pods.1001
securityContext.runAsGroupUser ID for the pods.1001
securityContext.fsGroupGroup ID for the pods.1001
securityContext.supplementalGroupsDrop capabilities for the securityContext[]
speaker.extraEnvVarsExtra environment variable to pass to the running container.[]
nameOverrideString to partially override metallb.fullname template with a string (will prepend the release name)nil
fullnameOverrideString to fully override metallb.fullname template with a stringnil
livenessProbe.enabledEnable/disable the Liveness probetrue
livenessProbe.initialDelaySecondsDelay before liveness probe is initiated3
livenessProbe.periodSecondsHow often to perform the probe10
livenessProbe.timeoutSecondsWhen the probe times out10
livenessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed.1
livenessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.1
readinessProbe.enabledEnable/disable the Liveness probetrue
readinessProbe.initialDelaySecondsDelay before liveness probe is initiated3
readinessProbe.periodSecondsHow often to perform the probe10
readinessProbe.timeoutSecondsWhen the probe times out10
readinessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed.1
readinessProbe.failureThresholdMinimum consecutive failures for the p

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 v0.3.18 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