Skip to content

Th image-puller does not make use of .Values.singleuser.image.pullPolicy #3778

@theAddict

Description

@theAddict

Bug description

Helm deployment fails during deployment when using pre-staged (pre-imported) single user images, with pullPolicy: Never. During startup the image puller, in /templates/image-puller/_helpers-daemonset.tpl, does not set the imagePullPolicy.

I've solved this locally by adding the line imagePullPolicy: {{.Values.singleuser.image.pullPolicy}} to templates/image-puller/_helpers-daemonset.tpl:120, however I suspect the implementation should match the with syntax seen elsewhere in the file.

Unfortunately I'm under a time crunch, so I'm not able to spend time to review the committer guidelines, test, etc. I should be able to circle back in a month or so if this hasn't already been addressed. Thank you!

How to reproduce

  1. Pre-stage the singleuser image, using an invalid url i.e. localhost/mypod (can simulate via re-tag of k8s-singleuser-sample)
  2. Use the following config.yaml
singleuser:
  image:
    name: localhost/mypod 
    tag: latest
    pullPolicy: Never
  1. run helm install jhub jupyterhub-4.3.1.tgz -f config.yaml

Expected behaviour

The chart should not attempt to fetch the image when pullPolicy is set to Never

Actual behaviour

The hook-image-puller-* pod fails with the following error:

E1206 18:53:39.028232    8254 pod_workers.go:1301] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"image-pull-singleuser\" with ImagePullBackOff: \"Back-off pulling image \\\"localhost/mypod:latest\\\": ErrImagePull: failed to pull and unpack image \\\"localhost/mypod:latest\\\": failed to resolve image: failed to do request: Head \\\"https://localhost/v2/mypod/manifests/latest\\\": dial tcp [::1]:443: connect: connection refused\"" pod="default/hook-image-puller-vcbgm" podUID="e9991095-8c66-4e2f-8356-d9f76c615556"

Your personal set up

  • Hardware: QEMU KVM
  • Alpine v3.22 virt
  • Kubernetes: k3s, installed via the community repo
  • Helm: helm, installed via the community repo,
  • Env: KUBECONFIG=/etc/rancher/k3s/k3s.yaml
  • Chart version: 4.3.1
  • Values
singleuser:
  image:
    name: localhost/mypod 
    tag: latest
    pullPolicy: Never

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions