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

Added support for metricRelabelings #12656

Closed
wants to merge 5 commits into from
Closed
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
5 changes: 4 additions & 1 deletion charts/linkerd-control-plane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,16 @@ Kubernetes: `>=1.22.0-0`
| podAnnotations | object | `{}` | Additional annotations to add to all pods |
| podLabels | object | `{}` | Additional labels to add to all pods |
| podMonitor.controller.enabled | bool | `true` | Enables the creation of PodMonitor for the control-plane |
| podMonitor.controller.metricRelabelings | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion |
| podMonitor.controller.namespaceSelector | string | `"matchNames:\n - {{ .Release.Namespace }}\n - linkerd-viz\n - linkerd-jaeger\n"` | Selector to select which namespaces the Endpoints objects are discovered from |
| podMonitor.enabled | bool | `false` | Enables the creation of Prometheus Operator [PodMonitor](https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitor) |
| podMonitor.labels | object | `{}` | Labels to apply to all pod Monitors |
| podMonitor.proxy.enabled | bool | `true` | Enables the creation of PodMonitor for the data-plane |
| podMonitor.proxy.metricRelabelings | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion |
| podMonitor.scrapeInterval | string | `"10s"` | Interval at which metrics should be scraped |
| podMonitor.scrapeTimeout | string | `"10s"` | Iimeout after which the scrape is ended |
| podMonitor.serviceMirror.enabled | bool | `true` | Enables the creation of PodMonitor for the Service Mirror component |
| podMonitor.serviceMirror.metricRelabelings | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion |
| policyController.image.name | string | `"cr.l5d.io/linkerd/policy-controller"` | Docker image for the policy controller |
| policyController.image.pullPolicy | string | imagePullPolicy | Pull policy for the policy controller container image |
| policyController.image.version | string | linkerdVersion | Tag for the policy controller container image |
Expand Down Expand Up @@ -313,4 +316,4 @@ Kubernetes: `>=1.22.0-0`
| webhookFailurePolicy | string | `"Ignore"` | Failure policy for the proxy injector |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
13 changes: 12 additions & 1 deletion charts/linkerd-control-plane/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
- __meta_kubernetes_pod_container_name
action: replace
targetLabel: component
{{- with $podMonitor.controller.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if and $podMonitor.enabled $podMonitor.serviceMirror.enabled }}
---
Expand Down Expand Up @@ -66,7 +70,10 @@ spec:
- __meta_kubernetes_pod_container_name
action: replace
targetLabel: component
{{- end }}
{{- with $podMonitor.serviceMirror.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and $podMonitor.enabled $podMonitor.proxy.enabled }}
---
###
Expand Down Expand Up @@ -125,4 +132,8 @@ spec:
regex: __tmp_pod_label_linkerd_io_(.+)
- action: labelmap
regex: __tmp_pod_label_(.+)
{{- with $podMonitor.serviceMirror.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/linkerd-control-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,15 @@ podMonitor:
- {{ .Release.Namespace }}
- linkerd-viz
- linkerd-jaeger
# -- MetricRelabelConfigs to apply to samples before ingestion
metricRelabelings: []
serviceMirror:
# -- Enables the creation of PodMonitor for the Service Mirror component
enabled: true
# -- MetricRelabelConfigs to apply to samples before ingestion
metricRelabelings: []
proxy:
# -- Enables the creation of PodMonitor for the data-plane
enabled: true
# -- MetricRelabelConfigs to apply to samples before ingestion
metricRelabelings: []