image:
  repository: tccr.io/truecharts/matomo
  tag: v4.10.1@sha256:dcecdacfaa9d763534ecce15b7e5a9f3ef8d2df52b70095783238873de3084db
  pullPolicy: IfNotPresent

securityContext:
  runAsNonRoot: false
  readOnlyRootFilesystem: false

# Run as root for the cron to work
podSecurityContext:
  runAsUser: 0
  runAsGroup: 0

env:
  BITNAMI_DEBUG: true
  APACHE_HTTP_PORT_NUMBER: "{{ .Values.service.main.ports.main.port }}"
  APACHE_HTTPS_PORT_NUMBER: "{{ .Values.service.https.ports.https.port }}"
  MATOMO_DATABASE_PORT_NUMBER: 3306
  MATOMO_DATABASE_NAME: "{{ .Values.mariadb.mariadbDatabase }}"
  MATOMO_DATABASE_USER: "{{ .Values.mariadb.mariadbUsername }}"
  PHP_DATE_TIMEZONE: "{{ .Values.TZ }}"
  # User / Site Config
  MATOMO_USERNAME: "admin"
  MATOMO_PASSWORD: "password"
  MATOMO_EMAIL: "myemail@example.com"
  MATOMO_WEBSITE_NAME: "My Website"
  MATOMO_WEBSITE_HOST: "https://web.example.com"
  MATOMO_HOST: "127.0.0.1"
  # Reverse Proxy Config
  MATOMO_ENABLE_PROXY_URI_HEADER: false
  MATOMO_ENABLE_ASSUME_SECURE_PROTOCOL: false
  MATOMO_ENABLE_FORCE_SSL: false
  # No defaults, but usually this header is used
  # MATOMO_PROXY_CLIENT_HEADER: "HTTP_X_FORWARDED_FOR"
  # SMTP Config
  MATOMO_SMTP_HOST: ""
  MATOMO_SMTP_PORT: ""
  MATOMO_SMTP_USER: ""
  MATOMO_SMTP_PASSWORD: ""
  # Available protocols are: "ssl", "tls", "none"
  MATOMO_SMTP_PROTOCOL: ""
  # Available mechanisms are: "Plain", "Login", "Crammd5"
  MATOMO_SMTP_AUTH: "Plain"
  # PHP Config
  PHP_MEMORY_LIMIT: "2048M"
  PHP_ENABLE_OPCACHE: true
  # PHP_EXPOSE_PHP:
  # PHP_MAX_EXECUTION_TIME:
  # PHP_MAX_INPUT_TIME:
  # PHP_MAX_INPUT_VARS:
  # PHP_POST_MAX_SIZE:
  # PHP_UPLOAD_MAX_FILESIZE:
  MATOMO_DATABASE_HOST:
    secretKeyRef:
      name: mariadbcreds
      key: plainhost
  MATOMO_DATABASE_PASSWORD:
    secretKeyRef:
      name: mariadbcreds
      key: mariadb-password

probes:
  liveness:
    path: "/index.php"
  readiness:
    path: "/index.php"
  startup:
    path: "/index.php"

service:
  main:
    ports:
      main:
        protocol: HTTP
        port: 10172
        targetPort: 10172
  https:
    enabled: true
    ports:
      https:
        enabled: true
        protocol: HTTPS
        port: 10173
        targetPort: 10173

persistence:
  data:
    enabled: true
    mountPath: "/bitnami/matomo"

mariadb:
  enabled: true
  mariadbUsername: matomo
  mariadbDatabase: matomo
  existingSecret: "mariadbcreds"
