diff --git a/pkg/templates/machinecontroller/deployment.go b/pkg/templates/machinecontroller/deployment.go index 5d755f3be..3fa584c89 100644 --- a/pkg/templates/machinecontroller/deployment.go +++ b/pkg/templates/machinecontroller/deployment.go @@ -700,6 +700,16 @@ func machineControllerDeployment(cluster *kubeoneapi.KubeOneCluster, credentials } envVar, err := credentials.EnvVarBindings(cluster.CloudProvider.Name, credentialsFilePath) + envVar = append(envVar, + corev1.EnvVar{ + Name: "HTTPS_PROXY", + Value: cluster.Proxy.HTTPS, + }, + corev1.EnvVar{ + Name: "NO_PROXY", + Value: cluster.Proxy.NoProxy, + }, + ) if err != nil { return nil, errors.Wrap(err, "unable to get env var bindings for a secret") } diff --git a/pkg/templates/machinecontroller/webhook.go b/pkg/templates/machinecontroller/webhook.go index 26db89da6..f7772ce93 100644 --- a/pkg/templates/machinecontroller/webhook.go +++ b/pkg/templates/machinecontroller/webhook.go @@ -132,6 +132,16 @@ func webhookDeployment(cluster *kubeoneapi.KubeOneCluster, credentialsFilePath s var replicas int32 = 1 envVar, err := credentials.EnvVarBindings(cluster.CloudProvider.Name, credentialsFilePath) + envVar = append(envVar, + corev1.EnvVar{ + Name: "HTTPS_PROXY", + Value: cluster.Proxy.HTTPS, + }, + corev1.EnvVar{ + Name: "NO_PROXY", + Value: cluster.Proxy.NoProxy, + }, + ) if err != nil { return nil, errors.Wrap(err, "unable to get env var bindings for a secret") }