Skip to content

Commit

Permalink
Fix misnaming of relabeling and processing rules (#1068)
Browse files Browse the repository at this point in the history
* Fix misnaming of relabeling and processing rules

Signed-off-by: Pete Wall <[email protected]>

* Also need to check for extraMetricRelabelingRules

Signed-off-by: Pete Wall <[email protected]>

---------

Signed-off-by: Pete Wall <[email protected]>
  • Loading branch information
petewall authored Jan 8, 2025
1 parent 255852f commit 3ec6451
Show file tree
Hide file tree
Showing 9 changed files with 198 additions and 5 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ prometheus.operator.podmonitors "pod_monitors" {
{{ .Values.metrics.podMonitors.extraRelabelingRules | indent 2 }}
{{- end }}

{{- if or $metricAllowList $metricDenyList .Values.metrics.podMonitors.extraMetricProcessingRules }}
{{- if or $metricAllowList $metricDenyList .Values.metrics.extraMetricRelabelingRules .Values.metrics.podMonitors.extraMetricRelabelingRules }}
forward_to = [prometheus.relabel.podmonitors.receiver]
}

Expand Down Expand Up @@ -85,7 +85,7 @@ prometheus.operator.probes "probes" {
{{ .Values.metrics.probes.extraRelabelingRules | indent 2 }}
{{- end }}

{{- if or $metricAllowList $metricDenyList .Values.metrics.probes.extraMetricProcessingRules }}
{{- if or $metricAllowList $metricDenyList .Values.metrics.extraMetricRelabelingRules .Values.metrics.probes.extraMetricRelabelingRules }}
forward_to = [prometheus.relabel.probes.receiver]
}

Expand Down Expand Up @@ -144,7 +144,7 @@ prometheus.operator.servicemonitors "service_monitors" {
{{ .Values.metrics.serviceMonitors.extraRelabelingRules | indent 2 }}
{{- end }}

{{- if or $metricAllowList $metricDenyList .Values.metrics.serviceMonitors.extraMetricProcessingRules }}
{{- if or $metricAllowList $metricDenyList .Values.metrics.extraMetricRelabelingRules .Values.metrics.serviceMonitors.extraMetricRelabelingRules }}
forward_to = [prometheus.relabel.servicemonitors.receiver]
}

Expand Down
2 changes: 1 addition & 1 deletion charts/k8s-monitoring/docs/examples/extra-rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ destinations:
clusterMetrics:
enabled: true
kube-state-metrics:
extraMetricRelabelingRules: |-
extraMetricProcessingRules: |-
rule {
source_labels = ["namespace"]
regex = "production"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions charts/k8s-monitoring/docs/examples/extra-rules/output.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ destinations:
clusterMetrics:
enabled: true
kube-state-metrics:
extraMetricRelabelingRules: |-
extraMetricProcessingRules: |-
rule {
source_labels = ["namespace"]
regex = "production"
Expand Down

0 comments on commit 3ec6451

Please sign in to comment.