alphagov/gsp

deleting a Team that still has Pipelines causes pipeline destroy to fail

Closed this issue · 1 comments

What

k delete team x should delete any Pipeline resources associated with team x

Why

Otherwise the Pipeline resources will be undestroyable unless you remove the finalizer from their metadata. The pipeline-operator will be stuck in a loop attempting to destroy a pipeline that doesn't exist.

Context / thoughts

  • The Pipeline resources should probably set the Team resource as it's owner reference so they are dependent and get GC'd correctly
  • The destroy step for Pipeline resource should correctly handle the case when the pipeline has already been destroyed

I'm happy that this happens so irregularly that it's not worth doing the work until/unless it starts becoming a pain.