argoproj-labs / argo-rollouts-manager

Kubernetes Operator for Argo Rollouts controller.
https://argo-rollouts-manager.readthedocs.io/en/latest/
Apache License 2.0
84 stars 255 forks source link

ClusterRole/ClusterRoleBinding should be deleted when RolloutManager is deleted #68

Open jgwest opened 2 weeks ago

jgwest commented 2 weeks ago

When a RolloutManager is deleted, all of the resources that were owned by the RolloutManager should also be deleted.

However, since ClusterRole/ClusterRoleBinding are cluster-scoped resources, they cannot be owned by a namespace-scoped resource like RolloutManager. Thus, CR/CRB do not have an owner, and thus, when the RM is deleted, the CR/CRB will not be garbage collected. The CR/CRB will continue on the cluster indefinitely.

We should update the logic we use to ensure that when we detect that an RM no longer exists, that we delete the corresponding CR/CRB.

jgwest commented 2 weeks ago

Red Hat external tracking JIRA: https://issues.redhat.com/browse/GITOPS-4871