prometheus-pushgateway
by Prometheus
A Helm chart for prometheus pushgateway
About this chart
Prometheus Pushgateway
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 Prometheus Operator.
Usage
The chart is distributed as an OCI Artifact as well as via a traditional Helm Repository.
- OCI Artifact:
oci://ghcr.io/prometheus-community/charts/prometheus-pushgateway - Helm Repository:
https://prometheus-community.github.io/helm-chartswith chartprometheus-pushgateway
The installation instructions use the OCI registry. Refer to the helm repo command documentation for information on installing charts via the traditional repository.
Install Chart
helm install [RELEASE_NAME] oci://ghcr.io/prometheus-community/charts/prometheus-pushgateway
See configuration below.
See helm install for command documentation.
Uninstall Chart
helm uninstall [RELEASE_NAME]
This removes all the Kubernetes components associated with the chart and deletes the release.
See helm uninstall for command documentation.
Upgrading Chart
helm upgrade [RELEASE_NAME] oci://ghcr.io/prometheus-community/charts/prometheus-pushgateway --install
See helm upgrade for command documentation.
To 3.0.0
Previously, as dynamic labels were also set on the statefulset's volume claim template, it was not possible to upgrade a chart release in a usual manner whilst using a statefulset and persistence due to the volume claim template's fields being immutable.
This release removes the dynamic labels from the statefulset's volume claim template. If you have configured a statefulset with persistent storage, please, delete the statefulset before upgrading:
kubectl delete sts -l app.kubernetes.io/name=prometheus-pushgateway --cascade=orphan
To 2.0.0
Chart API version has been upgraded to v2 so Helm 3 is needed from now on.
Docker image tag is used from Chart.yaml appVersion field by default now.
Version 2.0.0 also adapted Helm label and annotation best practices. Specifically, labels mapping is listed below:
OLD => NEW
----------------------------------------
heritage => app.kubernetes.io/managed-by
chart => helm.sh/chart
[container version] => app.kubernetes.io/version
app => app.kubernetes.io/name
release => app.kubernetes.io/instance
Therefore, depending on the way you've configured the chart, the previous StatefulSet or Deployment need to be deleted before upgrade.
If runAsStatefulSet: false (this is the default):
kubectl delete deploy -l app=prometheus-pushgateway
If runAsStatefulSet: true:
kubectl delete sts -l app=prometheus-pushgateway
After that do the actual upgrade:
helm upgrade -i prometheus-pushgateway prometheus-community/prometheus-pushgateway
Configuration
See Customizing the Chart Before Installing. To see all configurable options with detailed comments, visit the chart's values.yaml, or run these configuration commands:
helm show values oci://ghcr.io/prometheus-community/charts/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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartprometheus-pushgateway is pinned at v3.11.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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