New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tilt up appears to delete previously created resources #3719
Comments
Hmmm...I was not able to reproduce this issue. Here's the sandbox I'm playing around in: Does that capture what you're doing, or am i missing something? When I tilt up in that sandbox, it preserves both the configmap and the pvc |
My hypothesis for what is happening:
If your log shows an error along the lines of "metadata.annotations: Too long: must have at most X bytes" when applying the ConfigMap, that'd confirm this hypothesis. If you have a ConfigMap that's potentially bigger than 256k, that'd be evidence for this hypothesis. Regardless of whether the scenario I described is what's actually happening in your case, I'm pretty sure it's possible and a thing we should fix. |
repro'd the above in this branch The logs show this error even without using any (k)log verbosity flags:
|
shucks. Two things that'd be nice to look at to rule things out:
|
OK, we think we know what's going on. All the uncategorized resources are getting deployed together. But applying the ConfigMap fails with this error
which means that Tilt will give up and do a complete delete and apply I think what we should probably do in the short-term is apply these resources independently rather than batching them together. This would fix a bunch of issues in this space (e.g. #3686) More medium-term, we should reimplement the kubectl apply like Helm did here: |
This should be fixed in tilt v0.17.4 ! |
Given a set of resources that are only managed when tilt up runs (managed via a tilt_subcommand variable), when tilt down runs those resources remain as expected. For example, this is used when a PVC needs to be retained between tilt runs.
Subsequently after the tilt down, when tilt up runs again, these resources seem to get deleted then recreated. The aforementioned PVC gets an age value indicating that it was created on that tilt up run. Looking at the verbose (klog=8) logs, the very first thing logged in the uncategorized section is a list of all the resources that have been retained from a prior tilt up, and shortly thereafter kubectl logs that they are all being deleted. This also deletes other resources, such as secrets, configmaps, serviceaccounts, clusterroles, etc.
The main log message of deletions starts with 'kubectl stdout:' and gives a list of all the resources that have been deleted, mirroring the list logged to uncategorized.
Thanks!
The text was updated successfully, but these errors were encountered: