datasci-osu / dsosuk8s

DataScience@OregonState
2 stars 1 forks source link

removing jh should remove user pods #8

Closed oneilsh closed 4 years ago

oneilsh commented 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