Replies: 1 comment 2 replies
-
The right answer is mix of 1 and 2. Kubernetes by default do not delete the PVCs. This is useful for example to not lose all your data when someone by mistake deletes the Kafka custom resource. When you set the owner reference, the PVCs and possibly with it also the PV (depends on other configurations as well) will be deleted in such case. So yes, by default we do not set the owner reference and this is fully intentional and by design. If you check StatefulSets, they also don't use owner references in the PVCs they create. So we are completely consistent in this behavior and follow the Kubernetes defaults. If you really want to have the the ownerReference there and have the PVC deleted when the Kafka CR is deleted, you can use the |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have provisioned a persistent Kafka cluster, based on the example here:
The pertinent section on storage is identical:
When the Kafka cluster is created, the
PersistentVolumeClaim
manifest generated by the controller does not contain anownerReferences
section.While not a problem in and of itself, it does cause a problem with some toolings (e.g. ArgoCD) that look at resources in the cluster and use the
ownerReferences
to build a dependency graph. As the PVCs have no listed owners, they look like dangling resources that should be pruned.It's possible to get ArgoCD to ignore these resources, but that does not seem like the correct approach to me.
Is there a reason that the
PersistentVolumeClaim
s created by Strimzi do not haveownerReferences
added?I guess there are three possible answers to this.
ownerReferences
to thePestistentVolumeClaim
. If this is the case, I would like to understand the reasoning for this.I wanted to ask first before opening an issue in case the answer is 1 or 2.
Beta Was this translation helpful? Give feedback.
All reactions