[stable/stolon] Add custom labels support for servicemonitor (#19543)

* [stable/stolon] Add custom labels support for servicemonitor

Signed-off-by: Raj Perera <rajiteh@gmail.com>

* [stable/stolon] Document custom labels support for servicemonitor

Signed-off-by: Raj Perera <rajiteh@gmail.com>

* [stable/stolon] Bump chart version

Signed-off-by: Raj Perera <rajiteh@gmail.com>
This commit is contained in:
Raj Perera
2019-12-17 08:19:59 -08:00
committed by Kubernetes Prow Robot
parent 497296fb4a
commit 2ef9c1ea20
4 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: stolon
version: 1.5.2
version: 1.5.3
appVersion: 0.13.0
description: Stolon - PostgreSQL cloud native High Availability.
home: https://github.com/sorintlab/stolon
+7 -6
View File
@@ -55,18 +55,19 @@ Kubernetes is the default store backend. `consul`, `etcdv2` or `etcdv3` can also
| `store.kubeResourceKind` | Kubernetes resource kind (only for kubernetes) | `configmap` |
| `pgParameters` | [`postgresql.conf`][pgconf] options used during cluster creation | `{}` |
| `ports` | Ports to expose on pods | `{"stolon":{"containerPort": 5432},"metrics":{"containerPort": 8080}}`|
| `serviceMonitor.enabled` | Creates a Prometheus serviceMonitor and service object | `false`|
| `serviceMonitor.namespace` | Set to use a different value than the release namespace for deploying the ServiceMonitor object | `nil` |
| `serviceMonitor.interval` | Set to use a different value than the default Prometheus scrape interval | `nil` |
| `serviceMonitor.scrapeTimeout` | Set to use a different value than the default Prometheus scrape timeout | `nil` |
| `serviceMonitor.enabled` | Creates a Prometheus serviceMonitor and service object | `false` |
| `serviceMonitor.labels` | Overrides the default labels added by chart to the ServiceMonitor with labels specified. | `{}` |
| `serviceMonitor.namespace` | Set to use a different value than the release namespace for deploying the ServiceMonitor object | `nil` |
| `serviceMonitor.interval` | Set to use a different value than the default Prometheus scrape interval | `nil` |
| `serviceMonitor.scrapeTimeout` | Set to use a different value than the default Prometheus scrape timeout | `nil` |
| `job.autoCreateCluster` | Set to `false` to force-disable auto-cluster-creation which may clear pre-existing postgres db data | `true` |
| `job.autoUpdateClusterSpec` | Set to `false` to force-disable auto-cluster-spec-update | `true` |
| `clusterSpec` | Stolon cluster spec [reference](https://github.com/sorintlab/stolon/blob/master/doc/cluster_spec.md) | `{}` |
| `tls.enabled` | Enable tls support to postgresql | `false` |
| `tls.rootCa` | Ca certificate | `""` |
| `tls.rootCa` | Ca certificate | `""` |
| `tls.serverCrt` | Server cerfificate | `""` |
| `tls.serverKey` | Server key | `""` |
| `tls.existingSecret` | Existing secret with certificate content to stolon credentials | `""` |
| `tls.existingSecret` | Existing secret with certificate content to stolon credentials | `""` |
| `keeper.uid_prefix` | Keeper prefix name | `keeper` |
| `keeper.replicaCount` | Number of keeper nodes | `2` |
| `keeper.resources` | Keeper resource requests/limit | `{}` |
@@ -4,10 +4,14 @@ kind: ServiceMonitor
metadata:
name: {{ template "stolon.fullname" . }}
labels:
{{- if .Values.serviceMonitor.labels }}
{{ toYaml .Values.serviceMonitor.labels | nindent 4 }}
{{- else }}
app: {{ template "stolon.name" . }}
chart: {{ template "stolon.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- end }}
{{- if .Values.serviceMonitor.namespace }}
namespace: {{ .Values.serviceMonitor.namespace }}
{{- end }}
+2
View File
@@ -69,6 +69,8 @@ ports:
serviceMonitor:
# When set to true then use a ServiceMonitor to collect metrics
enabled: false
# Custom labels to use in the ServiceMonitor to be matched with a specific Prometheus
labels: {}
# Set the namespace the ServiceMonitor should be deployed to
# namespace: default
# Set how frequently Prometheus should scrape