nextcloud / helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
GNU Affero General Public License v3.0
295 stars 258 forks source link

accessMode: ReadWriteMany prevents the application from starting #537

Closed MohammedNoureldin closed 4 months ago

MohammedNoureldin commented 4 months ago

Describe your Issue

Setting accessMode: ReadWriteMany prevents the software from starting. The nextcloud container starts in the mode (initializing..)

Nothing is shown in the log, and no interesting events. The PV was properly mounted.

Describe your Environment


nextcloud:
  host: "nextcloud.{{ domain_name }}"
  configs:
    proxy.config.php: |-
      <?php
      $CONFIG = array (
        'trusted_proxies' => array(
          0 => '127.0.0.1',
          1 => '{{ pod_network_cidr }}',
        ),
        'overwriteprotocol' => 'https',
        'forwarded_for_headers' => array('HTTP_X_FORWARDED_FOR'),
      );
  mail:
    enabled: true
    fromAddress: nextcloud # fromAddress@domain
    domain: {{ domain_name }}
    smtp:
      host: mail.{{ domain_name }}
      port: 465
      secure: 'ssl'
      name: {{ mail_server.generic_mail_sender_username }}
      password: {{ mail_server.generic_mail_sender_password }}
  extraVolumes:
    - name: pki-self-signed
      secret:
        secretName: {{ domain_name }}-tls-self-signed
        defaultMode: 0600
    - name: seeds
      configMap:
        name: seeds
  extraVolumeMounts:
    - name: pki-self-signed
      mountPath: "/run/pki-self-signed"
      readOnly: true
    - name: seeds
      mountPath: "/run/seeds"
      readOnly: true

# TODO NICE: maybe convert to initContainer if possible
lifecycle:
  # The installation of `sudo` is required to execute `occ` with the user `www-data`.
  postStartCommand:
    - "bash"
    - "-c"
    - |
      apt update && apt install -y sudo;
      cp /run/pki-self-signed/ca.crt /usr/local/share/ca-certificates && update-ca-certificates;

      # TODO NICE: add flag handling to receive the --seed_version_path and --seeds_dir.
      bash /run/seeds/seeder.sh

cronjob:
  enabled: true

ingress:
  enabled: true
  className: nginx
  annotations:
    # These annotations are documented to be used to preserve the source IP.
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For"
  tls:
    - secretName: "{{ domain_name }}-tls"
      hosts:
        - "nextcloud.{{ domain_name }}"

persistence:
  enabled: true
  size: 8Gi
  # For horizontal pod auto-scaling
  accessMode: ReadWriteMany
# Disables the usage of SQLite database.
internalDatabase:
  enabled: false
postgresql:
  enabled: true
  global:
    postgresql:
      auth:
        database: nextcloud
        username: nextcloud
        existingSecret: database-credentials
        secretKeys:
          adminPasswordKey: admin_password
          userPasswordKey: password
  primary:
    persistence:
      enabled: true
      size: 8Gi
MohammedNoureldin commented 4 months ago

After extensive tests I see that this is most likely not related to Helm chart. Can we move it to the proper repository?

provokateurin commented 4 months ago

Sure, but I don't know if this is a docker specific issue either. Probably your installation is borked and therefore the files are missing.

MohammedNoureldin commented 4 months ago

Thank you for your reply.

It is not also Docker related. I opened it here because my setup used to work with older Chart, I tried that chart again but I still have the same issue. Probably I ruined something unintentionally.

I am starting with a minimal configs and increasing them step by step. I will report the updates.

MohammedNoureldin commented 4 months ago

Seems to be related to https://github.com/nextcloud/helm/issues/399

I will close in favor to the other already opened issues.