# yaml-language-server: $schema=./values.schema.json
image:
  repository: docker.io/aceberg/watchyourlan
  tag: 2.1.4@sha256:f77532ca7c3c9a4398cb094df7674013a3d7fcf4699386f1e456c24df6fef00e
  pullPolicy: IfNotPresent
securityContext:
  container:
    readOnlyRootFilesystem: false
    runAsNonRoot: false
    runAsGroup: 0
    runAsUser: 0
    capabilities:
      add:
        - NET_RAW
podOptions:
  hostNetwork: true
watchyourlan:
  gui_ip: "0.0.0.0"
  interfaces:
    - enp1s0
  theme: sand
  timeout: 120
  shoutrrr_url: ""
service:
  main:
    ports:
      main:
        port: 10355
        protocol: http
persistence:
  data:
    enabled: true
    mountPath: "/data"

cnpg:
  main:
    enabled: true
    user: watchyourlan
    database: watchyourlan
workload:
  main:
    podSpec:
      containers:
        main:
          probes:
            liveness:
              type: http
              path: /
            readiness:
              type: http
              path: /
            startup:
              type: http
              path: /
          env:
            PORT: "{{ .Values.service.main.ports.main.port }}"
            # unsure on postgres format for PG_CONNECT
            PG_CONNECT: '{{ printf "postgres://%s:%s@%s:5432/%s" .Values.cnpg.main.user .Values.cnpg.main.creds.password .Values.cnpg.main.creds.host .Values.cnpg.main.database }}'
            USE_DB: postgres
            # User Defined
            HOST: "{{ .Values.watchyourlan.gui_ip }}"
            IFACES: '{{ join " " .Values.watchyourlan.interfaces }}'
            THEME: "{{ .Values.watchyourlan.theme }}"
            TIMEOUT: "{{ .Values.watchyourlan.timeout }}"
            SHOUTRRR_URL: "{{ .Values.watchyourlan.shoutrrr_url }}"
