This commit is contained in:
Moustafa Baiou
2020-11-09 14:00:13 -05:00
committed by moustafab
parent 75d63ee0a0
commit 728767e3d3
6 changed files with 71 additions and 71 deletions
+18 -18
View File
@@ -14,10 +14,26 @@ It is only meant for local development, and the setup for it can be found inside
## Surfacing your Kubernetes components as part of an entity
There are 2 ways to surface your kubernetes components as part of an entity.
There are two ways to surface your kubernetes components as part of an entity.
The label selector takes precedence over the annotation/service id.
### Common `backstage.io/kubernetes-id` label
### Full label selector
#### Adding the entity label selector to the spec
In order for Backstage to detect that an entity has kubernetes components the `kubernetes.selector` must have a valid selector. (Currently only matchLabels is supported)
```yaml
spec:
kubernetes:
selector:
matchLabels:
someKey: someValue
other-key: other-value
app.kubernetes.io/name: dice-roller
```
### Common `backstage.io/kubernetes-id` label on objects
#### Adding the entity annotation
@@ -37,19 +53,3 @@ as a part of an entity, Kubernetes components must be labeled with the following
```yaml
'backstage.io/kubernetes-id': <ENTITY_NAME>
```
### Full label selector
#### Adding the entity label selector to the spec
In order for Backstage to detect that an entity has kubernetes components the `kubernetes.selector` must have a valid selector. (Currently only matchLabels is supported)
```yaml
spec:
kubernetes:
selector:
matchLabels:
someKey: someValue
other-key: other-value
app.kubernetes.io/name: dice-roller
```