prometheus-pushgateway

by joaquinito2051

Helm chartv0.4.0App 0.8.0

A Helm chart for prometheus pushgateway

About this chart

Prometheus Pushgateway

TL;DR;

$ helm install <helm-repo>/prometheus-pushgateway

$ helm install stable/prometheus-pushgateway

Introduction

This chart bootstraps a prometheus pushgateway deployment on a Kubernetes cluster using the Helm package manager.

An optional prometheus ServiceMonitor can be enabled, should you wish to use this gateway with a Prometheus Operator.

Installing the Chart

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

$ helm install --name my-release <helm-repo>/prometheus-pushgateway

$ helm install --name my-release stable/prometheus-pushgateway The command deploys pushgateway on the Kubernetes cluster in 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 the Kubernetes components associated with the chart and deletes the release.

Configuration

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

ParameterDescriptionDefault
affinityAffinity settings for pod assignment{}
extraArgsOptional flags for pushgateway[]
extraVarsOptional environment variables for pushgateway[]
image.repositoryImage repositoryprom/pushgateway
image.tagImage tagv0.8.0
image.pullPolicyImage pull policyIfNotPresent
ingress.enabledEnables Ingress for pushgatewayfalse
ingress.annotationsIngress annotations{}
ingress.hostsIngress accepted hostnamesnil
ingress.tlsIngress TLS configuration[]
resourcesCPU/Memory resource requests/limits{}
replicaCountNumber of replicas1
service.typeService typeClusterIP
service.portThe service port9091
service.targetPortThe target port of the container9091
serviceLabelsLabels for service{}
serviceAccount.createSpecifies whether a service account should be created.true
serviceAccount.nameService account to be used. If not set and serviceAccount.create is true, a name is generated using the fullname template
tolerationsList of node taints to tolerate{}
nodeSelectorNode labels for pod assignment{}
podAnnotationsAnnotations for pod{}
podLabelsLabels for pod{}
serviceAccountLabelsLabels for service account{}
serviceMonitor.enabledif true, creates a Prometheus Operator ServiceMonitor (also requires metrics.enabled to be true)false
serviceMonitor.namespaceNamespace which Prometheus is running inmonitoring
serviceMonitor.intervalHow frequently to scrape metrics (use by default, falling back to Prometheus' default)nil
serviceMonitor.selectorDefault to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install{ prometheus: kube-prometheus }
serviceMonitor.honorLabelsif true, label conflicts are resolved by keeping label values from the scraped datatrue

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
$ helm install --name my-release \
  --set serviceAccount.name=pushgateway  \
    <helm-repo>/prometheus-pushgateway
$ helm install --name my-release \

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install --name my-release -f values.yaml <helm-repo>/prometheus-pushgateway

Deploy prometheus-pushgateway with OpenTenant

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