From cf03453a87ad620d5916779e9ebb6f4b58ba2955 Mon Sep 17 00:00:00 2001 From: Piotr Kruk Date: Mon, 23 Sep 2024 00:02:47 +0200 Subject: [PATCH] fix: Add metric port for daemonset (#20) Co-authored-by: Piotr Kruk --- .../eks-pod-identity-agent/templates/daemonset.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/eks-pod-identity-agent/templates/daemonset.yaml b/charts/eks-pod-identity-agent/templates/daemonset.yaml index 5c0decd..fc4a5b3 100644 --- a/charts/eks-pod-identity-agent/templates/daemonset.yaml +++ b/charts/eks-pod-identity-agent/templates/daemonset.yaml @@ -67,6 +67,10 @@ spec: - {{ .Values.clusterName | quote }} - "--probe-port" - {{ .Values.agent.probePort | quote }} + {{- if .Values.metrics.enabled }} + - "--metrics-port" + - {{ .Values.metrics.port | quote }} + {{- end }} {{- range $key, $value := .Values.agent.additionalArgs }} - {{ $key | quote }} - {{ $value | quote }} @@ -78,6 +82,11 @@ spec: - containerPort: {{ .Values.agent.probePort }} protocol: TCP name: probes-port + {{- if .Values.metrics.enabled }} + - containerPort: {{ .Values.metrics.port }} + protocol: TCP + name: metrics + {{- end }} env: {{- range $key, $value := .Values.env }} - name: {{ $key }} @@ -110,4 +119,4 @@ spec: scheme: HTTP initialDelaySeconds: 1 timeoutSeconds: 10 - {{- end }} \ No newline at end of file + {{- end }}