Container home replaced

Hi,
I have installed jupyterhub on k8s, I have enable multicontainer for each user.
I created a container with sparkmagic configured for my cluster but when I start the container the /home/jovan is replaced and I do not find the kernel and the configuration for spark cluster.
How can I address this issue? Shall I define an external persistance volume?
Thanks

Hi! Can you show us your full Z2JH and any other Jupyter related configuration, with secrets redacted? It’ll also be helpful if you can give us some information about your Kubernetes cluster.

Hi,
I deployed with helm.
The helm config.yaml is:

proxy:
  secretToken: "XXXX"
prePuller:
  hook:
    enabled: false
ingress:
  enabled: true
  hosts:
    - jhub.gstp.k8s.altecspace.it
singleuser:
  image:
    pullPolicy: "Always"
    pullSecrets:
      - "gitlab"
  profileList:
    - display_name: "Spark SMO Cluster"
      description: "Environment with access to Spark Cluster"
      kubespawner_override:
        image: gitlab.altecspace.it:4567/k8s/jupyterhub/sparkmagic-smo
    - display_name: "TensorFlow"
      description: "Environment with TernsorFlow libraries"
      kubespawner_override:
        image: jupyter/tensorflow-notebook:5cb007f03275
    - display_name: "SciPy"
      description: "Environment with Scipy libraries"
      kubespawner_override:
        image: jupyter/scipy-notebook:5cb007f03275
  storage:
    dynamic:
      storageClass: cephfs
  extraEnv:
    GRANT_SUDO: "yes"
    NOTEBOOK_ARGS: "--allow-root"
    CHOWN_HOME: "yes"
    CHOWN_HOME_OPTS: "-R"
  uid: 0
  cmd: start-singleuser.sh
hub:
  config:
  containerSecurityContext:
    runAsUser: 0
    runAsGroup: 0
    allowPrivilegeEscalation: true
  fsGid: 0
debug:
  enabled: true

K8S, v. 1.16.15, is deployed on 3 physical nodes.
Thanks

I tried with lifecyclehooks but seems does not work:

singleuser:
  image:
    pullPolicy: "Always"
    pullSecrets:
      - "gitlab"
  profileList:
    - display_name: "Spark SMO Cluster"
      description: "Environment with access to Spark Cluster"
      kubespawner_override:
        image: gitlab.altecspace.it:4567/k8s/jupyterhub/sparkmagic-smo:0.2
        lifecycleHooks:
          postStart:
            exec:
              command: ["sh","/tmp/config.sh"]

Anything I try to set in lifecycleHooks seems not working also a touch.

Thanks

I changed lifecycleHooks to lifecycle_hooks and I solved.
Thanks