charts/charts/mautrix-facebook/templates/statefulset.yaml
Alex Manning 544d1ada5a
All checks were successful
ci/woodpecker/push/mautrix-facebook Pipeline was successful
Make a statefulset and add liveness probes.
2023-09-13 20:56:31 +01:00

86 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "mautrix-facebook.fullname" . }}
labels:
{{- include "mautrix-facebook.labels" . | nindent 4 }}
spec:
serviceName: {{ include "mautrix-facebook.fullname" . }}-appservice-nocollide
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
replicas: 1
selector:
matchLabels:
{{- include "mautrix-facebook.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "mautrix-facebook.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: appservice
containerPort: 29319
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: mainconfig
readOnly: true
mountPath: "/data"
command:
- python3
- -m
- mautrix_facebook
- -c
- /data/config.yaml
- --no-update
startupProbe:
httpGet:
port: appservice
path: "/_matrix/mau/live"
periodSeconds: 10
failureThreshold: 60
livenessProbe:
httpGet:
port: appservice
path: "/_matrix/mau/live"
periodSeconds: 10
failureThreshold: 12
readinessProbe:
httpGet:
port: appservice
path: "/_matrix/mau/ready"
periodSeconds: 10
failureThreshold: 12
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: mainconfig
secret:
secretName: {{ include "mautrix-facebook.fullname" . }}