Hook-image-puller not use the specific mirror

I tried to initialize my jupyterhub with k8s at the basis of z2jh.

Before I used it as above, I changed all registry.k8s.io to m.daocloud.io/registry.k8s.io

helm upgrade jhub jupyterhub/ --values=config.yaml

config.yaml

singleuser:
  networkPolicy:
    enabled: false
  defaultUrl: "/lab"
  extraEnv:
    EDITOR: "vim"
    SHELL: "/bin/zsh"
  startTimeout: 300
  storage:
    capacity: 2Gi
    dynamic:
      storageClass: nfs-csi
    extraVolumes:
      - name: shm-volume
        mountPath: /dev/shm
        emptyDir:
          medium: Memory
          sizeLimit: "2Gi"
  image:
    # You should replace the "latest" tag with a fixed version from:
    # https://hub.docker.com/r/jupyter/datascience-notebook/tags/
    # Inspect the Dockerfile at:
    # https://github.com/jupyter/docker-stacks/tree/HEAD/datascience-notebook/Dockerfile
    name: hub.dlcloud.info/blcc/base-notebook
    tag: v1
    pullPolicy: Never
  # `cmd: null` allows the custom CMD of the Jupyter docker-stacks to be used
  # which performs further customization on startup.
  cmd: null
kubectl get pods
# then get
NAME                              READY   STATUS             RESTARTS   AGE
continuous-image-puller-nqw5s     1/1     Running            0          94m
hook-image-puller-4fkx6           0/1     ImagePullBackOff   0          47m
hub-7b8486d6c9-mfvcb              0/1     Pending            0          80m
proxy-64dcf6c4f6-d7htm            1/1     Running            0          94m
user-scheduler-7955497f75-6fr9p   1/1     Running            0          94m
user-scheduler-7955497f75-7gsqk   1/1     Running            0          94m
kubectl describe pods hook-image-puller-...

  Normal   Pulling    42m (x4 over 48m)     kubelet            Pulling image "registry.k8s.io/pause:3.9"
  Warning  Failed     40m (x4 over 47m)     kubelet            Error: ErrImagePull
  Warning  Failed     40m (x4 over 44m)     kubelet            Error: ImagePullBackOff

I expected to pull from my mirror website, but it still pulled from registry.k8s. At the same time, I have downloaded the images and taged the same name, strangely not use it but repulled it.

Please could you share your full Z2JH config with us (apart from secrets), and tell us which version of Z2JH you’re using?

Thank you for offering to help! Here’s the information you need:

I used the Z2JH version is v3.3.8

And my full config.yaml removed secret and OAuth here .

proxy:
  chp:
    networkPolicy:
      enabled: false
  service:
    nodePorts:
      http: 30000

debug:
  enabled: true

hub:
  networkPolicy:
    enabled: false
      # extraVolumes:
      # - name: hub-db-dir
      # persistentVolumeClaim:
      # claimName: hub-db-dir
  config:
    admin_users:
      - jianghy
      - zhonger
    JupyerHub:
      authenticator_class: gitlab # oauthenticator.gitlab.GitLabOAuthenticator
    GitLabAuthenticator:
        # some config there ...


cull:
  enabled: true
  maxAge: 172800
  timeout: 600
  every: 60

singleuser:
  networkPolicy:
    enabled: false
  defaultUrl: "/lab"
  extraEnv:
    EDITOR: "vim"
    SHELL: "/bin/zsh"
  startTimeout: 300
  storage:
    capacity: 2Gi
    dynamic:
      storageClass: nfs-csi
    extraVolumes:
      - name: shm-volume
        mountPath: /dev/shm
        emptyDir:  
          medium: Memory
          sizeLimit: "2Gi"
  image:
    name: hub.dlcloud.info/blcc/base-notebook
    tag: v1
    pullPolicy: Never
  cmd: null

Look at the chart’s default values, you will find the image registry.k8s.io/pause be referenced someplace. Configure to use your own image there.

I changed default values.yaml with vim instruction :%s/m.daocloud.io/registry.k8s/registry.k8s/g and reinstalled it but not worked.

  pause:
    containerSecurityContext:
      runAsUser: 65534 # nobody user
      runAsGroup: 65534 # nobody group
      allowPrivilegeEscalation: false
    image:
      name: m.daocloud.io/registry.k8s.io/pause
      # tag is automatically bumped to new patch versions by the
      # watch-dependencies.yaml workflow.
      #
      # If you update this, also update scheduling.userPlaceholder.image.tag
      #
      tag: "3.9"
      pullPolicy: Never
      pullSecrets: []

hook-image-puller-* still try to pull registry.k8s.io/pause rather than my own configuration.

And I found a strange thing is I changed my base-notebook version from v1 to v2 (config.yaml) , but still pulled v1 rather than v2.

It sounds like your changes weren’t deployed. What command are you running? If you delete your deployment, check that everything is deleted, and redeploy, does it work?

Directory as follow:

.
├── config.yaml
├── jupyterhub # z2jh chart pulled

Command is helm upgrade --install jhub jupyterhub/ --values=config.yaml