38 lines
703 B
YAML
38 lines
703 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
|
|
args:
|
|
- --data-dir=/data
|
|
env:
|
|
- name: ETCD_INITIAL_CLUSTER_STATE
|
|
value: new
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: data
|
|
spec:
|
|
storageClass: local
|
|
accessModes: ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
{{- end }}
|