diff --git a/deploy/charts/firefly/templates/dataexchange/statefulset.yaml b/deploy/charts/firefly/templates/dataexchange/statefulset.yaml index 89e3e3ae48..b7cd16d676 100644 --- a/deploy/charts/firefly/templates/dataexchange/statefulset.yaml +++ b/deploy/charts/firefly/templates/dataexchange/statefulset.yaml @@ -67,8 +67,10 @@ spec: {{- toYaml .Values.dataexchange.resources | nindent 12 }} volumeMounts: - mountPath: /data/peer-certs - name: {{ include "firefly.fullname" . }}-dx-peer-certs + subPath: peer-certs + name: {{ include "firefly.fullname" . }}-dx-peers - mountPath: /data/peers + subPath: peers name: {{ include "firefly.fullname" . }}-dx-peers - mountPath: /data/config.json name: config @@ -82,6 +84,11 @@ spec: - mountPath: /data/ca.pem name: tls subPath: ca.crt + - mountPath: /data/blobs + {{- if and .Values.dataexchange.persistentVolumes.blobs.enabled .Values.dataexchange.persistentVolumes.blobs.subPath }} + subPath: {{ .Values.dataexchange.persistentVolumes.blobs.subPath | quote }} + {{- end }} + name: {{ include "firefly.fullname" . }}-dx-blobs {{- with .Values.dataexchange.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -101,21 +108,41 @@ spec: - name: tls secret: secretName: {{ if and .Values.dataexchange.certificate.enabled (not .Values.dataexchange.tlsSecret.enabled) }}"{{ include "firefly.fullname" . }}-dx-tls"{{ else }}{{ .Values.dataexchange.tlsSecret.name }}{{ end }} + {{- if not .Values.dataexchange.persistentVolumes.blobs.enabled }} + - name: {{ include "firefly.fullname" . }}-dx-blobs + emptyDir: {} + {{- end }} + {{- if or .Values.dataexchange.persistentVolumes.blobs.enabled .Values.dataexchange.persistentVolumes.peers.enabled }} volumeClaimTemplates: - metadata: - name: {{ include "firefly.fullname" . }}-dx-peer-certs + name: {{ include "firefly.fullname" . }}-dx-blobs + {{- with .Values.dataexchange.persistentVolumes.blobs }} + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 10 }} + {{- end }} spec: accessModes: - - ReadWriteOnce + {{- toYaml .accessModes | nindent 10 }} + storageClassName: {{ .storageClass }} resources: requests: - storage: 1Gi + storage: {{ .size }} + {{- end }} + {{- end }} - metadata: name: {{ include "firefly.fullname" . }}-dx-peers + {{- with .Values.dataexchange.persistentVolumes.peers }} + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 10 }} + {{- end }} spec: accessModes: - - ReadWriteOnce + {{- toYaml .accessModes | nindent 10 }} + storageClassName: {{ .storageClass }} resources: requests: - storage: 1Gi + storage: {{ .size }} + {{- end }} {{- end }} diff --git a/deploy/charts/firefly/values.yaml b/deploy/charts/firefly/values.yaml index d4ef7006e1..599bff638d 100644 --- a/deploy/charts/firefly/values.yaml +++ b/deploy/charts/firefly/values.yaml @@ -189,8 +189,7 @@ dataexchange: image: repository: ghcr.io/hyperledger/firefly-dataexchange-https pullPolicy: Always - # Overrides the image tag whose default is the chart appVersion. - tag: v0.9.2 + tag: v0.9.3 imagePullSecrets: [] nameOverride: "" @@ -243,3 +242,20 @@ dataexchange: tolerations: [] affinity: {} + + persistentVolumes: + # split into two mounts: /data/peers and /data/peer-certs + peers: + accessModes: + - ReadWriteOnce + annotations: {} + size: 1Gi + storageClass: "" + blobs: + enabled: true + accessModes: + - ReadWriteOnce + annotations: {} + subPath: "" + size: 2Gi + storageClass: ""