From 66877a98b122e38218636320a71ee84973b07b94 Mon Sep 17 00:00:00 2001 From: odcheck Date: Wed, 9 Oct 2024 00:39:37 +0200 Subject: [PATCH] chore(helm): make metrics port configurable using helm (#122) Co-authored-by: Ben Odenthal --- chart/templates/DeployType.yaml | 6 +++--- chart/templates/metrics.yaml | 2 +- chart/values.yaml | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/chart/templates/DeployType.yaml b/chart/templates/DeployType.yaml index 25d6512..7cee517 100644 --- a/chart/templates/DeployType.yaml +++ b/chart/templates/DeployType.yaml @@ -46,7 +46,7 @@ spec: {{- toYaml .Values.resources | nindent 12 }} ports: - name: metrics - containerPort: 9100 + containerPort: {{ .Values.metrics.port }} protocol: TCP {{ if .Values.dev.enabled }} - name: debug @@ -62,7 +62,7 @@ spec: failureThreshold: 10 httpGet: path: /metrics - port: 9100 + port: {{ .Values.metrics.port }} scheme: HTTP initialDelaySeconds: 10 periodSeconds: 10 @@ -72,7 +72,7 @@ spec: failureThreshold: 10 httpGet: path: /metrics - port: 9100 + port: {{ .Values.metrics.port }} scheme: HTTP periodSeconds: 10 successThreshold: 1 diff --git a/chart/templates/metrics.yaml b/chart/templates/metrics.yaml index fe6d5e7..ad81159 100644 --- a/chart/templates/metrics.yaml +++ b/chart/templates/metrics.yaml @@ -58,7 +58,7 @@ spec: {{- include "chart.selectorLabels" . | nindent 6 }} ports: - name: metrics - port: 9100 + port: {{ .Values.metrics.port }} protocol: TCP targetPort: metrics {{ end }} diff --git a/chart/values.yaml b/chart/values.yaml index e3696f5..03f8a95 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -26,6 +26,8 @@ kubelet: # -- Set metrics you want to enable metrics: + # -- Adjust the metric port as needed (default 9100) + port: 9100 # -- Percentage of ephemeral storage used by a container in a pod ephemeral_storage_container_limit_percentage: true # -- Current ephemeral storage used by a container's volume in a pod