🚀 Feature: more cluster details in the catalog #15088
Labels
area:catalog
Related to the Catalog Project Area
area:kubernetes
Related to the Kubernetes Project Area - not deploying Backstage with k8s.
enhancement
New feature or request
🔖 Feature description
The
catalog
clusterLocator should support moreClusterDetails
fields to make it a bit closer to theconfig
clusterLocator in terms of features. As it stands, theClusterDetails
interface has many fields:backstage/plugins/kubernetes-backend/src/types/types.ts
Lines 147 to 207 in 1f5921b
but the catalog clusterLocator only retrieves and surfaces four of them (
name
,url
,caData
andauthProvider
):backstage/plugins/kubernetes-backend/src/cluster-locator/CatalogClusterLocator.ts
Lines 53 to 60 in 1f5921b
🎤 Context
What works today
Here's my basic setup:
OIDC Authority
I create an azure AD app registration with
OIDC-enabled K8s Cluster
I create a kind cluster with
where
CLIENT-ID
is the ID for the app registration I created previously, andTENANT-ID
is the ID of my azure AD tenant.Then I set up some RBAC on that cluster
$ kubectl create clusterrolebinding me-admin --user EMAIL-ADDRESS --clusterrole cluster-admin
Where
EMAIL-ADDRESS
is the email of my Azure account. Then, just to verify, I set up my kubeconfig to usekubelogin
by runningSo that running
kubectl get ns
causes my browser to pop up an azure AD login before succesfully showing my namespaces.Backstage
My app-config looks like
where
CLIENT-ID
,CLIENT-SECRET
, andTENANT-ID
are as discussed above, andPORT
is the port on which my kind apiserver is running, andKIND-CA-DATA
is the base64-encoded CA bundle for the kind apiserver (pulled from my kubeconfig).where
kubernetes.yaml
itself containswhere
EMAIL-ADDRESS
is as discussed above. Following all these steps, I can runyarn dev
and open http://localhost:3000/catalog/default/component/kube-dns/kubernetes, get prompted to sign in to Microsoft, and see the coredns pods in my kind cluster.What I want
Instead of specifying all my cluster details in the app-config, I'd like some way of specifying them in the catalog, so that my app-config would become
and
kubernetes.yaml
could looke something likeand still get the same experience. As it happens, if you try to run these config files with the code on master, the page will simply contain the error panel with the message
✌️ Possible Implementation
What comes to mind is adding new annotations for other Kubernetes cluster details to @backstage/catalog-model, and then having the
CatalogClusterLocator
read them in itsgetClusters
method and surface them in the clusterDetails appropriately.👀 Have you spent some time to check if this feature request has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: