From 7363b76d54d6e567c89b79bd8872e4f8ac98eb7d Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Sun, 13 Oct 2024 17:16:59 +0200 Subject: [PATCH] change ingressroutes --- ip-mziesel-nl/base/ip-mziesel-nl-ingress.yaml | 32 +++++-------------- whoami/base/whoami-svc.yaml | 27 ---------------- 2 files changed, 8 insertions(+), 51 deletions(-) diff --git a/ip-mziesel-nl/base/ip-mziesel-nl-ingress.yaml b/ip-mziesel-nl/base/ip-mziesel-nl-ingress.yaml index 31123af..324e822 100644 --- a/ip-mziesel-nl/base/ip-mziesel-nl-ingress.yaml +++ b/ip-mziesel-nl/base/ip-mziesel-nl-ingress.yaml @@ -1,27 +1,11 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: ip-mzisel-nl-ingress - annotations: - traefik.ingress.kubernetes.io/middlewares: default-strip-ip-prefix@kubernetescrd -spec: - rules: - - http: - paths: - - path: /ip - pathType: Prefix - backend: - service: - name: ip-mziesel-nl - port: - name: web ---- apiVersion: traefik.io/v1alpha1 -kind: Middleware +kind: IngressRoute metadata: - name: strip-ip-prefix + name: ip-mziesel-nl-ingressroute spec: - stripPrefix: - prefixes: - - "/ip" - forceSlash: false + routes: + - match: Host(`ip.mziesel.nl`) || Host(`ip4.mziesel.nl`) || Host(`ip6.mziesel.nl`) + kind: Rule + services: + - name: ip-mziesel-nl + port: web diff --git a/whoami/base/whoami-svc.yaml b/whoami/base/whoami-svc.yaml index 43ef7b2..5a00c25 100644 --- a/whoami/base/whoami-svc.yaml +++ b/whoami/base/whoami-svc.yaml @@ -9,30 +9,3 @@ spec: targetPort: web selector: app: whoami ---- -apiVersion: v1 -kind: Service -metadata: - name: whoami-traefik - namespace: whoami -spec: - ports: - - name: web - port: 80 - targetPort: 80 - selector: - app: whoami ---- -apiVersion: v1 -kind: Service -metadata: - name: whoami-np - namespace: whoami -spec: - type: NodePort - ports: - - nodePort: 30007 - port: 80 - targetPort: 80 - selector: - app: whoami