Open czeslavo opened 9 months ago
After checking this it seems that we do this at least for Deployment
s in https://github.com/Kong/gateway-operator/blob/f6badbef64ac96c78d381f86a48b5b8a60ec4d70/internal/utils/kubernetes/resources/deployments.go#L186 and https://github.com/Kong/gateway-operator/blob/f6badbef64ac96c78d381f86a48b5b8a60ec4d70/internal/utils/kubernetes/resources/deployments.go#L42. We might need to check this for other resources as well though to verify.
Where we're not using this is for Deployment
listing https://github.com/Kong/gateway-operator/blob/f6badbef64ac96c78d381f86a48b5b8a60ec4d70/controllers/dataplane_owned_resources.go#L59-L72, and ingress Service
listing https://github.com/Kong/gateway-operator/blob/f6badbef64ac96c78d381f86a48b5b8a60ec4d70/controllers/dataplane_owned_resources.go#L282-L295
Problem Statement
Currently, it's not possible to list some of
DataPlane
andControlPlane
-owned resources with use of theapp
label because it's not assigned consistently to all of them. Example of a resource that do not have theapp
label assigned: cluster certificate Secret,Proposed Solution
Make sure that all of the resources owned by
DataPlane
andControlPlane
do have theapp
label assigned with a value equal to the parent's name.Acceptance Criteria
DataPlane
orControlPlane
controllers have theapp
label assigned with a value equal to the parent's namekubectl get <pods|deployments|services|secrets> -l app=<parentName>
to list all resources owned by a givenDataPlane
orControlPlane