From 79cc71d2be5060544d867d93560a6a80bd7f45c3 Mon Sep 17 00:00:00 2001 From: Reed Schalo Date: Thu, 12 Sep 2024 11:41:33 -0700 Subject: [PATCH] fix: backport consume log path values (#6875) (#6994) --- charts/karpenter/templates/_helpers.tpl | 26 ---------------------- charts/karpenter/templates/deployment.yaml | 8 +++++++ 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/charts/karpenter/templates/_helpers.tpl b/charts/karpenter/templates/_helpers.tpl index 701fab128153..70827dcc0e70 100644 --- a/charts/karpenter/templates/_helpers.tpl +++ b/charts/karpenter/templates/_helpers.tpl @@ -140,29 +140,3 @@ This works because Helm treats dictionaries as mutable objects and allows passin {{- include "karpenter.patchLabelSelector" (merge (dict "_target" $constraint) $) }} {{- end }} {{- end }} - -{{/* -Flatten the stdout logging outputs from args provided -*/}} -{{- define "karpenter.outputPathsList" -}} -{{ $paths := list -}} -{{- range .Values.logOutputPaths -}} - {{- if not (has (printf "%s" . | quote) $paths) -}} - {{- $paths = printf "%s" . | quote | append $paths -}} - {{- end -}} -{{- end -}} -{{ $paths | join ", " }} -{{- end -}} - -{{/* -Flatten the stderr logging outputs from args provided -*/}} -{{- define "karpenter.errorOutputPathsList" -}} -{{ $paths := list -}} -{{- range .Values.logErrorOutputPaths -}} - {{- if not (has (printf "%s" . | quote) $paths) -}} - {{- $paths = printf "%s" . | quote | append $paths -}} - {{- end -}} -{{- end -}} -{{ $paths | join ", " }} -{{- end -}} diff --git a/charts/karpenter/templates/deployment.yaml b/charts/karpenter/templates/deployment.yaml index 15389c2342ce..f6ce7ff5ca39 100644 --- a/charts/karpenter/templates/deployment.yaml +++ b/charts/karpenter/templates/deployment.yaml @@ -87,6 +87,14 @@ spec: {{- with .Values.logLevel }} - name: LOG_LEVEL value: "{{ . }}" + {{- end }} + {{- with .Values.logOutputPaths }} + - name: LOG_OUTPUT_PATHS + value: "{{ join "," . }}" + {{- end }} + {{- with .Values.logErrorOutputPaths }} + - name: LOG_ERROR_OUTPUT_PATHS + value: "{{ join "," . }}" {{- end }} - name: METRICS_PORT value: "{{ .Values.controller.metrics.port }}"