From 56b43f5744b4d2bda0b72af98220ff77506bb075 Mon Sep 17 00:00:00 2001 From: Tony Du Date: Sun, 16 Feb 2025 21:43:37 -0800 Subject: [PATCH] feat: Add uptime kuma redirect --- k8s/apps/cloudflared/cloudflared-tonydu.yaml | 6 ++++++ .../{blog-tonydu.yaml => blog-tonydu-me.yaml} | 2 +- .../ingressroutes/internal/kustomization.yaml | 3 ++- .../ingressroutes/internal/up-mnke-org.yaml | 4 ++-- .../ingressroutes/internal/up-tonydu-me.yaml | 21 +++++++++++++++++++ 5 files changed, 32 insertions(+), 4 deletions(-) rename k8s/apps/ingressroutes/internal/{blog-tonydu.yaml => blog-tonydu-me.yaml} (94%) create mode 100644 k8s/apps/ingressroutes/internal/up-tonydu-me.yaml diff --git a/k8s/apps/cloudflared/cloudflared-tonydu.yaml b/k8s/apps/cloudflared/cloudflared-tonydu.yaml index 0c7f863..a8982d8 100644 --- a/k8s/apps/cloudflared/cloudflared-tonydu.yaml +++ b/k8s/apps/cloudflared/cloudflared-tonydu.yaml @@ -84,5 +84,11 @@ data: noTLSVerify: true http2Origin: true httpHostHeader: wizarr.tonydu.me + - hostname: up.tonydu.me + service: https://traefik.traefik.svc.cluster.local + originRequest: + noTLSVerify: true + http2Origin: true + httpHostHeader: up.tonydu.me # This rule matches any traffic which didn't match a previous rule, and responds with HTTP 404. - service: http_status:404 diff --git a/k8s/apps/ingressroutes/internal/blog-tonydu.yaml b/k8s/apps/ingressroutes/internal/blog-tonydu-me.yaml similarity index 94% rename from k8s/apps/ingressroutes/internal/blog-tonydu.yaml rename to k8s/apps/ingressroutes/internal/blog-tonydu-me.yaml index bcda2bf..983bb6f 100644 --- a/k8s/apps/ingressroutes/internal/blog-tonydu.yaml +++ b/k8s/apps/ingressroutes/internal/blog-tonydu-me.yaml @@ -2,7 +2,7 @@ apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: - name: blog-tonydu + name: blog-tonydu-me namespace: default spec: entryPoints: diff --git a/k8s/apps/ingressroutes/internal/kustomization.yaml b/k8s/apps/ingressroutes/internal/kustomization.yaml index a178189..ef30234 100644 --- a/k8s/apps/ingressroutes/internal/kustomization.yaml +++ b/k8s/apps/ingressroutes/internal/kustomization.yaml @@ -2,5 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - blog-tonydu.yaml + - blog-tonydu-me.yaml + - up-tonydu-me.yaml - up-mnke-org.yaml diff --git a/k8s/apps/ingressroutes/internal/up-mnke-org.yaml b/k8s/apps/ingressroutes/internal/up-mnke-org.yaml index 6b9e7a3..dc2107b 100644 --- a/k8s/apps/ingressroutes/internal/up-mnke-org.yaml +++ b/k8s/apps/ingressroutes/internal/up-mnke-org.yaml @@ -2,7 +2,7 @@ apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: - name: up-mnke-org + name: up-tonydu-me namespace: default spec: entryPoints: @@ -27,4 +27,4 @@ spec: name: uptime-kuma port: http tls: - secretName: wildcard-mnke-org-tls + secretName: wildcard-tonydu-me-tls diff --git a/k8s/apps/ingressroutes/internal/up-tonydu-me.yaml b/k8s/apps/ingressroutes/internal/up-tonydu-me.yaml new file mode 100644 index 0000000..55bf0a2 --- /dev/null +++ b/k8s/apps/ingressroutes/internal/up-tonydu-me.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: up-mnke-org + namespace: default +spec: + entryPoints: + - websecure + routes: + - match: Host(`up.tonydu.me`) + kind: Rule + middlewares: + - name: redirect-tonydu-me-mnke-org + namespace: default + services: + - kind: Service + name: uptime-kuma + port: http + tls: + secretName: wildcard-tonydu-me-tls