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

Delete operator CRs in teardown #79

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

misberner
Copy link
Contributor

No description provided.

# Delete operator CRs. This is broken out into a separate invocation, as the entire command fails
# if the CRDs are not available
kubectl -n stackrox get central.platform.stackrox.io,securedcluster.platform.stackrox.io -o name 2>/dev/null || true
} | xargs kubectl -n stackrox delete --wait
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a CRD can't be cleanup if the operator does not run and a Central/SecuredCluster instance is tried to be deleted.
At least I failed on this the last time I wanted to add it to the teardown script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, because of the finalizer? We can solve this via force deletion, but good catch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which finalizer do you mean?
I had the assumption that the CR can't be deleted because the operator executes the deletion. Therefore if the operator is running the CR can't be deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants