Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
7ea826a2a1 | |||
aa8c279fe0 | |||
dfd4c1f991 | |||
d6c2e4f992 | |||
ae7652a335 |
63
README.md
63
README.md
@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
[](https://drone.cryptic.systems/volker.raschek/prometheus-postgres-exporter)
|
[](https://drone.cryptic.systems/volker.raschek/prometheus-postgres-exporter)
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> This is not the official *community* helm chart of the Prometheus metric exporter for PostgreSQL databases. You can
|
||||||
|
> find the official community chart [here](https://github.com/prometheus-community/helm-charts).
|
||||||
|
|
||||||
This helm chart enables the deployment of a Prometheus metrics exporter for PostgreSQL databases and allows the
|
This helm chart enables the deployment of a Prometheus metrics exporter for PostgreSQL databases and allows the
|
||||||
individual configuration of additional containers/initContainers, mounting of volumes, defining additional environment
|
individual configuration of additional containers/initContainers, mounting of volumes, defining additional environment
|
||||||
variables, apply a user-defined web-config.yaml and much more.
|
variables, apply a user-defined `webConfig.yaml` and much more.
|
||||||
|
|
||||||
Chapter [configuration and installation](#helm-configuration-and-installation) describes the basics how to configure helm
|
Chapter [configuration and installation](#helm-configuration-and-installation) describes the basics how to configure helm
|
||||||
and use it to deploy the exporter. It also contains further configuration examples.
|
and use it to deploy the exporter. It also contains further configuration examples.
|
||||||
|
|
||||||
Furthermore, this helm chart unit tests to detect regressions and stabilize the deployment. Additionally, this helm
|
Furthermore, this helm chart contains unit tests to detect regressions and stabilize the deployment. Additionally, this
|
||||||
chart is tested for deployment scenarios with ArgoCD.
|
helm chart is tested for deployment scenarios with **ArgoCD**.
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> This is not the official *community* helm chart of the Prometheus metric exporter for PostgreSQL databases. You can
|
|
||||||
> find the official community chart [here](https://github.com/prometheus-community/helm-charts).
|
|
||||||
|
|
||||||
## Helm: configuration and installation
|
## Helm: configuration and installation
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ chart is tested for deployment scenarios with ArgoCD.
|
|||||||
```bash
|
```bash
|
||||||
helm repo add prometheus-exporters https://charts.cryptic.systems/prometheus-exporters
|
helm repo add prometheus-exporters https://charts.cryptic.systems/prometheus-exporters
|
||||||
helm repo update
|
helm repo update
|
||||||
helm install prometheus-exporters/prometheus-postgres-exporter prometheus-postgres-exporter \
|
helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||||
--set 'config.database.secret.databaseUsername=postgres' \
|
--set 'config.database.secret.databaseUsername=postgres' \
|
||||||
--set 'config.database.secret.databasePassword=postgres' \
|
--set 'config.database.secret.databasePassword=postgres' \
|
||||||
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
||||||
@ -71,7 +71,7 @@ certification will be skipped by Prometheus.
|
|||||||
> `tls.key` and `tls.crt` of the secret can be mounted into the container filesystem for TLS authentication / encryption.
|
> `tls.key` and `tls.crt` of the secret can be mounted into the container filesystem for TLS authentication / encryption.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm install prometheus-exporters/prometheus-postgres-exporter prometheus-postgres-exporter \
|
helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||||
--set 'config.database.secret.databaseUsername=postgres' \
|
--set 'config.database.secret.databaseUsername=postgres' \
|
||||||
--set 'config.database.secret.databasePassword=postgres' \
|
--set 'config.database.secret.databasePassword=postgres' \
|
||||||
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
||||||
@ -94,7 +94,7 @@ certificate for the metrics exporter - TLS certificate verification can be enabl
|
|||||||
replaced:
|
replaced:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
helm install prometheus-exporters/prometheus-postgres-exporter prometheus-postgres-exporter \
|
helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||||
--set 'config.database.secret.databaseUsername=postgres' \
|
--set 'config.database.secret.databaseUsername=postgres' \
|
||||||
--set 'config.database.secret.databasePassword=postgres' \
|
--set 'config.database.secret.databasePassword=postgres' \
|
||||||
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
||||||
@ -126,25 +126,25 @@ replaced:
|
|||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||||
| `config.database.existingSecret.enabled` | Mount an existing secret containing the application specific `DATA_SOURCE_` prefixed environment variables. | `false` |
|
| `config.database.existingSecret.enabled` | Mount an existing secret containing the application specific `DATA_SOURCE_` prefixed environment variables. | `false` |
|
||||||
| `config.database.existingSecret.secretName` | Name of the existing secret containing the application specific `DATA_SOURCE_` prefixed environment variables. | `""` |
|
| `config.database.existingSecret.secretName` | Name of the existing secret containing the application specific `DATA_SOURCE_` prefixed environment variables. | `""` |
|
||||||
| `config.database.secret.annotations` | Additional annotations of the secret containing the database credentials. | `{}` |
|
| `config.database.secret.annotations` | Additional annotations of the secret containing the database credentials. | `{}` |
|
||||||
| `config.database.secret.labels` | Additional labels of the secret containing the database credentials. | `{}` |
|
| `config.database.secret.labels` | Additional labels of the secret containing the database credentials. | `{}` |
|
||||||
| `config.database.secret.databaseUsername` | Database username. Will be defined as env `DATA_SOURCE_USER` as part of a secret. | `""` |
|
| `config.database.secret.databaseUsername` | Database username. Will be defined as env `DATA_SOURCE_USER` as part of a secret. | `""` |
|
||||||
| `config.database.secret.databasePassword` | Database password. Will be defined as env `DATA_SOURCE_PASS` as part of a secret. | `""` |
|
| `config.database.secret.databasePassword` | Database password. Will be defined as env `DATA_SOURCE_PASS` as part of a secret. | `""` |
|
||||||
| `config.database.secret.databaseConnectionUrl` | Complex database connection URL. Will be defined as env `DATA_SOURCE_URI` as part of a secret. | `""` |
|
| `config.database.secret.databaseConnectionUrl` | Complex database connection URL. Will be defined as env `DATA_SOURCE_URI` as part of a secret. | `""` |
|
||||||
| `config.exporterConfig.existingSecret.enabled` | Mount an existing secret containing the key `exporterConfig.yaml`. | `false` |
|
| `config.exporterConfig.existingSecret.enabled` | Mount an existing secret containing the key `exporterConfig.yaml`. | `false` |
|
||||||
| `config.exporterConfig.existingSecret.secretName` | Name of the existing secret containing the key `exporterConfig.yaml`. | `""` |
|
| `config.exporterConfig.existingSecret.secretName` | Name of the existing secret containing the key `exporterConfig.yaml`. | `""` |
|
||||||
| `config.exporterConfig.secret.annotations` | Additional annotations of the secret containing the `exporterConfig.yaml`. | `{}` |
|
| `config.exporterConfig.secret.annotations` | Additional annotations of the secret containing the `exporterConfig.yaml`. | `{}` |
|
||||||
| `config.exporterConfig.secret.labels` | Additional labels of the secret containing the `exporterConfig.yaml`. | `{}` |
|
| `config.exporterConfig.secret.labels` | Additional labels of the secret containing the `exporterConfig.yaml`. | `{}` |
|
||||||
| `config.exporterConfig.secret.exporterConfig` | Content of the `exporterConfig.yaml`. Further information can be found [here](https://prometheus.io/docs/prometheus/latest/configuration/https/). | `{}` |
|
| `config.exporterConfig.secret.exporterConfig` | Content of the `exporterConfig.yaml`. Further information can be found [here](https://github.com/prometheus-community/postgres_exporter?tab=readme-ov-file#multi-target-support-beta). | `{}` |
|
||||||
| `config.webConfig.existingSecret.enabled` | Mount an existing secret containing the key `webConfig.yaml`. | `false` |
|
| `config.webConfig.existingSecret.enabled` | Mount an existing secret containing the key `webConfig.yaml`. | `false` |
|
||||||
| `config.webConfig.existingSecret.secretName` | Name of the existing secret containing the key `webConfig.yaml`. | `""` |
|
| `config.webConfig.existingSecret.secretName` | Name of the existing secret containing the key `webConfig.yaml`. | `""` |
|
||||||
| `config.webConfig.secret.annotations` | Additional annotations of the secret containing the `webConfig.yaml`. | `{}` |
|
| `config.webConfig.secret.annotations` | Additional annotations of the secret containing the `webConfig.yaml`. | `{}` |
|
||||||
| `config.webConfig.secret.labels` | Additional labels of the secret containing the `webConfig.yaml`. | `{}` |
|
| `config.webConfig.secret.labels` | Additional labels of the secret containing the `webConfig.yaml`. | `{}` |
|
||||||
| `config.webConfig.secret.webConfig` | Content of the `webConfig.yaml`. Further information can be found [here](https://prometheus.io/docs/prometheus/latest/configuration/https/). | `{}` |
|
| `config.webConfig.secret.webConfig` | Content of the `webConfig.yaml`. Further information can be found [here](https://prometheus.io/docs/prometheus/latest/configuration/https/). | `{}` |
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ replaced:
|
|||||||
| `prometheus.metrics.enabled` | Enable of scraping metrics by Prometheus. | `true` |
|
| `prometheus.metrics.enabled` | Enable of scraping metrics by Prometheus. | `true` |
|
||||||
| `prometheus.metrics.podMonitor.enabled` | Enable creation of a podMonitor. Excludes the existence of a serviceMonitor resource. | `false` |
|
| `prometheus.metrics.podMonitor.enabled` | Enable creation of a podMonitor. Excludes the existence of a serviceMonitor resource. | `false` |
|
||||||
| `prometheus.metrics.podMonitor.annotations` | Additional podMonitor annotations. | `{}` |
|
| `prometheus.metrics.podMonitor.annotations` | Additional podMonitor annotations. | `{}` |
|
||||||
| `prometheus.metrics.podMonitor.enableHttp2` | Enable HTTP2. | `false` |
|
| `prometheus.metrics.podMonitor.enableHttp2` | Enable HTTP2. | `true` |
|
||||||
| `prometheus.metrics.podMonitor.followRedirects` | FollowRedirects configures whether scrape requests follow HTTP 3xx redirects. | `false` |
|
| `prometheus.metrics.podMonitor.followRedirects` | FollowRedirects configures whether scrape requests follow HTTP 3xx redirects. | `false` |
|
||||||
| `prometheus.metrics.podMonitor.honorLabels` | Honor labels. | `false` |
|
| `prometheus.metrics.podMonitor.honorLabels` | Honor labels. | `false` |
|
||||||
| `prometheus.metrics.podMonitor.labels` | Additional podMonitor labels. | `{}` |
|
| `prometheus.metrics.podMonitor.labels` | Additional podMonitor labels. | `{}` |
|
||||||
@ -234,12 +234,11 @@ replaced:
|
|||||||
| `prometheus.metrics.serviceMonitor.enabled` | Enable creation of a serviceMonitor. Excludes the existence of a podMonitor resource. | `false` |
|
| `prometheus.metrics.serviceMonitor.enabled` | Enable creation of a serviceMonitor. Excludes the existence of a podMonitor resource. | `false` |
|
||||||
| `prometheus.metrics.serviceMonitor.annotations` | Additional serviceMonitor annotations. | `{}` |
|
| `prometheus.metrics.serviceMonitor.annotations` | Additional serviceMonitor annotations. | `{}` |
|
||||||
| `prometheus.metrics.serviceMonitor.labels` | Additional serviceMonitor labels. | `{}` |
|
| `prometheus.metrics.serviceMonitor.labels` | Additional serviceMonitor labels. | `{}` |
|
||||||
| `prometheus.metrics.serviceMonitor.enableHttp2` | Enable HTTP2. | `false` |
|
| `prometheus.metrics.serviceMonitor.enableHttp2` | Enable HTTP2. | `true` |
|
||||||
| `prometheus.metrics.serviceMonitor.followRedirects` | FollowRedirects configures whether scrape requests follow HTTP 3xx redirects. | `false` |
|
| `prometheus.metrics.serviceMonitor.followRedirects` | FollowRedirects configures whether scrape requests follow HTTP 3xx redirects. | `false` |
|
||||||
| `prometheus.metrics.serviceMonitor.honorLabels` | Honor labels. | `false` |
|
| `prometheus.metrics.serviceMonitor.honorLabels` | Honor labels. | `false` |
|
||||||
| `prometheus.metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. If not specified Prometheus' global scrape interval is used. | `60s` |
|
| `prometheus.metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. If not specified Prometheus' global scrape interval is used. | `60s` |
|
||||||
| `prometheus.metrics.serviceMonitor.path` | HTTP path for scraping Prometheus metrics. | `/metrics` |
|
| `prometheus.metrics.serviceMonitor.path` | HTTP path for scraping Prometheus metrics. | `/metrics` |
|
||||||
| `prometheus.metrics.serviceMonitor.port` | HTTP port for scraping Prometheus metrics. | `9187` |
|
|
||||||
| `prometheus.metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. | `[]` |
|
| `prometheus.metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. | `[]` |
|
||||||
| `prometheus.metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended. If not specified, global Prometheus scrape timeout is used. | `30s` |
|
| `prometheus.metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended. If not specified, global Prometheus scrape timeout is used. | `30s` |
|
||||||
| `prometheus.metrics.serviceMonitor.scheme` | HTTP scheme to use for scraping. For example `http` or `https`. | `http` |
|
| `prometheus.metrics.serviceMonitor.scheme` | HTTP scheme to use for scraping. For example `http` or `https`. | `http` |
|
||||||
|
@ -16,7 +16,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
{{- with .Values.prometheus.rules }}
|
{{- with .Values.prometheus.rules }}
|
||||||
groups:
|
groups:
|
||||||
- name: {{ template "prometheus-postgres-exporter.name" $ }}
|
- name: {{ template "prometheus-postgres-exporter.fullname" $ }}
|
||||||
rules:
|
rules:
|
||||||
{{ toYaml . | nindent 4 }}
|
{{ toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -38,7 +38,7 @@ config:
|
|||||||
|
|
||||||
## @param config.exporterConfig.secret.annotations Additional annotations of the secret containing the `exporterConfig.yaml`.
|
## @param config.exporterConfig.secret.annotations Additional annotations of the secret containing the `exporterConfig.yaml`.
|
||||||
## @param config.exporterConfig.secret.labels Additional labels of the secret containing the `exporterConfig.yaml`.
|
## @param config.exporterConfig.secret.labels Additional labels of the secret containing the `exporterConfig.yaml`.
|
||||||
## @param config.exporterConfig.secret.exporterConfig Content of the `exporterConfig.yaml`. Further information can be found [here](https://prometheus.io/docs/prometheus/latest/configuration/https/).
|
## @param config.exporterConfig.secret.exporterConfig Content of the `exporterConfig.yaml`. Further information can be found [here](https://github.com/prometheus-community/postgres_exporter?tab=readme-ov-file#multi-target-support-beta).
|
||||||
## @skip config.exporterConfig.secret.exporterConfig Skip individual postgres exporter configuration.
|
## @skip config.exporterConfig.secret.exporterConfig Skip individual postgres exporter configuration.
|
||||||
secret:
|
secret:
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user