-
Notifications
You must be signed in to change notification settings - Fork 0
Description
What happened?
I've created a ManagedControlPlane to orchestrate some Managed Resources (MRs).
I have used the following providers and created the MRs:
Crossplane family provider GCP:
DatabaseInstance- 2x
Bucket
Crossplane-contrib provider AWS:
- S3
Bucket
My setup looks like this:
For the GCP family provider I use the ClusterProviderConfig resource called "demo-container-days" that references the Secret for authentication against the Google Cloud API to create the DatabaseInstance and the Buckets. (While writing this issue, I even noticed that ClusterProviderConfig as another form of a ProviderConfig is not yet supported by the Graph nor by the ProviderConfig table view, link to feature request: #476)
For the crossplane-contrib AWS provider I use the standard ProviderConfig called "demo-container-days" that references the Secret for authentication against the AWS API to create the S3 Bucket.
The problem
When looking at the Graph view, I see by default ("By Provider" perspective):
Color-coded-wise that is totally correct, also the legend at the top right corner is correct✅
But when I switch to the "By ProviderConfig" perspective the view is not correct ❌
All 4 resources have the same color 👀 The legend shows me that indeed, because the name of the providerConfigRef at these resources is always "demo-container-days" (that is true) but logically these are two different ProviderConfigs from two different Crossplane providers.
What did you expect to happen and why?
In the "By ProviderConfig" view, I would expect to see something like this:
In this sample view, it gets clear that the S3 Bucket from AWS is coming from one ProviderConfig and the other three GCP Managed Resources from another ProviderConfig that has apparently the same name.
One could argue that this would be more like a "By ProviderConfig By Provider" view. But personally I think that is the correct view to show to the user.
I understand this might be an edge case since this happens just when different ProviderConfig resources have the same metadata.name. But in a more complex scenario where a ManagedControlPlane hosts e.g. 10 providers and the user configures every ProviderConfig to have the same metadata.name then this view would be confusing and not helpful.
How can we reproduce the issue (concisely and precisely)?
FYI: You don't need to recreate exactly the same setup as I did. You will recognize this color-coding failure when you create two different ProviderConfig resources (from different Providers), give them the same metadata.name and reference them to their respective Managed Resources.
- Create a ManagedControlPlane
- Install two Providers (e.g. Provider A e.g. Official provider-kubernetes and Provider B e.g. another one)
- Create a
ProviderConfigX called "test" + Secret for authentication for Provider A - Create a
ProviderConfigY called "test" + Secret for authentication for Provider B - Create a Managed Resource from Provider A that references
ProviderConfigX - Create a Managed Resource from Provider B that references
ProviderConfigY - Go to the UI and look at the graph view at the "By ProviderConfig" perspective - both Managed Resources will have the same color code
Is the same problem already mentioned in other bug reports ?
Not, that I am aware of.
Please assign the appropriate priority to this issue.
/priority normal
Anything else we should know?
This problem gets even more tricky with Crossplane V2 and their family providers 👀
With Crossplane V2, they have introduced namespace-scoped Managed Resources (before that in Crossplane v1.X.X Managed Resource were solely cluster-scoped). To make that possible they have literally doubled all their existing Managed Resources and put and additional m in the group name of the K8s resources. That leads to something like:
ProviderConfigin groupkubernetes.m.crossplane.io--> namespace scopedProviderConfigin groupkubernetes.crossplane.io--> cluster scoped
And some of the providers (I believe the official providers maintained by Upbound) have introduced another resource called ClusterProviderConfig which looks like this:
ClusterProviderConfigin groupkubernetes.m.crossplane.io--> cluster scoped (‼️ so withmbut cluster scoped)
That makes it definitely harder than before, but let's try to brain storm and find away to make that as dynamic as possible 🚀