global:
  security:
    allowInsecureImages: true

image:
  registry: docker.io
  repository: library/nextcloud
  flavor: apache
  tag: "33.0.0-apache"
  pullPolicy: IfNotPresent

service:
  type: NodePort
  port: 80
  nodePort: 30180

internalDatabase:
  enabled: false

nextcloud:
  username: "admin"
  password: "admin"

  host: "192.168.178.138"
  trustedDomains:
    - "192.168.178.138"
    - "nextcloud.lan"
    - "knode0"

  persistence:
    enabled: true
    storageClass: local-path
    accessMode: ReadWriteOnce
    size: 5Gi

  # --- SMB "Nachinstallation" via ConfigMap + initContainer ---
  extraVolumes:
    - name: smb-tools
      emptyDir: {}
    - name: smb-install-script
      configMap:
        name: smb-install-script
        defaultMode: 0755

  extraVolumeMounts:
    - name: smb-tools
      mountPath: /opt/smb-tools
    - name: smb-install-script
      mountPath: /scripts

  extraInitContainers:
    - name: install-smbclient
      image: debian:bookworm-slim
      imagePullPolicy: IfNotPresent
      command: ["sh", "/scripts/install-smb.sh"]
      volumeMounts:
        - name: smb-tools
          mountPath: /opt/smb-tools
        - name: smb-install-script
          mountPath: /scripts

  extraEnv:
    - name: PATH
      value: "/opt/smb-tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    - name: LD_LIBRARY_PATH
      value: "/opt/smb-tools/lib"

mariadb:
  enabled: true
  architecture: standalone
  auth:
    database: nextcloud
    username: nextcloud
    password: "nextcloud"
    rootPassword: "nextcloud"
  primary:
    persistence:
      enabled: true
      storageClass: local-path
      size: 10Gi

redis:
  enabled: true
  auth:
    enabled: true
    password: "redis"
  master:
    persistence:
      enabled: true
      storageClass: local-path
      size: 1Gi