production: true

dataManager:
  name: data-manager
  replicas: 1
  image:
    name: "PLACEHOLDER"
    pullPolicy: &PULL_POLICY Always
  service:
    name: &service_data_manager htwkalender-data-manager
    port: &service_data_manager_port 8090
    targetPort: 8090
    protobufPort: 50051
    protobufTargetPort: 50051
ical:
  name: ical
  replicas: 2
  image:
    name: "PLACEHOLDER"
    pullPolicy: *PULL_POLICY
  service:
    name: &service_ical htwkalender-ical
    port: &service_ical_port 8091
    targetPort: 8091
    protobufPort: 50051
    protobufTargetPort: 50051
frontend:
  name: frontend
  host: &frontend_host "FRONTEND_URL"
  googleSiteVerification: "PLACEHOLDER"
  htmlRootPath: "/opt/bitnami/nginx/html"
  replicas: 1
  image:
    name: "PLACEHOLDER"
    pullPolicy: *PULL_POLICY
  service:
    name: &service_frontend htwkalender-frontend
    port: &service_frontend_port 8000
    targetPort: 8000

persistence:
  enabled: true
  accessModes:
    - ReadWriteOnce
  storageClassName: "proxmox-csi"
  size: 19Gi

# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
livenessProbe:
  httpGet:
    path: /
    port: http
readinessProbe:
  httpGet:
    path: /
    port: http

middlewares:
  httpsIPWhitelist:
    name: ipwhitelist-fsrim-subnet

ingress:
  https:
    annotations:
      traefik.ingress.kubernetes.io/router.middlewares: ""
    hosts:
      - host: *frontend_host
        http:
          paths:
            - path: /api/feed
              pathType: Prefix
              backend:
                service:
                  name: *service_ical
                  port:
                    number: *service_ical_port
  httpsIPWhitelist:
    hosts:
      - host: *frontend_host
        http:
          paths:
            - path: /_
              pathType: ImplementationSpecific
              backend:
                service:
                  name: *service_data_manager
                  port:
                    number: *service_data_manager_port
  httpsRedirect:
    hosts:
      - host: *frontend_host
        http:
          paths:
            - path: /
              pathType: ImplementationSpecific
              backend:
                service:
                  name: *service_frontend
                  port:
                    number: *service_frontend_port
            - path: /api
              pathType: ImplementationSpecific
              backend:
                service:
                  name: *service_data_manager
                  port:
                    number: *service_data_manager_port
            - path: /api/modules
              pathType: ImplementationSpecific
              backend:
                service:
                  name: *service_data_manager
                  port:
                    number: *service_data_manager_port
            - path: /api/events/types
              pathType: ImplementationSpecific
              backend:
                service:
                  name: *service_data_manager
                  port:
                    number: *service_data_manager_port
            - path: /api/rooms
              pathType: ImplementationSpecific
              backend:
                service:
                  name: *service_data_manager
                  port:
                    number: *service_data_manager_port
            - path: /api/schedule
              pathType: ImplementationSpecific
              backend:
                service:
                  name: *service_data_manager
                  port:
                    number: *service_data_manager_port
            - path: /api/courses
              pathType: ImplementationSpecific
              backend:
                service:
                  name: *service_data_manager
                  port:
                    number: *service_data_manager_port
