synapse/manifests/prod/delegation.yaml
2024-05-01 14:34:00 +02:00

92 lines
1.8 KiB
YAML

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: delegation
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: nginx
tls:
- secretName: tls-delegation
hosts:
- gmoker.com
rules:
- host: gmoker.com
http:
paths:
- path: /.well-known/matrix/server
pathType: Exact
backend:
service:
name: app
port:
name: http
- path: /.well-known/matrix/client
pathType: Exact
backend:
service:
name: delegation
port:
name: http
---
apiVersion: v1
kind: Service
metadata:
name: delegation
labels:
app: delegation
spec:
selector:
app: delegation
ports:
- name: http
port: 80
targetPort: http
---
apiVersion: v1
kind: ConfigMap
metadata:
name: delegation
data:
default.conf: |
server {
listen 80;
location /.well-known/matrix/client {
default_type application/json;
return 200 '{"m.homeserver": { "base_url": "https://$BASE_URL" }}';
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: delegation
labels:
app: delegation
spec:
replicas: $NB_REPLICAS
selector:
matchLabels:
app: delegation
template:
metadata:
labels:
app: delegation
spec:
containers:
- name: app
image: docker.io/nginx:latest
ports:
- name: http
containerPort: 80
volumeMounts:
- name: delegation
mountPath: /etc/nginx/conf.d/
readOnly: true
volumes:
- name: delegation
configMap:
name: delegation