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

Not cleaning up PVCs #42

Closed
chrislovecnm opened this issue Jul 8, 2020 · 6 comments
Closed

Not cleaning up PVCs #42

chrislovecnm opened this issue Jul 8, 2020 · 6 comments

Comments

@chrislovecnm
Copy link
Contributor

When we delete a database we do not seem to delete the PVCs correctly

# you need a bad storage class name or request over quota in the example
# this step has to fail
./hack/apply-apply-crdb-example.sh -c test
# then delete
./hack/apply-delete-crdb-example.sh -c test

You can then see the hanging PVC

$ k get pvc
NAME             STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
datadir-crdb-0   Pending                                      crdb-io1       3m43s
@chrislovecnm
Copy link
Contributor Author

We are not cleaning up PVCs at all. The question is what policy do we want to use for cleanup?

@chrislovecnm
Copy link
Contributor Author

@johnrk the operator is not deleting volumes that are attached to the database Pods when it deletes the database. This is actually a feature of Kubernetes where you have to delete by hand the storage volumes when you delete a stateful set. There reasoning is that you do not delete the storage automatically, because you might delete data. I need to know if we want the default k8s behavior or another behavior.

@chrislovecnm chrislovecnm changed the title Not cleaning up PVCs correctly Not cleaning up PVCs Jul 8, 2020
@johnrk-zz
Copy link
Contributor

@chrisseto , do you know what behavior we want here?

@chrislovecnm
Copy link
Contributor Author

@johnrk we talked about this on standup. Did we make a decision?

@chrislovecnm
Copy link
Contributor Author

We need to document this as part of the operator. PVs will not be deleted by the operator.

@johnrk-zz
Copy link
Contributor

We need to document this as part of the operator. PVs will not be deleted by the operator.

^ cc @taroface

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

No branches or pull requests

2 participants