argo-app/templates/dbs.yaml
2023-09-27 22:13:33 +02:00

40 lines
733 B
YAML

{{- range until (.Values.nb_db|int) }}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: db-{{.}}
spec:
replicas: 1
selector:
matchLabels:
db: "{{.}}"
template:
metadata:
labels:
db: "{{.}}"
spec:
containers:
- name: db
image: quay.io/coreos/etcd:v3.5.9
command:
- etcd
- --data-dir=/data
env:
- name: ETCD_INITIAL_CLUSTER_STATE
value: new
volumeMounts:
- name: data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: data
spec:
storageClassName: local
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
{{- end }}