calico
calico copied to clipboard
HostEndpoint objects remain after calico node is deleted when DATASTORE_TYPE is kubernetes
related issue : #4015 by addressing issue #4015, HostEndpoint objects are deleted after calico node is deleted if we use etcd datastore type. however in kubernetes datastore type, they are still remain. (as NodeDeletionController is registered only when the datastore type is etcd. (sorry if I my understanding is wrong)) I am not sure if hep should be automatically deleted by calico though, it would be great if calico can take care of their deletion.
Expected Behavior
HostEndpoint objects associated with the deleted Node should be deleted after the Node is deleted
Current Behavior
HostEndpoint objects associated with the deleted Node are not deleted after the Node is deleted
Possible Solution
Delete them
Steps to Reproduce (for bugs)
- create a k8s cluster with calico in kuberneted datastore type
- provision worker node and create HostEndpoint associated with it
- delete that worker node and check if HostEndpoint is deleted
- after k8s node deletion, calico node is also deleted but HostEndpoint still remains
Context
Your Environment
- Calico version : v3.26
- Orchestrator version (e.g. kubernetes, mesos, rkt): k8s v1.28
- Operating System and version:
- Link to your project (optional):
One way we might consider doing this is simply using OwnerReferences
to leverage Kubernetes garbage collection of child resources.