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

Add proxy config for containerd and apt on ubuntu #281

Merged
merged 1 commit into from
Mar 17, 2024
Merged

Conversation

andrewbonney
Copy link
Contributor

@andrewbonney andrewbonney commented Dec 20, 2023

This PR adds support for HTTP proxy servers in user clusters, with config supplied via the existing Magnum proxy variables. Specifically, proxies are configured in containerd for image downloads, and in apt when running Ubuntu.

I've had to add a placeholder file to the KubeadmConfigTemplate as otherwise the JSON patch process fails when adding files to the empty array.

@andrewbonney
Copy link
Contributor Author

Related issue: #258

@andrewbonney
Copy link
Contributor Author

@mnaser @okozachenko1203 Flatcar is fixed here now. Review comments welcome when you have time.

@mnaser
Copy link
Member

mnaser commented Mar 8, 2024

Seems to fail locally:

E0308 05:58:01.965804       1 reconcile_state.go:1036] "Failed to create object" err="failed to create typed patch object (magnum-system/kube-948gg-cc54f; controlplane.cluster.x-k8s.io/v1beta1, Kind=KubeadmControlPlane): .spec.kubeadmConfigSpec.preKubeadmCommands[1]: expected string, got &value.valueUnstructured{Value:[]interface {}{\"systemctl daemon-reload\", \"systemctl restart containerd\"}}" controller="topology/cluster" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="magnum-system/kube-948gg" namespace="magnum-system" name="kube-948gg" reconcileID="86d13666-5fab-4b98-abac-854c7af609a1" resource={"group":"controlplane.cluster.x-k8s.io","version":"v1beta1","resource":"KubeadmControlPlane"} KubeadmControlPlane="magnum-system/kube-948gg-cc54f" KubeadmControlPlane="magnum-system/kube-948gg-cc54f"

},
{
"op": "add",
"path": "/spec/template/spec/kubeadmConfigSpec/preKubeadmCommands/-",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"path": "/spec/template/spec/kubeadmConfigSpec/preKubeadmCommands/-",
"path": "/spec/template/spec/kubeadmConfigSpec/preKubeadmCommands/-",

Maybe this shouldn't have the trailing /- ?

@mnaser mnaser merged commit 113de30 into vexxhost:main Mar 17, 2024
18 checks passed
@mnaser mnaser mentioned this pull request Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants