CatalogClusterLocator reads title
Signed-off-by: Jamie Klassen <jamie.klassen@broadcom.com>
This commit is contained in:
@@ -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],
|
||||
|
||||
+2
@@ -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",
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user