openshift / oadp-operator

OADP Operator
Apache License 2.0
76 stars 69 forks source link

Clean up ReplicaSets #1460

Open mateusoliveira43 opened 1 month ago

mateusoliveira43 commented 1 month ago

As documented, ReplicaSets can become left out in cluster

https://github.com/openshift/oadp-operator/blob/master/docs/install_olm.md#verify-install

This can reproduced when testing upgrades

NAME                                                          DESIRED   CURRENT   READY   AGE
replicaset.apps/openshift-adp-controller-manager-686685cc8f   1         1         1       4m33s
replicaset.apps/openshift-adp-controller-manager-77c584bf8b   0         0         0       6m33s
replicaset.apps/velero-5fdf7d65df                             1         1         1       118s
replicaset.apps/velero-6bf5469f9c                             0         0         0       5m40s
kaovilai commented 1 month ago

These are by design by kube to be left over. You can set following if you don't like seeing "historical" replicasets.

Clean up Policy You can set .spec.revisionHistoryLimit field in a Deployment to specify how many old ReplicaSets for this Deployment you want to retain. The rest will be garbage-collected in the background. By default, it is 10.