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

93 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
resources:
requests:
memory: "128Mi"
2022-06-05 15:27:27 +00:00
cpu: "500m"
2022-06-04 01:07:12 +00:00
limits:
memory: "512Mi"
cpu: "500m"
livenessProbe:
httpGet:
path: /health
port: 8008
scheme: HTTP
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
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