github.com/zsuzhengdu/helm@v3.0.0-beta.3+incompatible/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl (about)

     1  {{- define "common.volume.configMap" -}}
     2          {{- $name := index . 0 -}}
     3          {{- $configMapName := index . 1 -}}
     4  
     5          name: {{ $name }}
     6          configMap:
     7            name: {{ $configMapName }}
     8  {{- end -}}
     9  
    10  {{- define "common.volume.pvc" -}}
    11          {{- $name := index . 0 -}}
    12          {{- $claimName := index . 1 -}}
    13          {{- $persistence := index . 2 -}}
    14  
    15          name: {{ $name }}
    16          {{- if $persistence.enabled }}
    17          persistentVolumeClaim:
    18            claimName: {{ $persistence.existingClaim | default $claimName }}
    19          {{- else }}
    20          emptyDir: {}
    21          {{- end -}}
    22  {{- end -}}