From e6d616c5f72ca4968de9f692a5a7d0f5af63e366 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Mon, 12 Apr 2021 16:14:46 +0200 Subject: [PATCH] Don't create volume mounts for unmountable PVC's (#334) --- library/common/Chart.yaml | 2 +- library/common/templates/lib/controller/_container.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index b939807e3a8..31d57a2b82b 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 kubeVersion: ">=1.16.0-0" name: common -version: 2.2.0 +version: 2.2.1 # upstream_version: appVersion: none description: Function library for TrueCharts diff --git a/library/common/templates/lib/controller/_container.tpl b/library/common/templates/lib/controller/_container.tpl index 583913f3a96..937e40da7ca 100644 --- a/library/common/templates/lib/controller/_container.tpl +++ b/library/common/templates/lib/controller/_container.tpl @@ -76,7 +76,7 @@ The main container included in the controller. {{- include "common.controller.ports" . | trim | nindent 2 }} volumeMounts: {{- range $index, $PVC := .Values.persistence }} - {{- if $PVC.enabled }} + {{- if and ( $PVC.enabled ) ( $PVC.mountPath ) }} - mountPath: {{ $PVC.mountPath }} name: {{ $index }} {{- if $PVC.subPath }}