netflux-kubernetes/deploy/base/statefulset-synapse.yaml

94 lines
2.2 KiB
YAML
Raw Normal View History

2022-06-04 01:07:12 +00:00
apiVersion: apps/v1
2022-06-05 10:30:09 +00:00
kind: StatefulSet
2022-06-04 01:07:12 +00:00
metadata:
name: synapse
labels:
app: synapse
component: web
app.kubernetes.io/name: synapse
app.kubernetes.io/instance: synapse
spec:
2022-06-05 10:30:09 +00:00
serviceName: synapse
2022-06-04 01:07:12 +00:00
selector:
matchLabels:
app: synapse
component: web
template:
metadata:
labels:
app: synapse
component: web
app.kubernetes.io/name: synapse
app.kubernetes.io/instance: synapse
2022-06-05 16:04:54 +00:00
annotations:
prometheus.io/port: "9000"
prometheus.io/scrape: "true"
prometheus.io/path: /_synapse/metrics
2022-06-04 01:07:12 +00:00
spec:
securityContext:
fsGroup: 991
runAsUser: 991
runAsGroup: 991
containers:
- image: matrixdotorg/synapse:latest
imagePullPolicy: IfNotPresent
name: synapse
ports:
- name: http
protocol: TCP
containerPort: 8008
env:
- name: SYNAPSE_CONFIG_DIR
value: /config
volumeMounts:
- mountPath: /tmp
name: tmp
- mountPath: /data
name: data
- mountPath: /config/homeserver.yaml
subPath: homeserver.yaml
name: config
- mountPath: /config/signing.key
subPath: signing.key
name: config
- mountPath: /config/log.config
subPath: log.config
name: config
2022-11-08 07:23:05 +00:00
# TODO: validate resource limits
# resources:
# requests:
# memory: "128Mi"
# cpu: "500m"
# limits:
# memory: "512Mi"
# cpu: "1000m"
2022-06-04 01:07:12 +00:00
livenessProbe:
httpGet:
path: /health
port: 8008
scheme: HTTP
failureThreshold: 5
2022-06-18 16:37:32 +00:00
initialDelaySeconds: 60
periodSeconds: 20
2022-06-04 01:07:12 +00:00
successThreshold: 1
2022-06-18 16:37:32 +00:00
timeoutSeconds: 5
2022-06-04 01:07:12 +00:00
volumes:
- name: tmp
emptyDir: {}
- name: data
persistentVolumeClaim:
claimName: synapse-data
- name: config
secret:
secretName: synapse-config
defaultMode: 0600
2022-06-05 10:30:09 +00:00
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi