apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: edge-proxy
  namespace: application
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: "/$1"
spec:
  tls:
    - hosts:
        - tacticstrainer.io
      secretName: tacticstrainer-io-certificate
  rules:
    - host: tacticstrainer.io
      http:
        paths:
          - path: /(.*)
            pathType: Prefix
            backend:
              service:
                name: webapp
                port:
                  number: 8080
          - path: /api/iam-server/(.*)
            pathType: Prefix
            backend:
              service:
                name: iam-server
                port:
                  number: 8080
          - path: /api/puzzle-server/(.*)
            pathType: Prefix
            backend:
              service:
                name: puzzle-server
                port:
                  number: 8080
          - path: /api/httplogger/(.*)
            pathType: Prefix
            backend:
              service:
                name: httplogger
                port:
                  number: 8080
