# yaml-language-server: $schema=./values.schema.json
image:
  repository: docker.io/itzg/mc-router
  pullPolicy: IfNotPresent
  tag: 1.41.0@sha256:927b9bfb6bf8c83c7194ff79c406812176181438eae8aa7a5477d5ede1d13caa
service:
  main:
    ports:
      main:
        port: 25565
  api:
    enabled: true
    ports:
      api:
        enabled: true
        port: 25564

# manual option
mcrouter:
  # vanilla:25565
  default: ""
  mappings: []
    # - vanilla:25565
    # - forge:25565

workload:
  main:
    podSpec:
      containers:
        main:
          probes:
            liveness:
              port: "{{ .Values.service.api.ports.api.port }}"
              path: /routes
              httpHeaders:
                Accept: application/json
            readiness:
              port: "{{ .Values.service.api.ports.api.port }}"
              path: /routes
              httpHeaders:
                Accept: application/json
            startup:
              port: "{{ .Values.service.api.ports.api.port }}"
              path: /routes
              httpHeaders:
                Accept: application/json
          env:
            API_BINDING: ":{{ .Values.service.api.ports.api.port }}"
            PORT: "{{ .Values.service.main.ports.main.port }}"
            # enabled for auto discovery to work
            IN_KUBE_CLUSTER: true
            # leave blank for all namespaces
            # KUBE_NAMESPACE: ""
            DEFAULT: "{{ .Values.mcrouter.default }}"
            MAPPING: '{{ join "," .Values.mcrouter.mappings }}'

rbac:
  main:
    enabled: true
    primary: true
    clusterWide: true
    rules:
      - apiGroups: [""]
        resources:
          - "services"
        verbs:
          - "list"
          - "watch"

serviceAccount:
  main:
    enabled: true
    primary: true

podOptions:
  automountServiceAccountToken: true
