Skip to content
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

helm_resource + docker_build: using a chart with imagePullPolicy: Always does not get overwritten with IfNotPresent #409

Open
Canas opened this issue Jun 11, 2022 · 1 comment

Comments

@Canas
Copy link

Canas commented Jun 11, 2022

Note: This is a problem when using Kind integration with Tilt, where the image is injected into the node container using kind load

I was trying to replace k8s_yaml(helm('./chart/app')) with helm_resource and was getting pull errors for the image because the chart had imagePullPolicy: Always configured. Comparing the deployment files between both I noticed that besides some labels, k8s_yaml(helm()) also overrides the pull policy with IfNotPresent so it uses the existing one in the Kind node. If this is not overridden then the pod will try to pull from outside and shows the error below:

[event: pod expreport/expreport-app-lndsvc-5dc65cdb86-kl79x] Failed to pull image "app:tilt-4f2d8070cf356100": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/app:tilt-4f2d8070cf356100": failed to resolve reference "docker.io/library/app:tilt-4f2d8070cf356100": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

I wonder if there is any way to copy the key overrides made by k8s_yaml(helm()) to helm_resource. Else, at the very least it would be nice to put in the README some caveats when porting from native tilt functions to the extension. It seems that the same is happening with entrypoint overrides (already mentioned here).

@nicks
Copy link
Member

nicks commented Jun 13, 2022

Thanks for reporting! Ya, the whole idea of helm_resource is that it treats helm as a black box that deploys your charts. The downside is that there are ways to write charts that won't work in dev.

Maybe we could add a warning for this when tilt sees helm deploy a chart that won't work properly. Feel free to open a PR for a note in the README too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants