From e637f71298acff4edd38bfb098edd05bbbe3c01b Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Mon, 13 Nov 2023 12:34:15 +0100 Subject: [PATCH] Replace deprecated `.Capabilities.KubeVersion.GitVersion` references > Deprecated: use KubeVersion.Version https://github.com/helm/helm/blob/82195652495d757d87c1a01f640973f20ca141b0/pkg/chartutil/capabilities.go#L82-L83 Signed-off-by: Silvestre Zabala --- templates/_helpers.tpl | 2 +- templates/worker-deployment.yaml | 2 +- templates/worker-horizontal-pod-autoscaler.yaml | 2 +- templates/worker-statefulset.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 15f61476..2a54551c 100755 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -78,7 +78,7 @@ Creates the address of the TSA service. Determine version of Kubernetes cluster */}} {{- define "concourse.kubeVersion" -}} -{{- print (.Capabilities.KubeVersion.GitVersion | replace "v" "") -}} +{{- print (.Capabilities.KubeVersion.Version | replace "v" "") -}} {{- end -}} {{/* diff --git a/templates/worker-deployment.yaml b/templates/worker-deployment.yaml index 23a6f534..38b4a1c4 100644 --- a/templates/worker-deployment.yaml +++ b/templates/worker-deployment.yaml @@ -171,7 +171,7 @@ spec: - key: worker-additional-certs path: worker-additional-certs.pem {{- end }} - {{- if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion }} + {{- if semverCompare "^1.7-0" .Capabilities.KubeVersion.Version }} strategy: {{ toYaml .Values.worker.updateStrategy | indent 4 }} {{- end }} diff --git a/templates/worker-horizontal-pod-autoscaler.yaml b/templates/worker-horizontal-pod-autoscaler.yaml index 88994602..a0dea1b5 100644 --- a/templates/worker-horizontal-pod-autoscaler.yaml +++ b/templates/worker-horizontal-pod-autoscaler.yaml @@ -1,6 +1,6 @@ {{- if .Values.concourse.worker.autoscaling }} {{- if .Values.concourse.worker.autoscaling.maxReplicas }} -{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version -}} apiVersion: autoscaling/v2 {{- else -}} apiVersion: autoscaling/v2beta2 diff --git a/templates/worker-statefulset.yaml b/templates/worker-statefulset.yaml index 38241873..0d514b6b 100644 --- a/templates/worker-statefulset.yaml +++ b/templates/worker-statefulset.yaml @@ -231,7 +231,7 @@ spec: {{- end }} {{- end }} {{- end }} - {{- if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion }} + {{- if semverCompare "^1.7-0" .Capabilities.KubeVersion.Version }} updateStrategy: {{ toYaml .Values.worker.updateStrategy | indent 4 }} {{- end }}