32 lines
733 B
YAML
32 lines
733 B
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: mongo
|
|
labels:
|
|
app: mongo
|
|
spec:
|
|
serviceName: "mongo"
|
|
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 }}
|