Helm chart not working with non-ROOT context

Hello,

I’m trying to install the helm chart (xwiki-1.2.4) in minikube to a non-root context but the application fails to start up before restarting the pod after ~10 minutes.

I’ve tried seemingly relevant suggestions listed in both:

and

But so far have been unable to get anything working. You should be able to reproduce the issue with the following values.yaml file + install script:

# values.yaml
extraEnvVars:
  - name: CONTEXT_PATH
    value: "/xwiki" # also tried "xwiki" but neither work

Install script to patch an error in initialization-configmaps.yaml when using CONTEXT_PATH env var:

#!/bin/bash
# Install the chart
helm upgrade -i -n xwiki xwiki xwiki-helm/xwiki -f values.yaml --create-namespace
# Patch the `sed` issue on line 99 and 101 of the entrypoint script
kubectl -n xwiki get cm xwiki-init-scripts -o yaml | sed 's|/ROOT/|/${CONTEXT_PATH}/|' | kubectl apply -f -

(viewing the logs of the xwiki-0 pod confirms that it picks up that it’s installing it in a different context, and the lack of a sed error seemingly confirms that it successfully applied the patch)

It appears that just adding the CONTEXT_PATH is enough to get xwiki to no longer work. And to rule out any sort of persistent configuration changes, in between making values.yaml configuration changes, I would run the following to delete the PVCs, just in case:

helm -n xwiki uninstall xwiki && kubectl -n xwiki delete pvc data-xwiki-mysql-0 xwiki-data-xwiki-0

Update:

I was able to get something working by using a post-renderer to remove the xwiki entrypoint command (falling back to rely on the docker image’s default command), and disabling the probes. So the helm chart entrypoint might no longer be needed with updates made to the docker image.

Now I can run the helm chart with a non-root context, and see the start up initialization screen (where I previously couldn’t) and everything appears to work as expected.

For completeness, the post-renderer / values.yaml file / command used:

postRenderer.sh:

#!/bin/bash

manifest="$(cat -)"
manifest="$(sed 's/command: .*//g' <<< "${manifest}")"

echo "${manifest}"

values.yaml:

extraEnvVars:
  - name: CONTEXT_PATH
    value: xwiki

probes:
  startup:
    enabled: false
  liveness:
    enabled: false
  readiness:
    enabled: false

Command:

helm upgrade -n xwiki -i xwiki xwiki-helm/xwiki --post-renderer ./postRenderer.sh -f values.yaml --create-namespace