diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index c6f7d72e..541ab6bb 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: common description: Function library for k8s-at-home charts type: library -version: 1.0.1 +version: 1.0.2 keywords: - k8s-at-home - common diff --git a/charts/common/templates/classes/_ingress.tpl b/charts/common/templates/classes/_ingress.tpl index ad006503..9a3d12b7 100644 --- a/charts/common/templates/classes/_ingress.tpl +++ b/charts/common/templates/classes/_ingress.tpl @@ -3,8 +3,10 @@ {{- $apiv1beta1 := .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} {{- $ingressName := include "common.names.fullname" . -}} {{- $values := .Values.ingress -}} -{{- if and (hasKey . "ObjectValues") (hasKey .ObjectValues "ingress") -}} - {{- $values = .ObjectValues.ingress -}} +{{- if hasKey . "ObjectValues" -}} + {{- with .ObjectValues.ingress -}} + {{- $values = . -}} + {{- end -}} {{ end -}} {{- if hasKey $values "nameSuffix" -}} {{- $ingressName = printf "%v-%v" $ingressName $values.nameSuffix -}} diff --git a/charts/common/templates/classes/_pvc.tpl b/charts/common/templates/classes/_pvc.tpl index 6d2f8f15..bf06927c 100644 --- a/charts/common/templates/classes/_pvc.tpl +++ b/charts/common/templates/classes/_pvc.tpl @@ -1,7 +1,9 @@ {{- define "common.classes.pvc" -}} {{- $values := .Values.persistence -}} -{{- if and (hasKey . "ObjectValues") (hasKey .ObjectValues "persistence") -}} - {{- $values = .ObjectValues.persistence -}} +{{- if hasKey . "ObjectValues" -}} + {{- with .ObjectValues.persistence -}} + {{- $values = . -}} + {{- end -}} {{ end -}} {{- $pvcName := include "common.names.fullname" . -}} {{- if hasKey $values "nameSuffix" -}} diff --git a/charts/common/templates/classes/_service.tpl b/charts/common/templates/classes/_service.tpl index dccedbaa..a326fd33 100644 --- a/charts/common/templates/classes/_service.tpl +++ b/charts/common/templates/classes/_service.tpl @@ -1,7 +1,9 @@ {{- define "common.classes.service" -}} {{- $values := .Values.service -}} -{{- if and (hasKey . "ObjectValues") (hasKey .ObjectValues "service") -}} - {{- $values = .ObjectValues.service -}} +{{- if hasKey . "ObjectValues" -}} + {{- with .ObjectValues.service -}} + {{- $values = . -}} + {{- end -}} {{ end -}} {{- $svcType := $values.type -}} apiVersion: v1