From 6b635b6dc7678f9b4266ba95c3f991d4c9bb1f9d Mon Sep 17 00:00:00 2001 From: Song Meo Date: Fri, 4 Nov 2022 11:39:36 +0200 Subject: [PATCH] proxmox: first attempt to move to ingressroute --- traefik/proxmox.yml | 123 +++++++++++--------------------------------- 1 file changed, 31 insertions(+), 92 deletions(-) diff --git a/traefik/proxmox.yml b/traefik/proxmox.yml index 28a6ba2..ce2e3dd 100644 --- a/traefik/proxmox.yml +++ b/traefik/proxmox.yml @@ -1,3 +1,34 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: proxmox +spec: + entryPoints: + - https + routes: + - kind: Rule + match: Host(`pve.k-space.ee`) + priority: 10 + middlewares: + - name: proxmox-redirect + - name: traefik-sso@kubernetescrd + - name: traefik-proxmox-redirect@kubernetescrd + services: + - kind: Service + name: pve1 + passHostHeader: true + port: 8006 + responseForwarding: + flushInterval: 1ms + scheme: https + serversTransport: proxmox-servers-transport + tls: + secretName: pve + domains: + - main: pve.k-space.ee + sans: + - "*.k-space.ee" + apiVersion: traefik.containo.us/v1alpha1 kind: ServersTransport metadata: @@ -56,98 +87,6 @@ data: RWRmRHIzNTBpZkRCQkVuL3RvL3JUczFOVjhyOGpjcG14a2MzNjlSQXp3TmJiRVkKMVE9PQotLS0t LUVORCBDRVJUSUZJQ0FURS0tLS0tCg== --- -apiVersion: v1 -kind: Service -metadata: - name: pve1 - annotations: - traefik.ingress.kubernetes.io/service.serverstransport: traefik-proxmox-servers-transport@kubernetescrd -spec: - type: ExternalName - externalName: pve1.proxmox.infra.k-space.ee - ports: - - name: https - port: 8006 - protocol: TCP ---- -apiVersion: v1 -kind: Service -metadata: - name: pve8 - annotations: - traefik.ingress.kubernetes.io/service.serverstransport: traefik-proxmox-servers-transport@kubernetescrd -spec: - type: ExternalName - externalName: pve8.proxmox.infra.k-space.ee - ports: - - name: https - port: 8006 - protocol: TCP ---- -apiVersion: v1 -kind: Service -metadata: - name: pve9 - annotations: - traefik.ingress.kubernetes.io/service.serverstransport: traefik-proxmox-servers-transport@kubernetescrd -spec: - type: ExternalName - externalName: pve9.proxmox.infra.k-space.ee - ports: - - name: https - port: 8006 - protocol: TCP ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: pve - annotations: - kubernetes.io/ingress.class: traefik - external-dns.alpha.kubernetes.io/target: traefik.k-space.ee - traefik.ingress.kubernetes.io/router.entrypoints: websecure - traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd,traefik-proxmox-redirect@kubernetescrd - traefik.ingress.kubernetes.io/router.tls: "true" -spec: - rules: - - host: proxmox.k-space.ee - http: - paths: - - pathType: Prefix - path: / - backend: - service: - name: whoami - port: - number: 80 - - host: pve.k-space.ee - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: pve1 - port: - number: 8006 - - pathType: Prefix - path: "/" - backend: - service: - name: pve8 - port: - number: 8006 - - pathType: Prefix - path: "/" - backend: - service: - name: pve9 - port: - number: 8006 - tls: - - hosts: - - "*.k-space.ee" ---- apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: