2025-06-29 15:34:50 +02:00
|
|
|
apiVersion: apps/v1
|
2025-09-30 11:28:22 +07:00
|
|
|
kind: StatefulSet
|
2025-06-29 15:34:50 +02:00
|
|
|
metadata:
|
2025-09-30 11:28:22 +07:00
|
|
|
name: checkmate-mongodb
|
2025-06-29 15:34:50 +02:00
|
|
|
spec:
|
|
|
|
|
replicas: 1
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
2025-09-30 11:28:22 +07:00
|
|
|
app: checkmate-mongodb
|
2025-06-29 15:34:50 +02:00
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
2025-09-30 11:28:22 +07:00
|
|
|
app: checkmate-mongodb
|
2025-06-29 15:34:50 +02:00
|
|
|
spec:
|
2025-10-05 22:36:39 +07:00
|
|
|
{{- with .Values.mongodb.affinity }}
|
|
|
|
|
affinity:
|
|
|
|
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.mongodb.tolerations }}
|
|
|
|
|
tolerations:
|
|
|
|
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
|
|
|
{{- end }}
|
2025-06-29 15:34:50 +02:00
|
|
|
containers:
|
|
|
|
|
- name: mongodb
|
2026-07-02 09:44:37 -07:00
|
|
|
image: {{ include "checkmate.image" (dict "image" .Values.mongodb.image "tag" .Values.mongodb.tag "root" $) }}
|
2026-06-30 09:08:01 -07:00
|
|
|
imagePullPolicy: {{ .Values.mongodb.imagePullPolicy }}
|
2025-06-29 15:34:50 +02:00
|
|
|
ports:
|
|
|
|
|
- containerPort: {{ .Values.mongodb.port }}
|
|
|
|
|
command: ["mongod", "--quiet", "--bind_ip_all"]
|
|
|
|
|
volumeMounts:
|
2025-09-30 11:35:14 +07:00
|
|
|
- name: checkmate-mongo-persistent-storage
|
2025-06-29 15:34:50 +02:00
|
|
|
mountPath: /data/db
|
2025-10-05 22:36:39 +07:00
|
|
|
{{- with .Values.mongodb.resources }}
|
|
|
|
|
resources:
|
|
|
|
|
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
|
|
|
|
{{- end }}
|
2025-09-30 11:28:22 +07:00
|
|
|
volumeClaimTemplates:
|
|
|
|
|
- metadata:
|
|
|
|
|
name: checkmate-mongo-persistent-storage
|
|
|
|
|
spec:
|
2026-06-30 09:08:01 -07:00
|
|
|
{{- with .Values.persistence.mongo.storageClass }}
|
|
|
|
|
storageClassName: {{ . | quote }} {{/* omitted when empty so the cluster's default StorageClass applies */}}
|
|
|
|
|
{{- end }}
|
2025-09-30 11:28:22 +07:00
|
|
|
accessModes: ["ReadWriteOnce"]
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
2025-11-03 01:10:45 +01:00
|
|
|
storage: {{ .Values.persistence.mongo.size | default "5Gi" | quote }}
|