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 }}"