Skip to content

Commit

Permalink
Replace deprecated .Capabilities.KubeVersion.GitVersion references
Browse files Browse the repository at this point in the history
  • Loading branch information
silvestre committed Nov 13, 2023
1 parent 2e71523 commit e637f71
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion templates/worker-horizontal-pod-autoscaler.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/worker-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit e637f71

Please sign in to comment.