Use proxy settings in machine-config-daemon-firstboot service
This allows pulling container images when behind a proxy.
@@ -16,6 +16,18 @@ contents: |
RemainAfterExit=yes
ExecStart=/run/bin/machine-config-daemon firstboot-complete-machineconfig
+ {{if .Proxy -}}
+ {{if .Proxy.HTTPProxy -}}
+ Environment=HTTP_PROXY={{.Proxy.HTTPProxy}}
+ {{end -}}
+ {{if .Proxy.HTTPSProxy -}}
+ Environment=HTTPS_PROXY={{.Proxy.HTTPSProxy}}
+ {{end -}}
+ {{if .Proxy.NoProxy -}}
+ Environment=NO_PROXY={{.Proxy.NoProxy}}
+ {{end -}}
+ {{end -}}
+
[Install]
WantedBy=multi-user.target
RequiredBy=crio.service kubelet.service
