-
Notifications
You must be signed in to change notification settings - Fork 3
Description
This plugin already follows the Kubernetes plugin for Backstage since it requires a dependsOn relation with kubernetes-cluster. We should update the Kyverno annotations required so that if users have the Kubernetes plugin enabled for their service, the Kyverno plugin should also be set up and ready to use.
This means that backstage.io/kubernetes-namespace: should be able to be used instead of kyverno.io/namespaces, and if both are defined, the Kyverno one should be used.
We could also consider making the kinds and namespaces optional, meaning if none are provided, it will look at all namespaces for all Kubernetes kinds.
Currently the kyverno.io/resource-name is used to figure out what policies to show for a given service, using the value to search for policies that match this. Currently the resource filter for the policy reporter expects the exact resource name, making it hard to use when we would like to view policies for potentially any kind related to a service, including pods where the name would constantly change.
It would be great if we could use a label selector similar to how the Backstage kubernetes plugin handles showing resources related to a service.
This issue has three parts:
- Update the plugin to also support using Kubernetes plugin namespace annotation.
- Update the plugin to make namespace and kinds optional.
- Update the plugin to support
backstage.io/kubernetes-idandbackstage.io/kubernetes-label-selectorinstead ofkyverno.io/resource-name. This would require the policy reporter API to support label selector [Core] New Filter: LabelSelector policy-reporter#223.