-
Notifications
You must be signed in to change notification settings - Fork 36
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
ProxyConfigSpec
also configures environment variables of the control plane components
#299
Comments
One addition: during the initial definition of the proxy-variables i didn't know the apiserver loadbalancer IP. It means i have to create the cluster first with the proxy variables (and hope that the proxy-server itself is able to reach the kubernetes api server). and once the cluster got created i have to set the api-server IP to the |
@bavarianbidi do you mean that |
@arunmk that's what i expect reading the documentation ( |
And it might be also a chicken-egg problem: if the k8s-api loadbalancer is generated with a dynamic ip i might not know during the cluster-creation, the |
Just FYI: apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
[...]
spec:
kubeadmConfigSpec:
files:
- path: /etc/systemd/system/containerd.service.d/99-http-proxy.conf
permissions: "0600"
contentFrom:
secret:
name: mycluster-cluster-values-containerd-proxy
key: containerdProxy
preKubeadmCommands:
- systemctl daemon-reload
- systemctl restart containerd @arunmk would you accept a PR to drop this build in proxy configuration out of the embedded cloud-init.conf.tmpl file? If so would you also aggree an removing the proxy config out of the |
@bavarianbidi apologies for the delay. Can you please publish a PR. |
Hi @arunmk, i've created draft PR #356. As |
Describe the bug
A set
ProxyConfigSpec
in thevcdcluster
object does not even configure the proxy forcontainerd
(as documented) it also configures the pod manifest files of the control plane components and inject the proxy variable there.As the variables
HTTP_PROXY
/HTTPS_PROXY
andNO_PROXY
are exported to the shell wherekubeadm
is getting called (xref:cloud_init.tmpl
),kubeadm
is discovering the proxy variables and injecting these to the control plane manifests.If
noProxy
isn't configured (as not needed when only fetching images from public registries through a proxy), the kubernetes control-plane components are failling as the make use of theHTTPS_PROXY
andHTTP_PROXY
variable for every request asNO_PROXY
is empty.Reproduction steps
httpProxy
andhttpsProxy
is configured invcdcluster.spec.proxyConfig
Expected behavior
According to the documentation that only
containerd
is configured for the proxy, the control-plane components should work with an unsetNO_PROXY
variable.Additional context
The text was updated successfully, but these errors were encountered: