ldc-supportweb/production-resources.yaml
2026-04-24 16:53:58 +02:00

56 lines
1.3 KiB
YAML

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: $APP_DOMAIN
spec:
dnsNames:
- $APP_DOMAIN
secretName: $APP_DOMAIN
issuerRef:
name: $APP_CERT_ISSUER
kind: ClusterIssuer
---
# Redirect with domain replacement
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: redirect-multi-to-ldcfr
spec:
redirectRegex:
regex: ^https://(.*)(corico|volaillesdeblancafort).fr(.*)
replacement: https://${REDIRECT}${APP_DOMAIN}
permanent: true
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: redirect-multi-to-ldcfr
spec:
entryPoints:
- websecure
routes:
- match: (Host(`corico.fr`) || Host(`www.corico.fr`) || Host(`volaillesdeblancafort.fr`) || Host(`www.volaillesdeblancafort.fr`)) && !PathPrefix(`/.well-known/acme-challenge/`)
kind: Rule
services:
- name: api@internal
kind: TraefikService
middlewares:
- name: redirect-multi-to-ldcfr
tls:
secretName: redirect-multi-to-ldcfr
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: redirect-multi-to-ldcfr
spec:
dnsNames:
- corico.fr
- www.corico.fr
- volaillesdeblancafort.fr
- www.volaillesdeblancafort.fr
secretName: redirect-multi-to-ldcfr
issuerRef:
name: $APP_CERT_ISSUER
kind: ClusterIssuer