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