prometheus-operator

by joaquinito2051

Helm chartv0.29.3App 0.41.0

The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.

About this chart

Prometheus Operator

Prometheus Operator provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.

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 bitnami-azure https://marketplace.azurecr.io/helm/v1/repo
$ helm install my-release bitnami-azure/prometheus-operator

Introduction

This chart bootstraps Prometheus Operator on Kubernetes using the Helm package manager.

In the default configuration the chart deploys the following components on the Kubernetes cluster:

IMPORTANT

Only one instance of the Prometheus Operator component should be running in the cluster. If you wish to deploy this chart to manage multiple instances of Prometheus in your Kubernetes cluster, you have to disable the installation of the Prometheus Operator component using the operator.enabled=false chart installation argument.

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

Prerequisites

  • Kubernetes 1.12+
  • Helm 2.12+ or Helm 3.0-beta3+

Installing the Chart

Add the bitnami charts repo to Helm:

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

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

$ helm install my-release bitnami-azure/prometheus-operator

The command deploys Prometheus Operator on the Kubernetes cluster in the default configuration. The configuration 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 release:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release. Use the flag --purge to delete all history too.

Parameters

The following table lists the configurable parameters of the Prometheus Operator chart and their default values.

Global Parameters

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil
global.labelsAdditional labels to apply to all resource{}
nameOverrideString to partially override prometheus-operator.name template with a string (will prepend the release name)nil
fullnameOverrideString to fully override prometheus-operator.fullname template with a stringnil
rbac.createWether to create & use RBAC resources or nottrue
rbac.apiVersionVersion of the RBAC APIv1beta1
rbac.pspEnabledPodSecurityPolicytrue

Prometheus Operator Parameters

ParameterDescriptionDefault
operator.enabledDeploy Prometheus Operator to the clustertrue
operator.image.registryPrometheus Operator image registrydocker.io
operator.image.repositoryPrometheus Operator Image namebitnami/prometheus-operator
operator.image.tagPrometheus Operator Image tag{TAG_NAME}
operator.image.pullPolicyPrometheus Operator image pull policyIfNotPresent
operator.image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
operator.serviceAccount.createSpecify whether to create a ServiceAccount for Prometheus Operatortrue
operator.serviceAccount.nameThe name of the ServiceAccount to createGenerated using the prometheus-operator.operator.fullname template
operator.schedulerNameName of the k8s scheduler (other than default)nil
operator.securityContext.enabledEnable security contexttrue
operator.securityContext.fsGroupGroup ID for the container filesystem1001
operator.securityContext.runAsUserUser ID for the container1001
operator.service.typeKubernetes service typeClusterIP

Deploy prometheus-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has prometheus-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 chartprometheus-operator is pinned at v0.29.3 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