ldc-regalette/production-resources.yaml
2025-07-02 10:15:29 +02:00

55 lines
1.1 KiB
YAML

---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: $APP_DOMAIN
spec:
dnsNames:
- $APP_DOMAIN
- www.${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-regalettefr-to-regalettebzh
spec:
redirectRegex:
regex: ^https://(.*)regalette.fr(.*)
replacement: https://${REDIRECT}${APP_DOMAIN}
permanent: true
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: redirect-regalettefr-to-regalettebzh
spec:
entryPoints:
- websecure
routes:
- match: Host(`regalette.fr`) || Host(`www.regalette.fr`)
kind: Rule
services:
- name: api@internal
kind: TraefikService
middlewares:
- name: redirect-regalettefr-to-regalettebzh
tls:
secretName: regalette.fr
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: regalette.fr
spec:
dnsNames:
- regalette.fr
- www.regalette.fr
secretName: regalette.fr
issuerRef:
name: $APP_CERT_ISSUER
kind: ClusterIssuer