Skip to content

Commit

Permalink
Fix env variables propagation to k0s service
Browse files Browse the repository at this point in the history
Systemd script was reading the environment variables in the wrong way, so the environment variables were not propagated to the k0s service.

Signed-off-by: Adrian Pedriza <[email protected]>
(cherry picked from commit 4cafc83)
  • Loading branch information
AdrianPedriza authored and github-actions[bot] committed Oct 22, 2024
1 parent 5998f53 commit a2dcc08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/install/linux_systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ ConditionFileIsExecutable={{.Path|cmdEscape}}
StartLimitInterval=5
StartLimitBurst=10
ExecStart={{.Path|cmdEscape}}{{range .Arguments}} {{.|cmdEscape}}{{end}}
Environment="{{- range $key, $value := .EnvVars}}{{$key}}={{$value}} {{- end}}"
{{- if .Option.Environment}}{{range .Option.Environment}}
Environment="{{.}}"{{end}}{{- end}}
RestartSec=10
Delegate=yes
Expand Down

0 comments on commit a2dcc08

Please sign in to comment.