feat: add metricsRelabelings on podMonitor (#406)

This commit is contained in:
lenglet-k 2023-12-21 17:24:49 +01:00 committed by GitHub
parent a725188438
commit eedc21da30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 0 deletions

View File

@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name] - sourceLabels: [__meta_kubernetes_pod_name]
action: replace action: replace
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
{{- if $.Values.autorecovery.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.autorecovery.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }} {{- include "pulsar.matchLabels" . | nindent 6 }}

View File

@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name] - sourceLabels: [__meta_kubernetes_pod_name]
action: replace action: replace
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
{{- if $.Values.bookkeeper.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.bookkeeper.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }} {{- include "pulsar.matchLabels" . | nindent 6 }}

View File

@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name] - sourceLabels: [__meta_kubernetes_pod_name]
action: replace action: replace
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
{{- if $.Values.broker.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.broker.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }} {{- include "pulsar.matchLabels" . | nindent 6 }}

View File

@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name] - sourceLabels: [__meta_kubernetes_pod_name]
action: replace action: replace
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
{{- if $.Values.proxy.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.proxy.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }} {{- include "pulsar.matchLabels" . | nindent 6 }}

View File

@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name] - sourceLabels: [__meta_kubernetes_pod_name]
action: replace action: replace
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
{{- if $.Values.zookeeper.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.zookeeper.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }} {{- include "pulsar.matchLabels" . | nindent 6 }}

View File

@ -290,6 +290,9 @@ zookeeper:
enabled: true enabled: true
interval: 10s interval: 10s
scrapeTimeout: 10s scrapeTimeout: 10s
metricRelabelings:
# - action: labeldrop
# regex: cluster
# True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change # True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change
restartPodsOnConfigMapChange: false restartPodsOnConfigMapChange: false
ports: ports:
@ -436,6 +439,9 @@ bookkeeper:
enabled: true enabled: true
interval: 10s interval: 10s
scrapeTimeout: 10s scrapeTimeout: 10s
metricRelabelings:
# - action: labeldrop
# regex: cluster
# True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change # True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change
restartPodsOnConfigMapChange: false restartPodsOnConfigMapChange: false
ports: ports:
@ -617,6 +623,9 @@ autorecovery:
enabled: true enabled: true
interval: 10s interval: 10s
scrapeTimeout: 10s scrapeTimeout: 10s
metricRelabelings:
# - action: labeldrop
# regex: cluster
# True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change # True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change
restartPodsOnConfigMapChange: false restartPodsOnConfigMapChange: false
ports: ports:
@ -704,6 +713,9 @@ broker:
enabled: true enabled: true
interval: 10s interval: 10s
scrapeTimeout: 10s scrapeTimeout: 10s
metricRelabelings:
# - action: labeldrop
# regex: cluster
# True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change # True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change
restartPodsOnConfigMapChange: false restartPodsOnConfigMapChange: false
ports: ports:
@ -843,6 +855,9 @@ proxy:
enabled: true enabled: true
interval: 10s interval: 10s
scrapeTimeout: 10s scrapeTimeout: 10s
metricRelabelings:
# - action: labeldrop
# regex: cluster
# True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change # True includes annotation for statefulset that contains hash of corresponding configmap, which will cause pods to restart on configmap change
restartPodsOnConfigMapChange: false restartPodsOnConfigMapChange: false
# nodeSelector: # nodeSelector: