Skip to content

Commit 2478a7e

Browse files
authored
Fix indentation for participant pvc volume (#3500)
[static] Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com>
1 parent 901a24f commit 2478a7e

File tree

2 files changed

+104
-3
lines changed

2 files changed

+104
-3
lines changed

cluster/helm/splice-participant/templates/participant.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ spec:
196196
{{- end }}
197197
{{- end }}
198198
{{- if .Values.pvc }}
199-
- name: participant-volume
200-
persistentVolumeClaim:
201-
claimName: {{ .Release.Name }}-participant-pvc
199+
- name: participant-volume
200+
persistentVolumeClaim:
201+
claimName: {{ .Release.Name }}-participant-pvc
202202
{{- end }}
203203
{{- end }}
204204
---

cluster/helm/splice-participant/tests/participant_test.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,104 @@ tests:
212212
path: spec.template.spec.containers[?(@.name=='participant')].env[?(@.name=='AUTH_JWKS_URL')].value
213213
- notExists:
214214
path: spec.template.spec.containers[?(@.name=='participant')].env[?(@.name=='AUTH_TARGET_AUDIENCE')].value
215+
- it: "pvc creates persistent volume claim and volume mount"
216+
set:
217+
pvc:
218+
size: "20Gi"
219+
volumeStorageClass: "standard"
220+
documentSelector:
221+
path: kind
222+
value: Deployment
223+
asserts:
224+
# Sanity check
225+
- equal:
226+
path: spec.template.spec.containers[0].name
227+
value: participant
228+
# Volume is created
229+
- equal:
230+
path: spec.template.spec.volumes
231+
value:
232+
- name: participant-volume
233+
persistentVolumeClaim:
234+
claimName: participant-1-participant-pvc
235+
# Volume mount is created
236+
- equal:
237+
path: spec.template.spec.containers[0].volumeMounts
238+
value:
239+
- name: participant-volume
240+
mountPath: /persistent-data
241+
- it: "pvc creates PersistentVolumeClaim resource"
242+
set:
243+
pvc:
244+
size: "20Gi"
245+
volumeStorageClass: "standard"
246+
documentSelector:
247+
path: kind
248+
value: PersistentVolumeClaim
249+
asserts:
250+
- equal:
251+
path: metadata.name
252+
value: participant-1-participant-pvc
253+
- equal:
254+
path: spec.accessModes[0]
255+
value: ReadWriteOnce
256+
- equal:
257+
path: spec.resources.requests.storage
258+
value: "20Gi"
259+
- equal:
260+
path: spec.storageClassName
261+
value: "standard"
262+
- equal:
263+
path: metadata.annotations
264+
value:
265+
helm.sh/resource-policy: keep
266+
- it: "pvc and extraVolumes work together correctly"
267+
set:
268+
pvc:
269+
size: "10Gi"
270+
volumeStorageClass: "fast-ssd"
271+
extraVolumes:
272+
- name: secret-volume
273+
secret:
274+
secretName: my-secret
275+
- name: config-volume
276+
persistentVolumeClaim:
277+
claimName: external-pvc
278+
extraVolumeMounts:
279+
- name: secret-volume
280+
mountPath: /secrets
281+
readOnly: true
282+
- name: config-volume
283+
mountPath: /config
284+
documentSelector:
285+
path: kind
286+
value: Deployment
287+
asserts:
288+
# Sanity check
289+
- equal:
290+
path: spec.template.spec.containers[0].name
291+
value: participant
292+
# All volumes are created (extraVolumes + pvc volume)
293+
- equal:
294+
path: spec.template.spec.volumes
295+
value:
296+
- name: secret-volume
297+
secret:
298+
secretName: my-secret
299+
- name: config-volume
300+
persistentVolumeClaim:
301+
claimName: external-pvc
302+
- name: participant-volume
303+
persistentVolumeClaim:
304+
claimName: participant-1-participant-pvc
305+
# All volume mounts are created (extraVolumeMounts + pvc mount)
306+
- equal:
307+
path: spec.template.spec.containers[0].volumeMounts
308+
value:
309+
- name: secret-volume
310+
mountPath: /secrets
311+
readOnly: true
312+
- name: config-volume
313+
mountPath: /config
314+
- name: participant-volume
315+
mountPath: /persistent-data

0 commit comments

Comments
 (0)