feat: HTTP 自动跳转 HTTPS — Traefik Middleware + Ingress annotation
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
zyc 2026-04-13 11:17:02 +08:00
parent 5972f45784
commit ab1b00f94a
2 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@ metadata:
annotations: annotations:
kubernetes.io/ingress.class: "traefik" kubernetes.io/ingress.class: "traefik"
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
traefik.ingress.kubernetes.io/router.middlewares: "default-redirect-https@kubernetescrd"
spec: spec:
tls: tls:
- hosts: - hosts:

View File

@ -0,0 +1,8 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: redirect-https
spec:
redirectScheme:
scheme: https
permanent: true