prometheus-postgres-exporter

by joaquinito2051

Helm chartv0.6.2App 0.4.7

A Helm chart for prometheus postgres-exporter

About this chart

Prometheus Postgres Exporter

TL;DR;

$ helm install <helm-repo>/prometheus-postgres-exporter

$ helm install stable/prometheus-postgres-exporter

Introduction

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

Installing the Chart

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

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

$ helm install --name my-release stable/prometheus-postgres-exporter The command deploys postgres exporter 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 postgres Exporter chart and their default values.

ParameterDescriptionDefault
imageImagewrouesnel/postgres_exporter
imageTagImage tagv0.4.6
imagePullPolicyImage pull policyIfNotPresent
service.annotationsannotations for the service{}
service.typeService typeClusterIP
service.portThe service port80
service.targetPortThe target port of the container9187
service.nameName of the service porthttp
service.labelsLabels to add to the service{}
resources{}
config.datasourcePostgresql datasource configurationsee values.yaml
config.queriesSQL queries that the exporter will runpostgres exporter defaults
config.disableDefaultMetricsSpecifies whether to use only metrics from queries.yamlfalse
rbac.createSpecifies whether RBAC resources should be created.true
rbac.pspEnabledSpecifies whether a PodSecurityPolicy should be created.true
serviceAccount.createSpecifies whether a service account should be created.true
serviceAccount.nameName of the service account.
tolerationsAdd tolerations[]
nodeSelectornode labels for pod assignment{}
affinitynode/pod affinities{}
annotationsDeployment annotations{}
podLabelsAdditional labels to add to each pod{}
extraContainersAdditional sidecar containers""
extraVolumesAdditional volumes for use in extraContainers""

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=postgres  \
    <helm-repo>/prometheus-postgres-exporter
$ 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-postgres-exporter

Deploy prometheus-postgres-exporter with OpenTenant

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