Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add metricsRelabelings on podMonitor #406

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions charts/pulsar/templates/autorecovery-podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name]
action: replace
targetLabel: kubernetes_pod_name
{{- if $.Values.autorecovery.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.autorecovery.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector:
matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/pulsar/templates/bookkeeper-podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name]
action: replace
targetLabel: kubernetes_pod_name
{{- if $.Values.bookkeeper.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.bookkeeper.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector:
matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/pulsar/templates/broker-podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name]
action: replace
targetLabel: kubernetes_pod_name
{{- if $.Values.broker.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.broker.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector:
matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/pulsar/templates/proxy-podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name]
action: replace
targetLabel: kubernetes_pod_name
{{- if $.Values.proxy.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.proxy.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector:
matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/pulsar/templates/zookeeper-podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
- sourceLabels: [__meta_kubernetes_pod_name]
action: replace
targetLabel: kubernetes_pod_name
{{- if $.Values.zookeeper.podMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml $.Values.zookeeper.podMonitor.metricRelabelings | nindent 8 }}
{{- end }}
selector:
matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
Expand Down
15 changes: 15 additions & 0 deletions charts/pulsar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ zookeeper:
enabled: true
interval: 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
restartPodsOnConfigMapChange: false
ports:
Expand Down Expand Up @@ -432,6 +435,9 @@ bookkeeper:
enabled: true
interval: 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
restartPodsOnConfigMapChange: false
ports:
Expand Down Expand Up @@ -610,6 +616,9 @@ autorecovery:
enabled: true
interval: 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
restartPodsOnConfigMapChange: false
ports:
Expand Down Expand Up @@ -690,6 +699,9 @@ broker:
enabled: true
interval: 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
restartPodsOnConfigMapChange: false
ports:
Expand Down Expand Up @@ -825,6 +837,9 @@ proxy:
enabled: true
interval: 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
restartPodsOnConfigMapChange: false
# nodeSelector:
Expand Down