mirror of
https://github.com/truenas/charts.git
synced 2024-04-21 15:21:45 +00:00
not create pvc if existing claim is set
This commit is contained in:
@@ -35,6 +35,17 @@ tests:
|
||||
isNull:
|
||||
path: spec.storageClassName
|
||||
|
||||
- it: should not create pvc when existingClaim is set
|
||||
set:
|
||||
persistence:
|
||||
my-volume1:
|
||||
enabled: true
|
||||
type: pvc
|
||||
existingClaim: some-existing-claim
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
of: 0
|
||||
|
||||
- it: should create pvc with accessModes set as string
|
||||
set:
|
||||
some_mode: ReadWriteMany
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{{- include "ix.v1.common.lib.persistence.validation" (dict "rootCtx" $ "objectData" $objectData) -}}
|
||||
|
||||
{{/* Only spawn PVC if it's enabled and type of "pvc" */}}
|
||||
{{- if eq "pvc" $objectData.type -}}
|
||||
{{- if and (eq "pvc" $objectData.type) (not $objectData.existingClaim) -}}
|
||||
|
||||
{{- $objectName := (printf "%s-%s" (include "ix.v1.common.lib.chart.names.fullname" $) $name) -}}
|
||||
{{/* Perform validations */}}
|
||||
|
||||
Reference in New Issue
Block a user