Description of problem:
The pruneObjectBehavior of a ConfigurationPolicy does not help clean up objects when the policy is edited such that the managed object's name is changed. Ideally, editing the policy would result in deleting the old object, if the pruneObjectBehavior field was set.
Version-Release number of selected component (if applicable):
2.6+
How reproducible:
Yes
Steps to Reproduce:
- Create a policy with a ConfigurationPolicy managing a pod. Set the pod name to "one" and set the pruneObjectBehavior flag on the ConfigurationPolicy to "DeleteAll".
- Enforce the policy and wait for it to become compliant.
- Edit the policy, changing the pod's name to "two"
- Wait for the policy to become compliant.
Actual results:
Pods "one" and "two" will be present on the managed cluster. If the Policy is deleted, only pod "two" will be removed along with it.
Expected results:
Pod "one" should be removed when the policy is edited.
Additional info:
Sort of similar to https://issues.redhat.com/browse/ACM-3049