diff --git a/Chart.yaml b/Chart.yaml index ed47a80..2b5de62 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -14,4 +14,4 @@ type: library # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.5.0 +version: 0.5.1 diff --git a/templates/_cronjob.yaml b/templates/_cronjob.yaml index 87e2c76..1c9855b 100644 --- a/templates/_cronjob.yaml +++ b/templates/_cronjob.yaml @@ -10,7 +10,7 @@ spec: {{- $cronJob := index . 1 }} {{- $pod := index . 2 }} {{- $serviceAccount := index . 3 }} -{{- if semverCompare ">=1.21.0" .Capabilities.KubeVersion.Version -}} +{{- if semverCompare ">=1.21.0" $top.Capabilities.KubeVersion.Version -}} apiVersion: batch/v1 {{- else -}} apiVersion: batch/v1beta1 diff --git a/templates/_hpa.yaml b/templates/_hpa.yaml index e58b9c9..282e986 100644 --- a/templates/_hpa.yaml +++ b/templates/_hpa.yaml @@ -3,7 +3,7 @@ {{- define "common.hpa.tpl" -}} {{- $top := first . }} {{- $autoscaling := index . 1 }} -{{- if semverCompare ">=1.23.0" .Capabilities.KubeVersion.Version -}} +{{- if semverCompare ">=1.23.0" $top.Capabilities.KubeVersion.Version -}} apiVersion: autoscaling/v2 {{- else -}} apiVersion: autoscaling/v2beta2 diff --git a/templates/_pdb.yaml b/templates/_pdb.yaml index d021d24..1780a94 100644 --- a/templates/_pdb.yaml +++ b/templates/_pdb.yaml @@ -3,7 +3,7 @@ {{- define "common.pdb.tpl" -}} {{- $top := first . }} {{- $pdb := index . 1 }} -{{- if semverCompare ">=1.21.0" .Capabilities.KubeVersion.Version -}} +{{- if semverCompare ">=1.21.0" $top.Capabilities.KubeVersion.Version -}} apiVersion: policy/v1 {{- else -}} apiVersion: policy/v1beta1