ability to wait on crd deletion before deleting operator

Open
#6,384 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, kubernetes

Research direction

Start at the tilt down entry point and trace how Kubernetes manifests are sorted and how delete API requests are issued. Compare the proposed default wait, flag and timeout, and operator-specific approaches, then define completion as dependent resources finishing deletion before the operator is removed.

Written by the indexing model from the issue text.

Description

enhancement

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
  • Change the default behavior of tilt down to wait
  • Add a --wait flag with some --timeout flags
  • detect the CRD / operator case in particular, and adjust for that
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') 
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tilt-dev/tilt

All issues in tilt-dev/tilt

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.