smartxworks / cluster-api-provider-virtink

Kubernetes Cluster API Provider Virtink
Apache License 2.0
24 stars 2 forks source link

control plane load balancer is not ready #33

Closed Stringls closed 1 year ago

Stringls commented 1 year ago

Hi, folks! I deploy an external virtink cluster from the GKE management one to Hetzner workload cluster, but nothing happens. The logs of the controller says

2023-03-14T10:30:55.358Z        ERROR   Reconciler error        {"controller": "virtinkcluster", "controllerGroup": "infrastructure.cluster.x-k8s.io", "controllerKind": "VirtinkCluster", "virtinkCluster": {"name":"virtink","namespace":"default"}, "namespace": "default", "name": "virtink", "reconcileID": "2f2896d9-f6ab-40a9-adc9-b89d53967ace", "error": "control plane load balancer is not ready"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:234

I use a template of the external virtink cluster with LoadBalancer controlPlaneServiceType and it creates in Virtink Cluster a new LoadBalancer. I already have an existing LoadBalancer service that points to external ip of load balancer in Hetzner. How I can describe it in VirtInkCluster definition that I want to use an existing Load Balancer service instead of creating a new one. Also should it be a Load Balancer service that has external ip of kubeapi server? If I can't point on an existing one, am I able to add annotations to Load Balancer service in VirtinkCluster CRD, because it's required by Hetzner. Thanks!

fengye87 commented 1 year ago

Hi @Stringls , so you mean you have a LB type service in Virtink cluster and want that service to point to workload cluster's control plane? For now, our cluster api provider will always create a new k8s service for workload cluster's control plane, so it's not possible for it to use an existing one. But I believe you can update your existing service's spec to match workload cluster's control plane?

Stringls commented 1 year ago

@fengye87 I removed the controlPlaneService field so it's using ClusterIP by default and I can confirm it's working right now. The virtink cluster is provisioned. So I am closing this issue for now.