145 lines
3.1 KiB
YAML
145 lines
3.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-wenndannmitrespekt-to-nature-and-respect
|
|
spec:
|
|
redirectRegex:
|
|
regex: ^https://wenndannmitrespekt.de/
|
|
replacement: https://www.${APP_DOMAIN}/de
|
|
permanent: true
|
|
|
|
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: redirect-wenndannmitrespekt-to-nature-and-respect
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- match: Host(`wenndannmitrespekt.de`)
|
|
kind: Rule
|
|
services:
|
|
- name: api@internal
|
|
kind: TraefikService
|
|
middlewares:
|
|
- name: redirect-wenndannmitrespekt-to-nature-and-respect
|
|
tls:
|
|
secretName: wenndannmitrespekt.de
|
|
|
|
---
|
|
apiVersion: cert-manager.io/v1
|
|
kind: Certificate
|
|
metadata:
|
|
name: wenndannmitrespekt.de
|
|
spec:
|
|
dnsNames:
|
|
- wenndannmitrespekt.de
|
|
secretName: wenndannmitrespekt.de
|
|
issuerRef:
|
|
name: $APP_CERT_ISSUER
|
|
kind: ClusterIssuer
|
|
|
|
---
|
|
# Redirect with domain replacement
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: redirect-natureandrespectde-to-nature-and-respect
|
|
spec:
|
|
redirectRegex:
|
|
regex: ^https://nature-and-respect.de/
|
|
replacement: https://www.${APP_DOMAIN}/de
|
|
permanent: true
|
|
|
|
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: redirect-natureandrespectde-to-nature-and-respect
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- match: Host(`nature-and-respect.de`)
|
|
kind: Rule
|
|
services:
|
|
- name: api@internal
|
|
kind: TraefikService
|
|
middlewares:
|
|
- name: redirect-natureandrespectde-to-nature-and-respect
|
|
tls:
|
|
secretName: nature-and-respect.de
|
|
|
|
---
|
|
apiVersion: cert-manager.io/v1
|
|
kind: Certificate
|
|
metadata:
|
|
name: nature-and-respect.de
|
|
spec:
|
|
dnsNames:
|
|
- nature-and-respect.de
|
|
secretName: nature-and-respect.de
|
|
issuerRef:
|
|
name: $APP_CERT_ISSUER
|
|
kind: ClusterIssuer
|
|
|
|
---
|
|
# Redirect with domain replacement
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: redirect-wwwnatureandrespectde-to-nature-and-respect
|
|
spec:
|
|
redirectRegex:
|
|
regex: ^https://www.nature-and-respect.de/
|
|
replacement: https://www.${APP_DOMAIN}/de
|
|
permanent: true
|
|
|
|
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: redirect-wwwnatureandrespectde-to-nature-and-respect
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- match: Host(`www.nature-and-respect.de`)
|
|
kind: Rule
|
|
services:
|
|
- name: api@internal
|
|
kind: TraefikService
|
|
middlewares:
|
|
- name: redirect-wwwnatureandrespectde-to-nature-and-respect
|
|
tls:
|
|
secretName: www.nature-and-respect.de
|
|
|
|
---
|
|
apiVersion: cert-manager.io/v1
|
|
kind: Certificate
|
|
metadata:
|
|
name: www.nature-and-respect.de
|
|
spec:
|
|
dnsNames:
|
|
- www.nature-and-respect.de
|
|
secretName: www.nature-and-respect.de
|
|
issuerRef:
|
|
name: $APP_CERT_ISSUER
|
|
kind: ClusterIssuer
|