I’m trying to get a busybox initContainer run to change some permissions on the user $HOME folders that are created. Below is my singleuser.initContainers section of my config.yaml in Z2JH stack
initContainers:
- name: grant-group-write-on-the-home-init
image: busybox
command: [“sh”, “-c”, “chmod 775 /home/jovyan”]
securityContext:
runAsUser: 1000
volumes:- name: home-for-busybox
hostPath:
path: /clusterfs/minos/kubestorage/{username}
volumeMounts: - name: home-for-busybox
mountPath: /home/jovyan
- name: home-for-busybox
With this when the hub tries to spawn I see this message:
“Pod “jupyter-kmuriki” is invalid: spec.initContainers[0].volumeMounts[0].name: Not found: “home-for-busybox””,“reason”:“Invalid”
Any clue on what I’m missing ? Below is the remaining singleuser.storage section
storage:
type: hostPath
extraVolumes:
- name: home
hostPath:
path: /clusterfs/minos/kubestorage/{username}
- name: common-data
hostPath:
path: /clusterfs/minos/public_datasets
extraVolumeMounts:
- name: home
mountPath: /home/jovyan
- name: common-data
mountPath: /home/jovyan/data
readOnly: True
Let me know if any of you have any suggestions.
Thanks,
Krishna.