# yaml-language-server: $schema=./values.schema.json
image:
  pullPolicy: IfNotPresent
  repository: docker.io/itzg/rcon
  tag: latest@sha256:c9521f333bf9eaedf2db0acd750e67be88eaaa9c5e9026385bd875dc18a49110
rcon:
  rwa_admin: true
  rwa_env: false
  rwa_web_rcon: false
  rwa_read_only_widget_options: false
  rwa_game: minecraft
  rwa_server_name: minecraft
  rwa_rcon_host: ""
  rwa_rcon_port: 25575
  rwa_websocket_url_ssl: ""
  rwa_websocket_url: ""
  rwa_restrict_commands: []
  rwa_restrict_widgets: []
service:
  main:
    ports:
      main:
        port: 4326
        protocol: http
        targetPort: 4326
  websocketaccess:
    enabled: true
    ports:
      websocketaccess:
        enabled: true
        port: 4327
        protocol: tcp
        targetPort: 4327
persistence:
  db:
    enabled: true
    mountPath: /opt/rcon-web-admin/db

securityContext:
  container:
    readOnlyRootFilesystem: false
    runAsNonRoot: false
    runAsGroup: 0
    runAsUser: 0
workload:
  main:
    podSpec:
      containers:
        main:
          env:
            RWA_ADMIN: '{{ ternary "TRUE" "FALSE" .Values.rcon.rwa_admin }}'
            RWA_ENV: '{{ ternary "TRUE" "FALSE" .Values.rcon.rwa_env }}'
            RWA_WEB_RCON: '{{ ternary "TRUE" "FALSE" .Values.rcon.rwa_web_rcon }}'
            RWA_READ_ONLY_WIDGET_OPTIONS: '{{ ternary "TRUE" "FALSE" .Values.rcon.rwa_read_only_widget_options }}'
            RWA_GAME: "{{ .Values.rcon.rwa_game }}"
            RWA_SERVER_NAME: "{{ .Values.rcon.rwa_server_name }}"
            RWA_RCON_HOST: "{{ .Values.rcon.rwa_rcon_host }}"
            RWA_RCON_PORT: "{{ .Values.rcon.rwa_rcon_port }}"
            RWA_RESTRICT_COMMANDS: '{{ join "," .Values.rcon.rwa_restrict_commands }}'
            RWA_RESTRICT_WIDGETS: '{{ join "," .Values.rcon.rwa_restrict_widgets }}'
            RWA_WEBSOCKET_URL_SSL: "{{ .Values.rcon.rwa_websocket_url_ssl }}"
            RWA_WEBSOCKET_URL: "{{ .Values.rcon.rwa_websocket_url }}"
            RWA_USERNAME: admin
            RWA_PASSWORD: pass
            RWA_RCON_PASSWORD: pass
