Closed oneilsh closed 4 years ago
I had hoped this could be done with kubenertes owners and dependents (https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents), but it seems for now that this requires that the relationship be setup by the owner and the dependents at the same time, and there's no way to later say "this pod is a dependent (or owner) of this other pod we just created"
hacky workaround might be to put in a pre-delete hook and give the hub a serviceaccount that can delete pods based on a selector or somesuch
I had hoped this could be done with kubenertes owners and dependents (https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents), but it seems for now that this requires that the relationship be setup by the owner and the dependents at the same time, and there's no way to later say "this pod is a dependent (or owner) of this other pod we just created"
hacky workaround might be to put in a pre-delete hook and give the hub a serviceaccount that can delete pods based on a selector or somesuch