Skip to content

Commit

Permalink
fix: backport consume log path values (#6875) (#6994)
Browse files Browse the repository at this point in the history
  • Loading branch information
rschalo authored Sep 12, 2024
1 parent b897114 commit 79cc71d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
26 changes: 0 additions & 26 deletions charts/karpenter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
8 changes: 8 additions & 0 deletions charts/karpenter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down

0 comments on commit 79cc71d

Please sign in to comment.