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]>
  • Loading branch information
AdrianPedriza committed Oct 21, 2024
1 parent 9a7b4d1 commit 4cafc83
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 4cafc83

Please sign in to comment.