apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: gameon-ingress
  namespace: gameon-system
  annotations: {}

spec:
  defaultBackend:
    service:
      name: webapp
      port:
        number: 8080
# TLS block causes automatic redirection of http -> https
  tls:
  - hosts:
    - GAMEON_DUMMY_INGRESS
    - GAMEON_INGRESS
    secretName: GAMEON_INGRESS_SECRET
  rules:
  - host: GAMEON_INGRESS
    http:
      paths:
      - path: /auth
        pathType: Prefix
        backend:
          service:
            name: auth
            port:
              number: 9080
      - path: /map
        pathType: Prefix
        backend:
          service:
            name: map
            port:
              number: 9080
      - path: /mediator
        pathType: Prefix
        backend:
          service:
            name: mediator
            port:
              number: 9080
      - path: /players
        pathType: Prefix
        backend:
          service:
            name: player
            port:
              number: 9080
      - path: /rooms
        pathType: Prefix
        backend:
          service:
            name: room
            port:
              number: 9080
      - path: /swagger
        pathType: Prefix
        backend:
          service:
            name: swagger
            port:
              number: 8080
  - host: GAMEON_DUMMY_INGRESS
    http:
      paths:
      - path: /auth
        pathType: Prefix
        backend:
          service:
            name: auth
            port:
              number: 9080
