crossplane-contrib / provider-upjet-azure

Official Azure Provider for Crossplane by Upbound.
Apache License 2.0
54 stars 69 forks source link

Please add a `identityIdSelector` field to the `KubernetesCluster` `spec.forProvider.identity` field to allow selecting user assigned managed identities created by Crossplane #662

Open Speeddymon opened 4 months ago

Speeddymon commented 4 months ago

What problem are you facing?

I made a UserAssigned Managed Identity and an AKS cluster in my Crossplane code. I want to apply these to my cluster at the same time, but in order to deploy the cluster, I need to already have the identity created. If the spec.forProvider.identity field supported an identityIdSelector field, then I could reference the identity by its labels, similar to what I do with the vnetSubnetIdSelector field for assigning the cluster to a virtual network subnet.

How could Official Azure Provider help solve your problem?

Speeddymon commented 4 months ago

As I'm working through creating different resources with Crossplane, I'm finding a number of places where other Azure resource IDs are being referenced but without a selector style field we can use to reference the other resources. This sort-of defeats the point of using Crossplane imho because we are forced to deploy resources to our Crossplane cluster in a specific order, instead of just posting the manifests to the cluster and letting Crossplane create what it can and reconcile what it cant over time as more resources come online.

Would it be possible to get this on the roadmap? It would be really helpful if every ID field in every resource has a selector style field we can use to match labels of other crossplane resources.

turkenf commented 2 months ago

Hi @Speeddymon, thank you for bringing up this. As I understand you want to add a reference and selector for the field identity.identityIds to the resource KubernetesCluster.containerservice, and you want this field to refer to the resource UserAssignedIdentity.managedidentity.

This is possible if the resource that can be used for this field is only UserAssignedIdentity.managedidentity. Here is a guide about adding new ref and selector, if you have any questions feel free to ask.

Speeddymon commented 2 months ago

I will take a look. Thanks!