Created
March 15, 2025 02:51
-
-
Save brandonbryant12/1175c9b638d481abcfe8cb9be43c006b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This YAML file demonstrates minimal entities to show relationships for each of the following cards: | |
# - EntityConsumedApisCard: shows APIs consumed by an entity (generated from spec.consumesApis) | |
# - EntityProvidedApisCard: shows APIs provided by an entity (generated from spec.providesApis) | |
# - EntityDependsOnComponentsCard: shows dependency components (generated from spec.dependsOn with a component target) | |
# - EntityDependsOnResourcesCard: shows dependency resources (generated from spec.dependsOn with a resource target) | |
# - EntityHasSubcomponentsCard: shows subcomponents (generated from spec.subcomponentOf) | |
--- | |
apiVersion: backstage.io/v1alpha1 | |
kind: Component | |
metadata: | |
name: main-component | |
namespace: default | |
spec: | |
type: service | |
lifecycle: production | |
# consumedApis will generate the consumesApi relation, used by EntityConsumedApisCard | |
consumesApis: | |
- api:default/consumed-api | |
# providesApis will generate the providesApi relation, used by EntityProvidedApisCard | |
providesApis: | |
- api:default/provided-api | |
# dependsOn with a component target will be used by EntityDependsOnComponentsCard | |
# dependsOn with a resource target will be used by EntityDependsOnResourcesCard | |
dependsOn: | |
- component:default/dependency-component | |
- resource:default/dependency-resource | |
--- | |
apiVersion: backstage.io/v1alpha1 | |
kind: API | |
metadata: | |
name: consumed-api | |
namespace: default | |
spec: | |
type: openapi | |
lifecycle: production | |
--- | |
apiVersion: backstage.io/v1alpha1 | |
kind: API | |
metadata: | |
name: provided-api | |
namespace: default | |
spec: | |
type: openapi | |
lifecycle: production | |
--- | |
apiVersion: backstage.io/v1alpha1 | |
kind: Component | |
metadata: | |
name: dependency-component | |
namespace: default | |
spec: | |
type: service | |
lifecycle: production | |
--- | |
apiVersion: backstage.io/v1alpha1 | |
kind: Resource | |
metadata: | |
name: dependency-resource | |
namespace: default | |
spec: | |
type: database | |
lifecycle: production | |
--- | |
apiVersion: backstage.io/v1alpha1 | |
kind: Component | |
metadata: | |
name: subcomponent | |
namespace: default | |
spec: | |
type: library | |
lifecycle: production | |
# subcomponentOf relation will generate the hasPart relation, used by EntityHasSubcomponentsCard | |
subcomponentOf: component:default/main-component |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment