mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #84888 from neolit123/1.17-fix-kube-proxy-env-vars
kubeadm: fix an issue with the kube-proxy container env. variables
This commit is contained in:
commit
c843d9614c
@ -129,8 +129,9 @@ func createKubeProxyAddon(configMapBytes, daemonSetbytes []byte, client clientse
|
||||
if err := kuberuntime.DecodeInto(clientsetscheme.Codecs.UniversalDecoder(), daemonSetbytes, kubeproxyDaemonSet); err != nil {
|
||||
return errors.Wrap(err, "unable to decode kube-proxy daemonset")
|
||||
}
|
||||
// propagate http/https proxy env vars
|
||||
kubeproxyDaemonSet.Spec.Template.Spec.Containers[0].Env = kubeadmutil.GetProxyEnvVars()
|
||||
// Propagate the http/https proxy host environment variables to the container
|
||||
env := &kubeproxyDaemonSet.Spec.Template.Spec.Containers[0].Env
|
||||
*env = append(*env, kubeadmutil.GetProxyEnvVars()...)
|
||||
|
||||
// Create the DaemonSet for kube-proxy or update it in case it already exists
|
||||
return apiclient.CreateOrUpdateDaemonSet(client, kubeproxyDaemonSet)
|
||||
|
Loading…
Reference in New Issue
Block a user