apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: iching-ingress
  namespace: argocd
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  ingressClassName: nginx
  rules:
    - host: 192-168-197-2.c-one-infra.de
      http:
        paths:
          # API → kein Rewrite
          - path: /iching/api(/|$)(.*)
            pathType: ImplementationSpecific
            backend:
              service:
                name: iching-service
                port:
                  number: 81

          # Frontend → mit Rewrite
          - path: /iching(/|$)(.*)
            pathType: ImplementationSpecific
            backend:
              service:
                name: iching-service
                port:
                  number: 80
  tls:
    - hosts:
        - 192-168-197-2.c-one-infra.de
      secretName: argocd-net-tls