Skip to content

Commit

Permalink
fix: use pvc with stateful sets
Browse files Browse the repository at this point in the history
  • Loading branch information
jvmakine committed Feb 10, 2025
1 parent 6a3450a commit 6af236b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
16 changes: 14 additions & 2 deletions charts/ftl/templates/schema-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ spec:
- secretRef:
name: {{ include "ftl.fullname" . }}-secrets
{{- end }}
volumeMounts:
- name: schema-raft-storage
mountPath: /data/raft
env:
{{- if .Values.schema.env }}
{{- toYaml .Values.schema.env | nindent 12 }}
Expand All @@ -58,7 +61,7 @@ spec:
- name: RAFT_INITIAL_REPLICA_IDS
value: "{{- range $index := until (.Values.schema.replicas | int ) }}{{- if ne $index 0 -}},{{- end -}}{{ add $index 1 }}{{- end -}}"
- name: RAFT_DATA_DIR
value: "/tmp/ftl-schema"
value: "/data/raft"
- name: ORDINAL_NUMBER
valueFrom:
fieldRef:
Expand Down Expand Up @@ -104,4 +107,13 @@ spec:
{{- if .Values.schema.tolerations }}
tolerations:
{{- toYaml .Values.schema.tolerations | nindent 8 }}
{{- end }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: schema-raft-storage # This name will be used as a PVC name
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.schema.storage }}
1 change: 1 addition & 0 deletions charts/ftl/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ timeline:
schema:
enabled: true
replicas: 3
storage: 50Mi
env:
- name: MY_POD_IP
valueFrom:
Expand Down

0 comments on commit 6af236b

Please sign in to comment.