---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: hemmelig-stripprefix
  namespace: kube-system
spec:
  stripPrefix:
    prefixes:
      - /
---
apiVersion: traefik.io/v1alpha1
kind: ServersTransport
metadata:
  name: hemmelig-transport
  namespace: kube-system
spec:
  insecureSkipVerify: true
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: hemmelig-external
  namespace: kube-system
spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`paste.innovation-hub-niedersachsen.de`)
      kind: Rule
      services:
        - name: hemmelig-external-service
          port: 3000
          scheme: http
          serversTransport: hemmelig-transport
      middlewares:
        - name: hemmelig-stripprefix
  tls:
    secretName: hemmelig-tls
---
apiVersion: v1
kind: Service
metadata:
  name: hemmelig-external-service
  namespace: kube-system
spec:
  type: ExternalName
  externalName: 192-168-4-106.nip.io
  ports:
    - port: 3000
      targetPort: 3000
