From f00193179b8d083e8b609ef587c72d66c633072e Mon Sep 17 00:00:00 2001 From: Nicole Date: Tue, 5 Mar 2024 12:19:22 -0700 Subject: [PATCH] [prometheus-node-exporter] Add Variables for Proxy Endpoints Arg and Health Check Ports (#4325) * added vars for proxy endpoints and also for reading and health checks Signed-off-by: Nicole * remove healthz port Signed-off-by: Nicole * update ds with no duplicate port for healthz Signed-off-by: Nicole * disable kubeproxy from testing Signed-off-by: Nicole * fix comments in values files Signed-off-by: Nicole --------- Signed-off-by: Nicole --- charts/prometheus-node-exporter/Chart.yaml | 2 +- charts/prometheus-node-exporter/templates/daemonset.yaml | 9 ++++++--- charts/prometheus-node-exporter/values.yaml | 6 ++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/charts/prometheus-node-exporter/Chart.yaml b/charts/prometheus-node-exporter/Chart.yaml index 7e88090e7ddc..3f502dab141a 100644 --- a/charts/prometheus-node-exporter/Chart.yaml +++ b/charts/prometheus-node-exporter/Chart.yaml @@ -6,7 +6,7 @@ keywords: - prometheus - exporter type: application -version: 4.30.3 +version: 4.31.0 appVersion: 1.7.0 home: https://github.com/prometheus/node_exporter/ sources: diff --git a/charts/prometheus-node-exporter/templates/daemonset.yaml b/charts/prometheus-node-exporter/templates/daemonset.yaml index f0e345b972b8..23896a230a06 100644 --- a/charts/prometheus-node-exporter/templates/daemonset.yaml +++ b/charts/prometheus-node-exporter/templates/daemonset.yaml @@ -188,7 +188,7 @@ spec: {{- end }} - --secure-listen-address=:{{ .Values.service.port}} - --upstream=http://127.0.0.1:{{ $servicePort }}/ - - --proxy-endpoints-port=8888 + - --proxy-endpoints-port={{ .Values.kubeRBACProxy.proxyEndpointsPort }} - --config-file=/etc/kube-rbac-proxy-config/config-file.yaml volumeMounts: - name: kube-rbac-proxy-config @@ -205,12 +205,15 @@ spec: {{- if .Values.kubeRBACProxy.enableHostPort }} hostPort: {{ .Values.service.port }} {{- end }} - - containerPort: 8888 + - containerPort: {{ .Values.kubeRBACProxy.proxyEndpointsPort }} + {{- if .Values.kubeRBACProxy.enableProxyEndpointsHostPort }} + hostPort: {{ .Values.kubeRBACProxy.proxyEndpointsPort }} + {{- end }} name: "http-healthz" readinessProbe: httpGet: scheme: HTTPS - port: 8888 + port: {{ .Values.kubeRBACProxy.proxyEndpointsPort }} path: healthz initialDelaySeconds: 5 timeoutSeconds: 5 diff --git a/charts/prometheus-node-exporter/values.yaml b/charts/prometheus-node-exporter/values.yaml index ed4607da310a..8246df236376 100644 --- a/charts/prometheus-node-exporter/values.yaml +++ b/charts/prometheus-node-exporter/values.yaml @@ -66,6 +66,12 @@ kubeRBACProxy: # Configure a hostPort. If true, hostPort will be enabled in the container and set to service.port. enableHostPort: false + # Configure Proxy Endpoints Port + # This is the port being probed for readiness + proxyEndpointsPort: 8888 + # Configure a hostPort. If true, hostPort will be enabled in the container and set to proxyEndpointsPort. + enableProxyEndpointsHostPort: false + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little