-
Notifications
You must be signed in to change notification settings - Fork 640
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
Feature Wants: kubectel delete -k . should only delete all the awx resources, but not the entire namespace #1864
Comments
here's the last thing you posted on #ansible/awx#15173 so basically there's a "order of operation" that need to happen when deleting we need to delete awx customresource before deleting the operator and crds (or else the deployments gets orphaned and nothing is left to clean it up) i do not think namespace=`cat kustomization.yaml | grep namespace | awk -F ' ' '{print $2}'`
kubectl delete awx --all -n ${namespace} # delete all awx instance in the namespace
kubectl kustomize . | sed '/kind: Namespace/,+5d' | kubectl delete -f - # proceed to delete the operator note this will retain the postgres PVC so if u want that gone u also need to explicitly delete that this is not a feature we looking to support in the project if you have any further question we can start a discussion thread on the forum.ansible.com |
This is still an issue/bug, it just delete my entire namespace, very bad , please fix. |
Hi, we have run into the same issue. Deleting the awx results in deleting the whole namespace. Please fix. |
I have digged little bit deeper into the issue and probably found the main problem/solution. Do not advise users to put awx-operator and aws resource in the same kustomization in the documentation
https://ansible.readthedocs.io/projects/awx-operator/en/latest/installation/basic-install.html Instead new kustomization should be created for awx resources. I can do a PR if interested. Jan |
Please confirm the following
Feature Summary
Currently., when I deploy the awx in the existing namespace, I use kustomization.yaml
kubectl apply -k . command ,
but when I want to delete all the resources, I use kubectl delete -k .
It will terminate all the resources, as well as the entire existing namespace( including our other existing pod in the namespace), which is not good.
Is there a better to just delete all the awx resource but not to delete the entire namespace?
This is my kustomization.yaml
The text was updated successfully, but these errors were encountered: