-
Notifications
You must be signed in to change notification settings - Fork 431
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
Cannot create FleetsMembers resources when using AzureASOManagedControlPlane #5333
Comments
As a workaround, you must use the apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: AzureASOManagedControlPlane
metadata:
name: fleet-cluster1-aks
spec:
resources:
- apiVersion: containerservice.azure.com/v1api20210501
kind: ManagedCluster
metadata:
name: fleet-cluster1-aks
spec:
location: westus3
owner:
name: myfleet-rg
dnsPrefix: fleet-cluster1
identity:
type: SystemAssigned
- apiVersion: containerservice.azure.com/v1api20230315preview
kind: FleetsMember
metadata:
name: fleet-cluster1-aks
spec:
group: apps
owner:
armId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hub-rg/providers/Microsoft.ContainerService/fleets/hub-fleet
clusterResourceReference:
group: containerservice.azure.com
kind: ManagedCluster
name: fleet-cluster1-aks |
As a part of the implementation of FleetsMembers in CAPZ, we defined the use case of having a pre-defined Fleet hub prior to creating a cluster as a FleetsMember. However with the ASOAPI, it seems like this use case should be supported as well. I'll take a look into this, but the workaround you provided is similar to the existing FleetsMember implementation in the old CAPZ API: #4316 |
I think just documenting that you have to use an ARM reference would be sufficient. I opened the bug because I couldn't find any documentation on how to reference the fleet hub without also having the hub registered with ASO. I had to export the CRDs and inspect the owner schema to figure it out. I agree that in most cases the hub will be created and managed outside of CAPZ. |
CAPZ intentionally does not configure ASO to install all CRDs by default: Azure/azure-service-operator#2920. Additional ASO CRDs can be specified with the |
/kind bug
What steps did you take and what happened:
When attempting to create a cluster using
AzureASOManagedControlPlane
and register it with fleet usingfleetsmembers.containerservice.azure.com
resourcetype, reconciliation fails because the FleetsMembers resource requires an owner reference of typefleet.containerservice.azure.com
. This CRD, however, is not registered as part of the CAPZ install on the management cluster.failed to get owner: couldn't resolve reference hub-fleet, Group/Kind: containerservice.azure.com/Fleet: no matches for kind "Fleet" in version "containerservice.azure.com/v1api20230315previewstorage"
What did you expect to happen:
Reconciliation should have detected the existing hub and registered the cluster as a member.
Anything else you would like to add:
ASO Fleet resource docs
Environment:
/etc/os-release
): AKSUbuntu-2204gen2containerd-202411.12.0The text was updated successfully, but these errors were encountered: