diff --git a/charts/steadybit-platform/Chart.yaml b/charts/steadybit-platform/Chart.yaml index 410fc19..3b9c823 100644 --- a/charts/steadybit-platform/Chart.yaml +++ b/charts/steadybit-platform/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: steadybit-platform description: steadybit Platform Helm chart for Kubernetes. -version: 1.1.4 +version: 1.1.5 appVersion: 2.2.4 home: https://www.steadybit.com/ icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png diff --git a/charts/steadybit-platform/templates/_helpers.tpl b/charts/steadybit-platform/templates/_helpers.tpl index 30468f7..7d6ec09 100644 --- a/charts/steadybit-platform/templates/_helpers.tpl +++ b/charts/steadybit-platform/templates/_helpers.tpl @@ -137,7 +137,7 @@ returns the image tag for the platform container and validates wether a license */}} {{- define "validContainerImageTag" -}} {{- $version := default .Values.image.tag | default .Chart.AppVersion -}} -{{- if and (semverCompare ">=2.2.0-0" $version) (not .Values.platform.tenant.license) -}} +{{- if and (or (not (regexMatch "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" $version)) (semverCompare ">=2.2.0-0" $version)) (not .Values.platform.tenant.license) -}} {{- fail ".Values.platform.license missing. A license is required to run steadybit platform >= 2.2.0" -}} {{- end -}} {{- $version -}} diff --git a/charts/steadybit-platform/tests/deployment_test.yaml b/charts/steadybit-platform/tests/deployment_test.yaml index eac5771..8319c40 100644 --- a/charts/steadybit-platform/tests/deployment_test.yaml +++ b/charts/steadybit-platform/tests/deployment_test.yaml @@ -101,6 +101,13 @@ tests: asserts: - failedTemplate: errorMessage: .Values.platform.license missing. A license is required to run steadybit platform >= 2.2.0 + - it: should fail with missing license for version latest + set: + image: + tag: latest + asserts: + - failedTemplate: + errorMessage: .Values.platform.license missing. A license is required to run steadybit platform >= 2.2.0 - it: should not fail with missing license for version >= 2.2.0 set: image: