mirror of
https://github.com/bitnami/charts.git
synced 2026-03-01 06:58:20 +08:00
[bitnami/external-dns] add PodMonitor to support Google Managed Prometheus (#12638)
Signed-off-by: Chuyen Pham <pkchuyen@users.noreply.github.com> Signed-off-by: Chuyen Pham <pkchuyen@users.noreply.github.com>
This commit is contained in:
@@ -24,4 +24,4 @@ sources:
|
||||
- https://github.com/kubernetes-sigs/external-dns
|
||||
- https://github.com/bitnami/containers/tree/main/bitnami/external-dns
|
||||
- https://github.com/kubernetes-sigs/external-dns
|
||||
version: 6.9.0
|
||||
version: 6.10.0
|
||||
|
||||
@@ -329,6 +329,10 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
|
||||
| `metrics.serviceMonitor.labels` | Used to pass Labels that are required by the installed Prometheus Operator | `{}` |
|
||||
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
|
||||
| `metrics.googlePodMonitor.enabled` | Create Google Managed Prometheus PodMonitoring object | `false` |
|
||||
| `metrics.googlePodMonitor.namespace` | Namespace in which PodMonitoring created | `""` |
|
||||
| `metrics.googlePodMonitor.interval` | Interval at which metrics should be scraped by Google Managed Prometheus | `60s` |
|
||||
| `metrics.googlePodMonitor.endpoint` | The endpoint for Google Managed Prometheus scraping the metrics | `/metrics` |
|
||||
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
22
bitnami/external-dns/templates/podmonitor.yaml
Normal file
22
bitnami/external-dns/templates/podmonitor.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.googlePodMonitor.enabled }}
|
||||
apiVersion: monitoring.googleapis.com/v1
|
||||
kind: PodMonitoring
|
||||
metadata:
|
||||
name: {{ template "external-dns.fullname" . }}
|
||||
namespace: {{ default .Release.Namespace .Values.metrics.googlePodMonitor.namespace | quote }}
|
||||
labels: {{ include "external-dns.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
endpoints:
|
||||
- port: http
|
||||
{{- with .Values.metrics.googlePodMonitor.endpoint }}
|
||||
path: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.googlePodMonitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{ include "external-dns.matchLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -1029,3 +1029,18 @@ metrics:
|
||||
## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
|
||||
##
|
||||
jobLabel: ""
|
||||
## Google Managed Prometheus PodMonitor configuration
|
||||
##
|
||||
googlePodMonitor:
|
||||
## @param metrics.googlePodMonitor.enabled Create Google Managed Prometheus PodMonitoring object
|
||||
##
|
||||
enabled: false
|
||||
## @param metrics.googlePodMonitor.namespace Namespace in which PodMonitoring created
|
||||
##
|
||||
namespace: ""
|
||||
## @param metrics.googlePodMonitor.interval Interval at which metrics should be scraped by Google Managed Prometheus
|
||||
##
|
||||
interval: "60s"
|
||||
## @param metrics.googlePodMonitor.endpoint The endpoint for Google Managed Prometheus scraping the metrics
|
||||
##
|
||||
endpoint: /metrics
|
||||
|
||||
Reference in New Issue
Block a user