Closed m-messiah closed 2 years ago
User Story As an operator I would like to have more control over resources listed by controllers to reduce the overall load to the API
Detailed Description VirtualCluster controller and in particular namespace syncer garbage collector list all resources in the cluster and only then filters them by virtualcluster annotations (like tenancy.x-k8s.io/vcname) https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/1e987ad6c3c6ef0099e898b1b6589975212523b9/virtualcluster/pkg/syncer/resources/namespace/checker.go#L90
We should consider adding a label to these namespaces, like tenancy.x-k8s.io/controlled: true and use this label in the listing mentioned.
tenancy.x-k8s.io/controlled: true
Anything else you would like to add: Consider propagating this label to all resources created by the virtual cluster controllers in the follow-ups
/kind feature
cc @Fei-Guo
User Story As an operator I would like to have more control over resources listed by controllers to reduce the overall load to the API
Detailed Description VirtualCluster controller and in particular namespace syncer garbage collector list all resources in the cluster and only then filters them by virtualcluster annotations (like tenancy.x-k8s.io/vcname) https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/1e987ad6c3c6ef0099e898b1b6589975212523b9/virtualcluster/pkg/syncer/resources/namespace/checker.go#L90
We should consider adding a label to these namespaces, like
tenancy.x-k8s.io/controlled: true
and use this label in the listing mentioned.Anything else you would like to add: Consider propagating this label to all resources created by the virtual cluster controllers in the follow-ups
/kind feature