Merge pull request #30014 from awanlin/docs/kubernetes-dependson

[Docs] Kubernetes - Catalog cluster locator `dependsOn`
This commit is contained in:
Andre Wanlin
2025-05-30 12:25:04 -05:00
committed by GitHub
+22
View File
@@ -203,6 +203,28 @@ or the
[`AwsEKSClusterProcessor`](https://backstage.io/docs/reference/plugin-catalog-backend-module-aws.awseksclusterprocessor/)
to automatically update the set of clusters tracked by Backstage.
For this method to work any entity that would be using this `Resource` to help drive the Kubernetes details in the Catalog's Entity pages needs to have a `dependsOn` relationship setup. Here's a quick example:
```yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
annotations:
backstage.io/kubernetes-id: dice-roller
backstage.io/kubernetes-namespace: default
name: dice-roller
description: It rolls dice
tags:
- go
spec:
type: service
lifecycle: production
owner: guest
dependsOn: ['resource:my-cluster']
```
This example assumes it's using the default namespace, if that's not the case for you then make sure to include it like this: `resource:my-namespace/my-cluster`.
#### `config`
This cluster locator method will read cluster information from your app-config