Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass proxy environment to machine-controller. #657

Merged
merged 1 commit into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkg/templates/machinecontroller/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
10 changes: 10 additions & 0 deletions pkg/templates/machinecontroller/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down