diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 9cdbd26ef37e..c764c099480b 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 56.15.0 +version: 56.16.0 appVersion: v0.71.2 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/ci/03-non-defaults-values.yaml b/charts/kube-prometheus-stack/ci/03-non-defaults-values.yaml index 62d87504dbf4..36e093a340dc 100644 --- a/charts/kube-prometheus-stack/ci/03-non-defaults-values.yaml +++ b/charts/kube-prometheus-stack/ci/03-non-defaults-values.yaml @@ -52,6 +52,7 @@ coreDns: service: enabled: false serviceMonitor: + port: metrics selector: matchLabels: k8s-app: '{{ $.Release.Name }}' diff --git a/charts/kube-prometheus-stack/templates/exporters/core-dns/service.yaml b/charts/kube-prometheus-stack/templates/exporters/core-dns/service.yaml index 2eaefc4d469a..b8618f7558bf 100644 --- a/charts/kube-prometheus-stack/templates/exporters/core-dns/service.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/core-dns/service.yaml @@ -11,7 +11,7 @@ metadata: spec: clusterIP: None ports: - - name: http-metrics + - name: {{ .Values.coreDns.serviceMonitor.port }} port: {{ .Values.coreDns.service.port }} protocol: TCP targetPort: {{ .Values.coreDns.service.targetPort }} diff --git a/charts/kube-prometheus-stack/templates/exporters/core-dns/servicemonitor.yaml b/charts/kube-prometheus-stack/templates/exporters/core-dns/servicemonitor.yaml index 59cd363c65d4..9f057d4d4ae9 100644 --- a/charts/kube-prometheus-stack/templates/exporters/core-dns/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/core-dns/servicemonitor.yaml @@ -29,7 +29,7 @@ spec: matchNames: - "kube-system" endpoints: - - port: http-metrics + - port: {{ .Values.coreDns.serviceMonitor.port }} {{- if .Values.coreDns.serviceMonitor.interval}} interval: {{ .Values.coreDns.serviceMonitor.interval }} {{- end }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/endpoints.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/endpoints.yaml index 43094d6a63af..6a6afa6412f3 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/endpoints.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/endpoints.yaml @@ -14,7 +14,7 @@ subsets: - ip: {{ . }} {{- end }} ports: - - name: http-metrics + - name: {{ .Values.kubeControllerManager.serviceMonitor.port }} {{- $kubeControllerManagerDefaultInsecurePort := 10252 }} {{- $kubeControllerManagerDefaultSecurePort := 10257 }} port: {{ include "kube-prometheus-stack.kubeControllerManager.insecureScrape" (list . $kubeControllerManagerDefaultInsecurePort $kubeControllerManagerDefaultSecurePort .Values.kubeControllerManager.service.port) }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/service.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/service.yaml index 894c983e10c7..43b1a976d5e5 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/service.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/service.yaml @@ -11,7 +11,7 @@ metadata: spec: clusterIP: None ports: - - name: http-metrics + - name: {{ .Values.kubeControllerManager.serviceMonitor.port }} {{- $kubeControllerManagerDefaultInsecurePort := 10252 }} {{- $kubeControllerManagerDefaultSecurePort := 10257 }} port: {{ include "kube-prometheus-stack.kubeControllerManager.insecureScrape" (list . $kubeControllerManagerDefaultInsecurePort $kubeControllerManagerDefaultSecurePort .Values.kubeControllerManager.service.port) }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/servicemonitor.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/servicemonitor.yaml index f0d7e1b7d163..d4813f0b5308 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-controller-manager/servicemonitor.yaml @@ -29,7 +29,7 @@ spec: matchNames: - "kube-system" endpoints: - - port: http-metrics + - port: {{ .Values.kubeControllerManager.serviceMonitor.port }} {{- if .Values.kubeControllerManager.serviceMonitor.interval }} interval: {{ .Values.kubeControllerManager.serviceMonitor.interval }} {{- end }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-etcd/endpoints.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-etcd/endpoints.yaml index babbd3efc75b..e3664475774d 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-etcd/endpoints.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-etcd/endpoints.yaml @@ -14,7 +14,7 @@ subsets: - ip: {{ . }} {{- end }} ports: - - name: http-metrics + - name: {{ .Values.kubeEtcd.serviceMonitor.port }} port: {{ .Values.kubeEtcd.service.port }} protocol: TCP {{- end }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-etcd/service.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-etcd/service.yaml index eb519e623a09..d07d4f35e311 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-etcd/service.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-etcd/service.yaml @@ -11,7 +11,7 @@ metadata: spec: clusterIP: None ports: - - name: http-metrics + - name: {{ .Values.kubeEtcd.serviceMonitor.port }} port: {{ .Values.kubeEtcd.service.port }} protocol: TCP targetPort: {{ .Values.kubeEtcd.service.targetPort }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-etcd/servicemonitor.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-etcd/servicemonitor.yaml index 43c95e56890a..f76e971a6b6b 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-etcd/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-etcd/servicemonitor.yaml @@ -29,7 +29,7 @@ spec: matchNames: - "kube-system" endpoints: - - port: http-metrics + - port: {{ .Values.kubeEtcd.serviceMonitor.port }} {{- if .Values.kubeEtcd.serviceMonitor.interval }} interval: {{ .Values.kubeEtcd.serviceMonitor.interval }} {{- end }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-proxy/endpoints.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-proxy/endpoints.yaml index 8e7c0618c5d3..8613e62425f9 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-proxy/endpoints.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-proxy/endpoints.yaml @@ -14,7 +14,7 @@ subsets: - ip: {{ . }} {{- end }} ports: - - name: http-metrics + - name: {{ .Values.kubeProxy.serviceMonitor.port }} port: {{ .Values.kubeProxy.service.port }} protocol: TCP {{- end }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-proxy/service.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-proxy/service.yaml index 03aa62b13edc..8ccb2210d742 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-proxy/service.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-proxy/service.yaml @@ -11,7 +11,7 @@ metadata: spec: clusterIP: None ports: - - name: http-metrics + - name: {{ .Values.kubeProxy.serviceMonitor.port }} port: {{ .Values.kubeProxy.service.port }} protocol: TCP targetPort: {{ .Values.kubeProxy.service.targetPort }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-proxy/servicemonitor.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-proxy/servicemonitor.yaml index 5fec31a95e8c..ab9bb8fa8120 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-proxy/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-proxy/servicemonitor.yaml @@ -29,7 +29,7 @@ spec: matchNames: - "kube-system" endpoints: - - port: http-metrics + - port: {{ .Values.kubeProxy.serviceMonitor.port }} {{- if .Values.kubeProxy.serviceMonitor.interval }} interval: {{ .Values.kubeProxy.serviceMonitor.interval }} {{- end }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/endpoints.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/endpoints.yaml index 3b93dc29361e..6236b42f1010 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/endpoints.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/endpoints.yaml @@ -14,7 +14,7 @@ subsets: - ip: {{ . }} {{- end }} ports: - - name: http-metrics + - name: {{ .Values.kubeScheduler.serviceMonitor.port }} {{- $kubeSchedulerDefaultInsecurePort := 10251 }} {{- $kubeSchedulerDefaultSecurePort := 10259 }} port: {{ include "kube-prometheus-stack.kubeScheduler.insecureScrape" (list . $kubeSchedulerDefaultInsecurePort $kubeSchedulerDefaultSecurePort .Values.kubeScheduler.service.port) }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/service.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/service.yaml index d9fb4575b237..90b3a800a4c3 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/service.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/service.yaml @@ -11,7 +11,7 @@ metadata: spec: clusterIP: None ports: - - name: http-metrics + - name: {{ .Values.kubeScheduler.serviceMonitor.port }} {{- $kubeSchedulerDefaultInsecurePort := 10251 }} {{- $kubeSchedulerDefaultSecurePort := 10259 }} port: {{ include "kube-prometheus-stack.kubeScheduler.insecureScrape" (list . $kubeSchedulerDefaultInsecurePort $kubeSchedulerDefaultSecurePort .Values.kubeScheduler.service.port) }} diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/servicemonitor.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/servicemonitor.yaml index 82a1c6bdc2ff..73de91de12c0 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-scheduler/servicemonitor.yaml @@ -29,7 +29,7 @@ spec: matchNames: - "kube-system" endpoints: - - port: http-metrics + - port: {{ .Values.kubeScheduler.serviceMonitor.port }} {{- if .Values.kubeScheduler.serviceMonitor.interval }} interval: {{ .Values.kubeScheduler.serviceMonitor.interval }} {{- end }} diff --git a/charts/kube-prometheus-stack/values.yaml b/charts/kube-prometheus-stack/values.yaml index b03a49a31ed1..c60f5d04c4a0 100644 --- a/charts/kube-prometheus-stack/values.yaml +++ b/charts/kube-prometheus-stack/values.yaml @@ -1486,6 +1486,10 @@ kubeControllerManager: ## proxyUrl: "" + ## port: Name of the port the metrics will be scraped from + ## + port: http-metrics + jobLabel: jobLabel selector: {} # matchLabels: @@ -1567,6 +1571,10 @@ coreDns: ## proxyUrl: "" + ## port: Name of the port the metrics will be scraped from + ## + port: http-metrics + jobLabel: jobLabel selector: {} # matchLabels: @@ -1754,6 +1762,10 @@ kubeEtcd: certFile: "" keyFile: "" + ## port: Name of the port the metrics will be scraped from + ## + port: http-metrics + jobLabel: jobLabel selector: {} # matchLabels: @@ -1842,6 +1854,10 @@ kubeScheduler: ## https: null + ## port: Name of the port the metrics will be scraped from + ## + port: http-metrics + jobLabel: jobLabel selector: {} # matchLabels: @@ -1926,6 +1942,10 @@ kubeProxy: ## proxyUrl: "" + ## port: Name of the port the metrics will be scraped from + ## + port: http-metrics + jobLabel: jobLabel selector: {} # matchLabels: