New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Minor updates to playground cleanup #10802
[CI] Minor updates to playground cleanup #10802
Conversation
Signed-off-by: Jerod Culpepper <cpepper96@gmail.com>
Signed-off-by: Jerod Culpepper <cpepper96@gmail.com>
What does more harm: – leftover namespaces that take up space and scheduling cycles, if not empty.
|
Honestly, I'm not sure what the worst case scenario for forcing deletion of a namespace is. When I was researching this issue people recommend not force deleting namespaces because you aren't fixing the root cause and that root cause could persist (Ex. if we force deleted the "Terminating" namespaces I was looking at earlier then we may not have been able to determine that the broken API services were causing them to hang and therefore those API services would have not been deleted). |
I think while we are forcefully deleting the unused namespaces, we should check if that particular namespaces are linked with mentioned below:
|
By linked do you mean those resources are deployed to the namespace? The script currently deletes all resources in the target namespace |
Yes, you can delete all the resources but we just need to decommission the specific namespace so that |
We are only deleting namespace/resources which are deployed by users as they come and try out playground. The namespaces that affect the working of playground environment is intact, also using kubectl delete all —all -n will not lead to deletion of cluster wide resources, so even if some of the cluster wide resources (CR, PV..) are somehow linked they will not get deleted. (Eg. an existing CRB used in prod getting used by a Role in one of the ns created by user even with —all it will not get deleted) |
I second @MUzairS15. This is a playground, meaning it is understood that users are not supposed to run anything production here. We could put a warning at some stage in the workflow stating this and also that it will be lost in nightly cleanup. This is common for cloud sandboxes (public clouds). |
Signed-off-by: Jerod Culpepper <cpepper96@gmail.com>
…pepper96/meshery into cpepper96/playground-reset-job
I added the "Terminating" namespace check back and the patch command to force delete a "Terminating" namespace. I also cut down the |
Notes for Reviewers
A couple of minor tweaks to the playground cleanup script:
Given that this is essentially a prod cluster, I'm hesitant to add the other command I found to force delete a namespace. I think for now it might be best to just investigate "stuck" namespaces as they come up. Thoughts?
Signed commits