tilt-dev / tilt

Define your dev environment as code. For microservice apps on Kubernetes.
https://tilt.dev/
Apache License 2.0
7.41k stars 289 forks source link

ability to wait on crd deletion before deleting operator #6384

Open nicks opened 1 month ago

nicks commented 1 month ago

Describe the Feature You Want

In the tilt channel, dougbarth says:

I’ve been playing with a k8s operator to create a ClickHouse cluster based on a CRD being installed by Tilt. Creating the cluster works well, but when I run tilt down, the operator is deleted before the cluster is torn down, causing the next usage of tilt up to fail.

Current Behavior

currently, tilt down sorts all the kubernetes manifests in reverse order, and issues delete API requests

it does not wait on one resource to finish deleting before it waits for the next one.

Possible solutions

Current Workaround

You can hack in deletion in a particular order with something like:

if config.tilt_subcommand == 'down':
  local('kubectl delete my-resource --all')