Skip to content

Commit

Permalink
common: readable error on helm older than 3.14 (#1579)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk authored Oct 11, 2024
1 parent c5ef805 commit ac5b2b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/victoria-metrics-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Next release

- TODO
- Display compatibility error message

## 0.0.14

Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-metrics-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
type: library
description: Victoria Metrics Common - contains shared templates for all Victoria Metrics helm charts
name: victoria-metrics-common
version: 0.0.14
version: 0.0.15
sources:
- https://github.com/VictoriaMetrics/helm-charts
kubeVersion: ">=1.23.0-0"
Expand Down
4 changes: 4 additions & 0 deletions charts/victoria-metrics-common/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{{- define "vm.namespace" -}}
{{- $Release := (.helm).Release | default .Release -}}
{{- $Values := (.helm).Values | default .Values -}}
{{- $Capabilities := (.helm).Capabilities | default .Capabilities -}}
{{- if semverCompare "<3.14.0" $Capabilities.HelmVersion.Version }}
{{- fail "This chart requires helm version 3.14.0 or higher" }}
{{- end }}
{{- $Values.namespaceOverride | default ($Values.global).namespaceOverride | default $Release.Namespace -}}
{{- end -}}

Expand Down

0 comments on commit ac5b2b3

Please sign in to comment.