Skip to content

CAPZ fails to apply new API version of ASO resources #5520

@RoRoMaan

Description

@RoRoMaan

/kind bug

What steps did you take and what happened:
We are trying to set up a new AKS cluster by using ManagedCluster with the apiVersion containerservice.azure.com/v1api20240901 & ManagedClustersAgentPool with the apiVersion containerservice.azure.com/v1api20240901.
CAPZ however cannot create these resources giving us the following error messages in the logs:

manager E0327 09:51:15.320962       1 controller.go:316] "Reconciler error" err="failed to run mutator: no kind \"ManagedCluster\" is registered for version \"containerservice.azure.com/v1api20240901\" in scheme \"pkg/runtime/scheme.go:100\"" controller="azureasomanagedcontrolplane" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureASOManagedControlPlane" AzureASOManagedControlPlane="my-namespace/my-awesome-cluster-vtqpv" namespace="my-namespace" name="my-awesome-cluster-vtqpv" reconcileID="c07c8cde-4152-4b9b-a352-d356daa99792"

manager E0327 09:51:15.369700       1 controller.go:316] "Reconciler error" err="failed to run mutator: error creating new containerservice.azure.com/v1api20240901, Kind=ManagedClustersAgentPool: no kind \"ManagedClustersAgentPool\" is registered for version \"containerservice.azure.com/v1api20240901\" in scheme \"pkg/runtime/scheme.go:100\"" controller="azureasomanagedcontrolplane" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureASOManagedControlPlane" AzureASOManagedControlPlane="my-namespace/my-awesome-cluster-vtqpv" namespace="my-namespace" name="my-awesome-cluster-vtqpv" reconcileID="c48ee890-0097-4297-b562-98150978c3fa"

What did you expect to happen:
CAPZ creates the k8s resources ManagedCluster & ManagedClustersAgentPool with the new apiVersion so that ASO can start to work it´s magic.

Anything else you would like to add:
We suspect that there might be missing references in the code, e.g.

There are references for the previous api version (v1api20231001) or the preview versions but not the api version v1api20240901

Disclaimer: we aren´t developers but we hope that those findings can help somehow

Environment:

  • cluster-api-provider-azure version: v1.19.1
  • Kubernetes version: (use kubectl version): v1.31.5
  • OS (e.g. from /etc/os-release): Ubuntu 22.04.5 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions