cluster-api: Running e2e test fails in Tilt when multiple infra providers are deployed

What steps did you take and what happened: Deploy multiple infra providers to Tilt. In this case, I deployed both CAPA and CAPG.

$ kubectl get providers -A
NAMESPACE                           NAME                    AGE   TYPE                     PROVIDER      VERSION
capa-system                         infrastructure-aws      10m   InfrastructureProvider   aws           v1.2.99
capg-system                         infrastructure-gcp      39h   InfrastructureProvider   gcp           v1.2.99
capi-kubeadm-bootstrap-system       bootstrap-kubeadm       34d   BootstrapProvider        kubeadm       v1.2.99
capi-kubeadm-control-plane-system   control-plane-kubeadm   34d   ControlPlaneProvider     kubeadm       v1.2.99
capi-system                         cluster-api             13d   CoreProvider             cluster-api   v1.2.99

Run e2e test - I ran quickstart test for CAPA. The test fails with the following message.

INFO: clusterctl config cluster quick-start-ssevy1 --infrastructure (default) --kubernetes-version v1.23.3 --control-plane-machine-count 1 --worker-machine-count 1 --flavor topology
...
Failed to run clusterctl config cluster
    Unexpected error:
        <*errors.fundamental | 0xc0006a49d8>: {
            msg: "failed to identify the default infrastructure provider. Please specify an infrastructure provider",
            stack: [0x2b5cf66, 0x2b5c5b3, 0x2b66ef8, 0x2b6a308, 0x2bbd828, 0x13367da, 0x13361a5, 0x133589b, 0x133b629, 0x133b007, 0x135c745, 0x135c465, 0x135bca5, 0x135df52, 0x136a2a5, 0x136a0be, 0x2bf076f, 0x1112862, 0x106cf01],
        }
        failed to identify the default infrastructure provider. Please specify an infrastructure provider
    occurred

What did you expect to happen: Be able to run e2e tests using Tilt setup with multiple infra providers.

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster-api version:
  • Minikube/KIND version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):

/kind bug [One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (16 by maintainers)

Most upvoted comments

Sure. I can work on it. /assign

Basically yes + some doc for the providers to do the same Nit, let’s implement how do we compute the default infra provider into a func, e.g. E2EConfig.DefaultInfrastructureProvider(), so if we have to change the logic in the future we have to touch only one place

First analysis is that clusterctl is unable to automatically detect the infra provider when multiple are deployed.

I have to take a closer look if there is a good way for the e2e test to set the infra provider during clusterctl config cluster.