Skip to content

Commit

Permalink
feat(vector): add podMonitor.podTargetLabels (#319)
Browse files Browse the repository at this point in the history
* feat(vector): add podMonitor.podTargetLabels

* Apply suggestions from code review

* bump vector chart version to v0.25.0

* bump version in chart/vector/README.md

---------

Co-authored-by: Doug Smith <[email protected]>
  • Loading branch information
anisimovdk and dsmith3197 authored Aug 23, 2023
1 parent 1f51325 commit 25fa9d2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/vector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: vector
version: "0.24.1"
version: "0.25.0"
kubeVersion: ">=1.15.0-0"
description: A lightweight, ultra-fast tool for building observability pipelines
type: application
Expand Down
3 changes: 2 additions & 1 deletion charts/vector/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vector

![Version: 0.24.1](https://img.shields.io/badge/Version-0.24.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.32.1-distroless-libc](https://img.shields.io/badge/AppVersion-0.32.1--distroless--libc-informational?style=flat-square)
![Version: 0.25.0](https://img.shields.io/badge/Version-0.25.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.32.1-distroless-libc](https://img.shields.io/badge/AppVersion-0.32.1--distroless--libc-informational?style=flat-square)

[Vector](https://vector.dev/) is a high-performance, end-to-end observability data pipeline that puts you in control of your observability data. Collect, transform, and route all your logs, metrics, and traces to any vendors you want today and any other vendors you may want tomorrow. Vector enables dramatic cost reduction, novel data enrichment, and data security where you need it, not where is most convenient for your vendors.

Expand Down Expand Up @@ -188,6 +188,7 @@ helm install --name <RELEASE_NAME> \
| podMonitor.jobLabel | string | `"app.kubernetes.io/name"` | Override the label to retrieve the job name from. |
| podMonitor.metricRelabelings | list | `[]` | [MetricRelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs) to apply to samples before ingestion. |
| podMonitor.path | string | `"/metrics"` | Override the path to scrape. |
| podMonitor.podTargetLabels | list | `[]` | [podTargetLabels](https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitorSpec) transfers labels on the Kubernetes Pod onto the target. |
| podMonitor.port | string | `"prom-exporter"` | Override the port to scrape. |
| podMonitor.relabelings | list | `[]` | [RelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) to apply to samples before scraping. |
| podMonitor.scrapeTimeout | string | `nil` | Override the timeout after which the scrape is ended. |
Expand Down
4 changes: 4 additions & 0 deletions charts/vector/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
{{- with .Values.podMonitor.podTargetLabels }}
podTargetLabels:
{{- toYaml . | nindent 4 }}
{{- end }}
podMetricsEndpoints:
- port: {{ .Values.podMonitor.port }}
path: {{ .Values.podMonitor.path }}
Expand Down
3 changes: 3 additions & 0 deletions charts/vector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ podMonitor:
# podMonitor.metricRelabelings -- [MetricRelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs)
# to apply to samples before ingestion.
metricRelabelings: []
# podMonitor.podTargetLabels -- [podTargetLabels](https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitorSpec)
# transfers labels on the Kubernetes Pod onto the target.
podTargetLabels: []
# podMonitor.additionalLabels -- Adds additional labels to the PodMonitor.
additionalLabels: {}
# podMonitor.honorLabels -- If true, honor_labels is set to true in the [scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config).
Expand Down

0 comments on commit 25fa9d2

Please sign in to comment.