CatalogClusterLocator reads title

Signed-off-by: Jamie Klassen <jamie.klassen@broadcom.com>
This commit is contained in:
Jamie Klassen
2024-01-22 10:48:38 -05:00
parent 7ee5b30ba7
commit 6009d2aabc
4 changed files with 9 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
Clusters in the catalog can now specify a human-readable title via `metadata.title`.
@@ -43,6 +43,7 @@ const mockCatalogApi = {
'kubernetes.io/dashboard-app': 'my-app',
},
name: 'owned',
title: 'title',
namespace: 'default',
},
},
@@ -63,6 +63,7 @@ export class CatalogClusterLocator implements KubernetesClustersSupplier {
const annotations = entity.metadata.annotations!;
const clusterDetails: ClusterDetails = {
name: entity.metadata.name,
title: entity.metadata.title,
url: annotations[ANNOTATION_KUBERNETES_API_SERVER],
authMetadata: annotations,
caData: annotations[ANNOTATION_KUBERNETES_API_SERVER_CA],
@@ -19,6 +19,7 @@ exports[`CatalogClusterLocator returns the aws cluster details provided by annot
"name": "owned",
"skipMetricsLookup": false,
"skipTLSVerify": false,
"title": undefined,
"url": "https://apiserver.com",
}
`;
@@ -42,6 +43,7 @@ exports[`CatalogClusterLocator returns the cluster details provided by annotatio
"name": "owned",
"skipMetricsLookup": true,
"skipTLSVerify": true,
"title": "title",
"url": "https://apiserver.com",
}
`;