# yaml-language-server: $schema=./values.schema.json
image:
  repository: ghcr.io/linuxserver/speedtest-tracker
  pullPolicy: IfNotPresent
  tag: 1.13.12@sha256:0c1f69a593703918c1a194ec71d8ac905361ca46ec38ba70582235c469a1b71f
service:
  main:
    ports:
      main:
        targetPort: 80
        port: 9004
ingress:
  main:
    integrations:
      homepage:
        widget:
          type: speedtest
persistence:
  config:
    enabled: true
    mountPath: "/config"
  varrun:
    enabled: false
redis:
  enabled: true
  redisUsername: default
cnpg:
  main:
    enabled: true
    user: speedtest-tracker
    database: speedtest-tracker

securityContext:
  container:
    runAsNonRoot: false
    readOnlyRootFilesystem: false
    runAsUser: 0
    runAsGroup: 0
workload:
  main:
    podSpec:
      containers:
        main:
          securityContext:
            capabilities:
              add:
                - SYS_CHROOT
                - KILL
          probes:
            liveness:
              enabled: true
              type: http
              path: /api/healthcheck
            startup:
              enabled: true
              type: http
              path: /api/healthcheck
            readiness:
              enabled: true
              type: http
              path: /api/healthcheck
          env:
            APP_URL: ""
            DB_CONNECTION: pgsql
            DB_HOST:
              secretKeyRef:
                name: cnpg-main-urls
                key: host
            DB_PORT: "5432"
            DB_DATABASE: "{{ .Values.cnpg.main.database }}"
            DB_USERNAME: "{{ .Values.cnpg.main.user }}"
            DB_PASSWORD:
              secretKeyRef:
                name: cnpg-main-user
                key: password
            APP_KEY:
              secretKeyRef:
                name: speedtest-tracker-secrets
                key: APP_KEY
            MAIL_MAILER: "smtp"
            MAIL_PORT: 465
            MAIL_USERNAME: ""
            MAIL_PASSWORD: ""
            MAIL_SCHEME: "SSL"
            MAIL_FROM_ADDRESS: ""
            MAIL_FROM_NAME: "Speedtest Tracker"
            TELEGRAM_BOT_TOKEN: ""
            CACHE_DRIVER: redis
            REDIS_URL:
              secretKeyRef:
                expandObjectName: false
                name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}'
                key: url
            PUBLIC_DASHBOARD: true
            APP_NAME: "Speedtest Tracker"
