rancher: Should not delete the cattle-system namespace when deleting the imported k8s cluster when Rancher pod is running in it
Rancher Server Setup
- Rancher version: master-head
Describe the bug
When deleting the imported k8s cluster from the Rancher it will delete all the resources and the namespace of the cattle-system, but this will cause an issue of the imported k8s cluster if it has extra resources that exist in the same cattle-system namespace, e.g, in the Harvester cluster we run embedded Rancher in this namespace which should not get removed by the Rancher.
To Reproduce
- import an existing k8s cluster to the Rancher server.
- delete the imported k8s cluster
- the
cattle-systemnamespace and its resources is removed completely
Result
- resources in the same namespace will also get deleted.
Expected Result
should keep the other resource and the cattle-system namespace, probably only delete the cluster-agent node.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 27 (18 by maintainers)
Logged https://github.com/rancher/rancher/issues/34486. Closing this one as it is validated here
Just adding in that if this satisfies the need of @guangbochen and the Harvester team that we might want to open a separate issue to go into 2.6.1 to address the speed in which the delete/cluster state refresh happens. (Depending on what @kravciak shares with us).
@guangbochen can you re-test with v2.6-head as the changes for master have not been merged.
Two use cases: