apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-gateway
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    kubernetes.io/ingress.class: "nginx"
    # nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
  # annotations:
  #   nginx.com/jwt-key: "ss-jwk"
  #   nginx.com/jwt-realm: "Sigma Suite"
  #   nginx.com/jwt-token: "$cookie_auth_token"
  #   nginx.com/jwt-login-url: "https://login.example.com"
spec:
  # tls:
  # - hosts: 
  #   - kubernetes.docker.internal
  rules:
  - host: kubernetes.docker.internal
    http:
      paths:
      - path: "/soe(/|$)(.*)"
        pathType: Prefix
        backend:
          service:
            name: front-soe-composite
            port: 
              number: 80
      - path: "/api/auth(/|$)(.*)"
        pathType: Prefix
        backend:
          service:
            name: authentication-service
            port:
              number: 80
      - path: "/module/site-map(/|$)(.*)"
        pathType: Prefix
        backend:
          service:
            name: front-soe-site-map
            port:
              number: 80
      - path: "/module/login(/|$)(.*)"
        pathType: Prefix
        backend:
          service:
            name: front-soe-login
            port:
              number: 80
      - path: "/module/auth(/|$)(.*)"
        pathType: Prefix
        backend:
          service:
            name: front-soe-auth
            port:
              number: 80