-
Notifications
You must be signed in to change notification settings - Fork 314
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
K8s resources in uncategorized are not updated an change #3096
Comments
Hi @elemental-lf, thanks for the kind words! We really appreciate it. 🤗 I wasn't able to reproduce this problem with this example repo: https://github.com/jazzdan/uncategorized-example Is it possible you're telling Tilt about your YAML in a different way? Are you using a Hope we can get this fixed because it sounds super annoying. Thanks for hanging in there and thanks for your help! |
Hmm, thanks for the quick feedback, Dan! I've tried your example and it works for me, too. I originally suspected that my problem was simply the way Tilt was currently designed, but your example proofs me wrong. My helm_template = str(
helm('charts/benji-k8s',
namespace='rook-ceph',
name='benji',
values=['../../dual/dual/addons/values/global/benji.yaml', '../../dual/dual/addons/values/dev/benji.yaml']))
helm_template = helm_template[helm_template.index('---'):]
k8s_yaml(blob(helm_template)) The string splicing is a work-around for #2805. When I change something in the chart the changed file is detected and listed in the On the other hand I tried to reproduce it based on your example by extending it to use a simple Helm chart. And it worked every time when I tried to reproduce it: I tried including a CRD in the chart, I tried with a |
Thanks @elemental-lf, this example is super helpful. Let me try to create a more faithful example project and get back to you |
@jazzda, as an afterthought, I'm not sure any more if my last paragraph is completely unambiguous: I could not reproduce it with the extended example with the different variations I tried. It always worked. It is always broken with my original project so there must be some other difference between the two which I haven't discovered yet. |
@elemental-lf sweet, just to be extra clear :P This: helm_template = str(
helm('charts/benji-k8s',
namespace='rook-ceph',
name='benji',
values=['../../dual/dual/addons/values/global/benji.yaml', '../../dual/dual/addons/values/dev/benji.yaml']))
helm_template = helm_template[helm_template.index('---'):]
k8s_yaml(blob(helm_template)) Is the part of your Tiltfile that causes the problem. But when you tried to adapt that in to a standalone example, you couldn't get it to reproduce? Is that what you mean? |
@elemental-lf what file are you changing, that you are expecting to trigger an update? Can you send me the output of these two commands? You'll need to have jq installed and you need to run these commands while Tilt is running:
Thanks! |
@jazzdan I've got another clue. It seems that I have a hanging
Is there a way to activate additional logging? To find out what resource produces the hang? |
@elemental-lf you could try getting a golang stack prace by sending it the Also can you paste the output of As for additional logging, there doesn't appear to be any but let me look in to adding timeouts to those kubectl calls. |
Thank you for looking into this, here's the output from
|
And here's the other requested output. I needed to redact some things in the manifests of the second one. [
"/home/lf/src/backy2/benji/.tiltignore",
"/home/lf/src/backy2/benji/Tiltfile",
"/home/lf/src/backy2/benji/tilt_config.json",
"/home/lf/src/backy2/benji/images/benji/Dockerfile",
"/home/lf/src/backy2/benji/images/benji-k8s/Dockerfile",
"/home/lf/src/backy2/benji/images/benji-k8s-operator/Dockerfile",
"/home/lf/src/dual/dual/addons/values/global/benji.yaml",
"/home/lf/src/dual/dual/addons/values/dev/benji.yaml",
"/home/lf/src/backy2/benji/charts/benji-k8s",
"/home/lf/src/backy2/benji/.dockerignore"
]
|
@elemental-lf I'm still working on adding the timeouts, but out of curiosity, does applying that YAML by hand with |
I've tested some more and
From the output of
The stack trace looks similar to the one we got from
And this led me to this I think the following options should be investigated if time permits:
For the time being it would help if Tilt would expose a flag to use server-side apply (passing |
wow, nice find! Ya, it might be worth trying to pull in json-patch from upstream and see if that helps. apply --server-side=true might also be work exposing, in the same way that we have --klog to turn on debug logging |
ugh, the problem is that json-patch is currently broken with go modules, see evanphx/json-patch#98 |
should be fixed in the latest release |
I'm seeing this with
0.12.8
at the moment but the behaviour has been the same in older versions I think: Changes to K8s resources which are grouped underuncategorized
are not reapplied automatically. I've been bitten be this multiple times when correcting permission issues inClusterRoles
during development. This also affects CRDs for which this would probably harder to fix as they are largely immutable after creation and recreating them would have some side-effects as it would delete all custom resources of that kind.This is related to the discussion in #2989 I think.
(I still like to point out that Tilt is an awesome tool that has helped me immensely during development as it simplifies deployment and container image publishing, reduces turn-around times significantly and also visualizes all the related logs to quickly find a problem . I've looked at one competing solution in the meantime and I couldn't get it to run properly (which also might be my fault). It also felt more invasive than Tilt and made more changes to the Kubernetes cluster which I didn't like. Keep up the good work! Thank you!)
The text was updated successfully, but these errors were encountered: