Skip to content

Commit 0eae821

Browse files
Merge pull request #354 from kaleido-io/helm-dx-blobstorage
[helm] Adding Storage for DX Blobs and PVC Templating Improvements
2 parents 24d075b + 26b9b48 commit 0eae821

File tree

2 files changed

+51
-8
lines changed

2 files changed

+51
-8
lines changed

deploy/charts/firefly/templates/dataexchange/statefulset.yaml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ spec:
6767
{{- toYaml .Values.dataexchange.resources | nindent 12 }}
6868
volumeMounts:
6969
- mountPath: /data/peer-certs
70-
name: {{ include "firefly.fullname" . }}-dx-peer-certs
70+
subPath: peer-certs
71+
name: {{ include "firefly.fullname" . }}-dx-peers
7172
- mountPath: /data/peers
73+
subPath: peers
7274
name: {{ include "firefly.fullname" . }}-dx-peers
7375
- mountPath: /data/config.json
7476
name: config
@@ -82,6 +84,11 @@ spec:
8284
- mountPath: /data/ca.pem
8385
name: tls
8486
subPath: ca.crt
87+
- mountPath: /data/blobs
88+
{{- if and .Values.dataexchange.persistentVolumes.blobs.enabled .Values.dataexchange.persistentVolumes.blobs.subPath }}
89+
subPath: {{ .Values.dataexchange.persistentVolumes.blobs.subPath | quote }}
90+
{{- end }}
91+
name: {{ include "firefly.fullname" . }}-dx-blobs
8592
{{- with .Values.dataexchange.nodeSelector }}
8693
nodeSelector:
8794
{{- toYaml . | nindent 8 }}
@@ -101,21 +108,41 @@ spec:
101108
- name: tls
102109
secret:
103110
secretName: {{ if and .Values.dataexchange.certificate.enabled (not .Values.dataexchange.tlsSecret.enabled) }}"{{ include "firefly.fullname" . }}-dx-tls"{{ else }}{{ .Values.dataexchange.tlsSecret.name }}{{ end }}
111+
{{- if not .Values.dataexchange.persistentVolumes.blobs.enabled }}
112+
- name: {{ include "firefly.fullname" . }}-dx-blobs
113+
emptyDir: {}
114+
{{- end }}
115+
{{- if or .Values.dataexchange.persistentVolumes.blobs.enabled .Values.dataexchange.persistentVolumes.peers.enabled }}
104116
volumeClaimTemplates:
105117
- metadata:
106-
name: {{ include "firefly.fullname" . }}-dx-peer-certs
118+
name: {{ include "firefly.fullname" . }}-dx-blobs
119+
{{- with .Values.dataexchange.persistentVolumes.blobs }}
120+
{{- with .annotations }}
121+
annotations:
122+
{{- toYaml . | nindent 10 }}
123+
{{- end }}
107124
spec:
108125
accessModes:
109-
- ReadWriteOnce
126+
{{- toYaml .accessModes | nindent 10 }}
127+
storageClassName: {{ .storageClass }}
110128
resources:
111129
requests:
112-
storage: 1Gi
130+
storage: {{ .size }}
131+
{{- end }}
132+
{{- end }}
113133
- metadata:
114134
name: {{ include "firefly.fullname" . }}-dx-peers
135+
{{- with .Values.dataexchange.persistentVolumes.peers }}
136+
{{- with .annotations }}
137+
annotations:
138+
{{- toYaml . | nindent 10 }}
139+
{{- end }}
115140
spec:
116141
accessModes:
117-
- ReadWriteOnce
142+
{{- toYaml .accessModes | nindent 10 }}
143+
storageClassName: {{ .storageClass }}
118144
resources:
119145
requests:
120-
storage: 1Gi
146+
storage: {{ .size }}
147+
{{- end }}
121148
{{- end }}

deploy/charts/firefly/values.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ dataexchange:
189189
image:
190190
repository: ghcr.io/hyperledger/firefly-dataexchange-https
191191
pullPolicy: Always
192-
# Overrides the image tag whose default is the chart appVersion.
193-
tag: v0.9.2
192+
tag: v0.9.3
194193

195194
imagePullSecrets: []
196195
nameOverride: ""
@@ -243,3 +242,20 @@ dataexchange:
243242
tolerations: []
244243

245244
affinity: {}
245+
246+
persistentVolumes:
247+
# split into two mounts: /data/peers and /data/peer-certs
248+
peers:
249+
accessModes:
250+
- ReadWriteOnce
251+
annotations: {}
252+
size: 1Gi
253+
storageClass: ""
254+
blobs:
255+
enabled: true
256+
accessModes:
257+
- ReadWriteOnce
258+
annotations: {}
259+
subPath: ""
260+
size: 2Gi
261+
storageClass: ""

0 commit comments

Comments
 (0)