tilt-dev / tilt-dev/tilt-extensions
`helm_resource` + `docker_build`: using a chart with `imagePullPolicy: Always` does not get overwritten with `IfNotPresent`
Nobody has claimed this yet.
- Dominant language
- Starlark
- Stars
- 243
- Forks
- 194
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 5
Description
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).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the helm_resource entry point with k8s_yaml(helm('./chart/app')) in a Kind integration, focusing on imagePullPolicy and the entrypoint overrides mentioned in the issue. Reproduce the pull failure with imagePullPolicy: Always, then determine whether the behaviors can be aligned or whether the README should document the migration caveats.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100