#
# IMPORTANT NOTE
#
# This chart inherits from k8s-at-home common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
#

image:
  # -- image repository
  # (Same image also available on Github : ghcr.io/obeone/winbox)
  repository: obeoneorg/winbox
  # -- image tag
  # @default -- chart.appVersion
  tag:
  # -- image pull policy
  pullPolicy: Always

# -- environment variables. See more environment variables in the [winbox documentation](https://winbox.org/docs).
# @default -- See below
env:
  # -- Set the container timezone
  TZ: UTC
  # -- HTTP password (user is always `kasm_user`)
  VNC_PW: password
  # -- Set debug mode
  KASM_DEBUG: "true"

# -- Configures service settings for the chart.
# @default -- See the [docs](https://github.com/k8s-at-home/library-charts/blob/main/charts/stable/common/README.md)
service:
  main:
    annotations:
      # -- Tell Traefik to use TLS to connect to service
      # You also need a verified connection (valid certificate, you can set it trougth storage)
      # or by setting insecure server transport (on ingressRoute or with --serversTransport.insecureSkipVerify=true startup option)
      traefik.ingress.kubernetes.io/service.serversscheme: https
    ports:
      http:
        port: 6901

ingress:
  # -- Enable and configure ingress settings for the chart under this key.
  # @default -- See the [docs](https://github.com/k8s-at-home/library-charts/blob/main/charts/stable/common/README.md)
  main:
    enabled: false
    annotations:
      # -- Specify connect to service using TLS (not sure it's the right configuration for nginx... Tell me if it's ok !)
      nginx.org/ssl-services: winbox
    hosts:
      - host: my.host.local
        paths:
          - path: /
            pathType: Prefix
    ingressClassName: ""
    tls:
      - hosts:
          - my.host.local
        secretName: mycert-tls

# -- Configure persistence settings for the chart under this key.
# @default -- See the [docs](https://docs.k8s-at-home.com/our-helm-charts/common-library-storage/)
persistence:
  wine:
    enabled: false
    mountPath: /home/kasm-default-profile/.wine
  cert:
    # -- TLS certificate
    enabled: false
    type: custom
    volumeSpec:
      secret:
        secretName: mycert-tls
    subPath:
      - path: tls.crt
        mountPath: /opt/kasm/current/certs/kasm_nginx.crt
        readOnly: true
      - path: tls.key
        mountPath: /opt/kasm/current/certs/kasm_nginx.key
        readOnly: true
