zammad / zammad-helm

Zammad Helm chart for Kubernetes

Home Page:https://artifacthub.io/packages/helm/zammad/zammad

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto_wizard settings do not work

mvngne opened this issue · comments

commented

Is this a request for help?:
Yes

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Version of Helm and Kubernetes:
Helm: 10.0.0
k8s: v1.24.6

What happened:
After enabling the autowizard and providing some configuration, the setting seem to have no effekt. On first startup the manual wizard appers, even if the autowizard link gets opend manually (http://zammad/#getting_started/auto_wizard).

What you expected to happen:
Automatic configuration of everthing provided in the autowizard config.

How to reproduce it (as minimally and precisely as possible):
Empty k8s namespace or create a new one. Create basic configuration for the helm chart. Deploy. Open zammad web page.

Anything else we need to know:
I've tried many times with several settings. The zammad-init container has the environment setting AUTOWIZARD_JSON set and if I take a look into zammand-nginx I can find the auto_wizard.json where it should be (at least I think).

zammad@zammad-0:~/var$ ls -al /opt/zammad/var/
total 28
drwxrwsr-x 3 zammad zammad  4096 Sep 27 14:59 .
drwxr-xr-x 1 zammad zammad  4096 Sep 27 15:02 ..
-rw-r--r-- 1 zammad zammad   474 Sep 27 14:59 auto_wizard.json
drwxrws--- 2 zammad zammad 16384 Sep 27 14:58 lost+found

I can confirm this issue.

@monotek the reason seems to be that the zammad-railsserver container does not see this variable, even though it should be pre-populated by docker-entrypoint.sh:

: "${AUTOWIZARD_RELATIVE_PATH:='var/auto_wizard.json'}"

It seems to be empty in the context of the container. Same issue seems to affect other variables, too. Can you tell me what's going on here? I would expect that the docker-entrypoint.sh should still work correctly also on kubernetes.

No, the compose entrypoint is not used.
Instead an own command is defined:

https://github.com/zammad/zammad-helm/blob/main/zammad/templates/statefulset.yaml#L258

The actual file is created in the init container:
https://github.com/zammad/zammad-helm/blob/main/zammad/templates/configmap-init.yaml#L36

I guess it's missing in the rails container now as the storage is not shared anymore.

I'll create a fix later.
Should be possible via a secretmount so we can ditch the whole creation of the file via initcontainer...

🤦 thanks for the pointer. The file is indeed present, but the ENV AUTOWIZARD_RELATIVE_PATH to inform Zammad about its location is not. I'll send a MR later.