Open mvgmb opened 2 years ago
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
THis should be able to be done via https://kubernetes.io/blog/2022/09/29/enforce-immutability-using-cel/ now
This issue is stale because it has been open 60 days with no activity.
This is highly unexpected behavior and should be fixed if we wish to claim parity with deployments. Personally, if I hadn't caught all these orphaned resources from Rollouts our cluster costs would have nearly doubled.
@zachaller Has this issue been fixed? Or is there any solution? Thanks.
I am on the same boat, I have multiple deployments with orphaned replicasets. I am looking forward for a solution.
I don't think that it's only reason of staled working replica sets.
For example we do not change selector
field in our rollout.
https://github.com/argoproj/argo-rollouts/issues/1761#issuecomment-2331739689
Summary
Rollout's
selector
field should be immutable. However, Argo Rollout's validation allows changing this field, resulting in orphan ReplicaSets.How to Reproduce
Create a rollout by running
kubectl apply -f rollout.yaml
:Update the Rollout's
selector
field by adding a new label and then runkubectl apply -f rollout.yaml
:Then run
kubectl get pods
. It should have only one ReplicaSet, however, the first ReplicaSet is still there:Solution
To deal with this scenario, Argo Rollouts validation should block any changes to the
selector
field, similar to Deployment validation. When trying to change theselector
field on a Deployment, it returns the following:Use Cases
This validation is important to avoid having orphan ReplicaSets.
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.