More of an undesirable behaviour, but when deleting the CR for an existing console the underlying PVCs are deleted. This behaviour can vary by operator, so if it is deleted with the assumption the PVC can be reused when redeploying the console CR then all data is unknowingly wiped and all configuration and data is lost.
Retain PVC's and require manual cleanup, the PVC will be reused unless user deletes it manually.
Current behavior
PVC is deleted when the console CR is removed.
Possible solution
Do not set ownerReferences on the PVC
Steps to reproduce
Delete an existing console CR with the intention of redeploying (e.g. bugs during upgrade process)
PVC is deleted
Redeploy console CR
Data is gone
Context
A number of operator created PVCs do not set ownerReferences so that PVC's are retained so that the criticality of the data kept there is determined by the end user.
Describe the bug
More of an undesirable behaviour, but when deleting the CR for an existing console the underlying PVCs are deleted. This behaviour can vary by operator, so if it is deleted with the assumption the PVC can be reused when redeploying the console CR then all data is unknowingly wiped and all configuration and data is lost.
https://sdk.operatorframework.io/docs/building-operators/golang/advanced-topics/#sensitive-resources
Expected behavior
Retain PVC's and require manual cleanup, the PVC will be reused unless user deletes it manually.
Current behavior
PVC is deleted when the console CR is removed.
Possible solution
Do not set ownerReferences on the PVC
Steps to reproduce
Context
A number of operator created PVCs do not set ownerReferences so that PVC's are retained so that the criticality of the data kept there is determined by the end user.
Your Environment