feat: refining resource exclusion logic based on built-in or custom ownership #215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request centers around an enhancement to the exclusion logic based on resource ownership. If the resource is owned by built-in workloads then the resource should be excluded.
This change ensures that resources owned by custom owners(Like CRDs) are not mistakenly excluded, while ensuring that resources owned by built-in workloads are excluded.
For example, consider the scenario where there are two pods: one named
my-pod
, which doesn't have any owners, and another namedpod-with-crd-owner
, which is created and managed by a custom owner(acid.postgres.com/v1/postgresql
), and other regular pods owned by built-in workload kinds.Before
Since we currently do not verify whether the owner of the resource is a built-in workload, pod with custom owner is not listed when calling ListArtifact function as per PR #214.
After
Once we start validating the resource's owner, the pod with custom owner becomes visible in the listing when calling ListArtifact function.