mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 18:38:40 +00:00
Fix handling of kyverno-policies version check when port in image tag (#4042)
* Fix handling of kyverno-policies version check when port in image tag Fixes #4031 Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu> * Add release notes for chart Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu> * Fix release notes and use splitList Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
This commit is contained in:
parent
18ae9c7d6d
commit
566eae7d94
2 changed files with 3 additions and 1 deletions
|
@ -25,3 +25,5 @@ annotations:
|
|||
artifacthub.io/changes: |
|
||||
- kind: added
|
||||
description: Support for artifacthub.io/changes annotation
|
||||
- kind: fixed
|
||||
description: Fix Kyverno version check when image tag contains registry port number
|
||||
|
|
|
@ -59,7 +59,7 @@ helm.sh/chart: {{ template "kyverno-policies.chart" . }}
|
|||
{{- $version := "" -}}
|
||||
{{- with (lookup "apps/v1" "Deployment" .Release.Namespace "kyverno") -}}
|
||||
{{- with (first .spec.template.spec.containers) -}}
|
||||
{{- $imageTag := (split ":" .image)._1 -}}
|
||||
{{- $imageTag := (last (splitList ":" .image)) -}}
|
||||
{{- $version = trimPrefix "v" $imageTag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Reference in a new issue