2024-08-30 16:13:10 +02:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: StatefulSet
|
|
|
|
metadata:
|
2024-09-07 01:37:07 +02:00
|
|
|
name: mongo
|
2024-08-30 16:13:10 +02:00
|
|
|
labels:
|
|
|
|
app: mongo
|
|
|
|
spec:
|
2024-09-07 01:37:07 +02:00
|
|
|
serviceName: "mongo"
|
2024-08-30 16:13:10 +02:00
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: mongo
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: mongo
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: mongo
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
|
|
ports:
|
|
|
|
- containerPort: 27017
|
|
|
|
volumeMounts:
|
|
|
|
- name: mongo-persistent-storage
|
|
|
|
mountPath: /data/db
|
|
|
|
- name: mongo-persistent-storage
|
|
|
|
mountPath: /data/configdb
|
|
|
|
volumes:
|
|
|
|
- name: mongo-persistent-storage
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ .Values.persistence.name }}
|