-
-
Notifications
You must be signed in to change notification settings - Fork 5
fix: replace Helm-based cloud-provider-kind installer with Docker container approach #2026
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
fix: replace Helm-based cloud-provider-kind installer with Docker container approach #2026
Conversation
Cloud-provider-kind is not distributed as a Helm chart. The correct approach is to run it as a Docker container with access to the Docker socket, connected to the KIND network. This commit: - Rewrites the cloud-provider-kind installer to use Docker API instead of Helm - Creates and manages the cloud-provider-kind container with proper configuration (Docker socket mount, KIND network connection) - Updates tests to use Docker client mocks instead of Helm mocks - Uses the official image: registry.k8s.io/cloud-provider-kind/cloud-controller-manager:latest Fixes the 404 error when trying to fetch non-existent Helm chart from https://kubernetes-sigs.github.io/cloud-provider-kind/index.yaml Co-authored-by: devantler <[email protected]>
|
@copilot is it possible to use the go packages instead of the docker container approach? Examine https://github.com/kubernetes-sigs/cloud-provider-kind to investigate my request |
Yes, cloud-provider-kind can be used as a Go package instead of running it as a Docker container. After examining the repository, I found: Go Package Approach:
Implementation would involve:
Benefits:
Considerations:
Would you like me to implement the Go package approach instead? |
Yes, this is much cleaner for ksail! Do however consider how to determine if a cloud provider is already running from another ksail binary call. |
I've investigated using cloud-provider-kind as a Go package, but the packages are not exported for external use. The What I found:
Alternative approaches: Option 1: Subprocess (recommended)
Option 2: Request upstream export
Option 3: Docker container (current impl)
Which approach would you prefer? I recommend Option 1 (subprocess) as it's cleaner than Docker while respecting the tool's intended usage model. |
cc570fa
into
daily-roadmap-progress/load-balancer-support-0ee01b0bbb4cd61f
Cloud-provider-kind installation was failing with a 404 error because it's not distributed as a Helm chart. The tool is designed to run as a standalone Docker container that monitors KIND clusters via the Docker socket.
Changes
Installer Implementation (
pkg/svc/installer/cloudproviderkind/installer.go)registry.k8s.io/cloud-provider-kind/cloud-controller-manager:latest/var/run/docker.sockfor cluster monitoringkindfor service discoveryunless-stoppedComponent Setup (
pkg/cli/setup/components.go)InstallLoadBalancerSilent()now usesdockerclient.GetDockerClient()instead of Helm client setupTests (
pkg/svc/installer/cloudproviderkind/installer_test.go)Context
Cloud-provider-kind runs outside the cluster as a sidecar container, not as an in-cluster Deployment. It monitors KIND clusters through the Docker socket and creates LoadBalancer containers dynamically. This architectural pattern is documented in the kubernetes-sigs/cloud-provider-kind repository.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.