Skip to content
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

add safety to avoid deleting an existing namespace #11

Open
qrkourier opened this issue Nov 18, 2024 · 3 comments
Open

add safety to avoid deleting an existing namespace #11

qrkourier opened this issue Nov 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@qrkourier
Copy link
Member

If WEBHOOK_NAMESPACE is an existing namespace, then uninstalling the generated manifest will delete that namespace.

Add safety to the install procedure to ensure that WEBHOOK_NAMESPACE is always a new namespace, or avoid declaring the namespace in ziti-webhook-spec.yaml when WEBHOOK_NAMESPACE happens to exist already.

A simple way to accomplish this is to avoid declaring the Namespace resource in ziti-webhook-spec.yaml. That way, the admin must create the namespace if it does not exist, and uninstalling ziti-webhook-spec.yaml will never put any namespace at risk.

@qrkourier qrkourier mentioned this issue Nov 18, 2024
@qrkourier qrkourier added the bug Something isn't working label Nov 18, 2024
@dariuszSki
Copy link
Member

dariuszSki commented Nov 19, 2024

@dariuszSki
Copy link
Member

We created it for the demo, so users can try it out and find out what is needed to run the injector.

@qrkourier
Copy link
Member Author

qrkourier commented Nov 19, 2024

In my branch, I changed invalid kubectl -f commands like kubectl create -f, which will always fail if the namespace exists. That way, the user must opt-in to deploying in an existing namespace by changing create to apply, which runs the risk of deleting that namespace if they later command kubectl delete -f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants