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

95 lines
2.2 KiB
YAML
Raw Permalink 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:
2023-10-08 17:40:14 +00:00
- image: matrixdotorg/synapse:latest
imagePullPolicy: Always
2022-06-04 01:07:12 +00:00
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
2023-09-10 18:44:15 +00:00
resources:
requests:
memory: 256Mi
cpu: 250m
limits:
2024-03-23 07:35:01 +00:00
memory: 768Mi
2023-09-10 18:44:15 +00:00
cpu: 2000m
securityContext:
readOnlyRootFilesystem: true
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