Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match Backstage resources by Kubernetes label matching #30

Open
aliok opened this issue Feb 7, 2024 · 4 comments
Open

Match Backstage resources by Kubernetes label matching #30

aliok opened this issue Feb 7, 2024 · 4 comments

Comments

@aliok
Copy link
Member

aliok commented Feb 7, 2024

In addition to the id matching, Backstage Kubernetes plugin also supports label matching. This means, there can be Kubernetes resources which are EventType consumers, and their link to Backstage is done using the label matching, instead of id matching.

To register Backstage relations for these components, we have 2 approaches:

  1. Reverse matching
  • Backend sends the labels of the consumer has when it collects the consumers
  • Backstage finds out the components that have a label selector that can match the labels (reverse match)
  1. 2nd call for fetching consumers
  • Backend sends event types with no consumer information; Backstage receives the event types
  • For each EventType received, Backstage iterates over all components with the annotation backstage.io/kubernetes-label-selector and sends a query to the backend
  • Backend executes searches for the label selectors, finds out which components match
  • Backend then finds out if any of these components are a consumer of an eventType.
  • Backend returns the consumer relationship
Copy link

github-actions bot commented May 8, 2024

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 8, 2024
@aliok
Copy link
Member Author

aliok commented May 22, 2024

/remove-lifecycle stale

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 22, 2024
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 21, 2024
@aliok
Copy link
Member Author

aliok commented Aug 22, 2024

/remove-lifecycle stale

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant