Don't create volume mounts for unmountable PVC's (#334)

This commit is contained in:
Kjeld Schouten-Lebbing
2021-04-12 16:14:46 +02:00
committed by GitHub
parent 3efac2fea3
commit e6d616c5f7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v2 apiVersion: v2
kubeVersion: ">=1.16.0-0" kubeVersion: ">=1.16.0-0"
name: common name: common
version: 2.2.0 version: 2.2.1
# upstream_version: # upstream_version:
appVersion: none appVersion: none
description: Function library for TrueCharts description: Function library for TrueCharts
@@ -76,7 +76,7 @@ The main container included in the controller.
{{- include "common.controller.ports" . | trim | nindent 2 }} {{- include "common.controller.ports" . | trim | nindent 2 }}
volumeMounts: volumeMounts:
{{- range $index, $PVC := .Values.persistence }} {{- range $index, $PVC := .Values.persistence }}
{{- if $PVC.enabled }} {{- if and ( $PVC.enabled ) ( $PVC.mountPath ) }}
- mountPath: {{ $PVC.mountPath }} - mountPath: {{ $PVC.mountPath }}
name: {{ $index }} name: {{ $index }}
{{- if $PVC.subPath }} {{- if $PVC.subPath }}