sonatype / helm3-charts

Helm3 charts for Nexus IQ
Other
110 stars 120 forks source link

[nexus-repository-manager] with nexus.properties.override=true logback folder is missing #137

Open EugenMayer opened 2 years ago

EugenMayer commented 2 years ago

When using nexus.properties.override = true the start fails with an exception since logback folder cannot be accessed (since it is missing).

Currently, if fix this using an initContainer

    - name: fix-nexus-data-logback
      image: busybox
      imagePullPolicy: IfNotPresent
      command: ["/bin/sh"]
      args:
        - -c
        # mkdir -p is need to fix an exception on boot that the folder is missing if nexus.properties.override = true is set
        - >
          mkdir -p /nexus-data/etc/logback;
      volumeMounts:
        - name: nexus-data
          mountPath: /nexus-data
awalker125 commented 2 years ago

I hit the same. I think its because of the way k8s mounts the config in pod. The mountpoint is owned root root and any files/folders under the mount disappear.

One way I thought to try to solve it was to mount it else where then symlink it to the folder as part of the init container.

https://github.com/kubernetes/kubernetes/issues/81089

awalker125 commented 2 years ago

Your fix worked for me thanks. 👍 Saved me lots of messing around.