From cbb87adbbb479db94bb7a1a0165c858e3a6ebc1b Mon Sep 17 00:00:00 2001 From: z1cheng Date: Wed, 31 Jul 2024 00:06:38 +0800 Subject: [PATCH] fix: image tag error in Helm Signed-off-by: z1cheng --- charts/karpor/Chart.yaml | 2 +- charts/karpor/README.md | 2 +- charts/karpor/templates/_common.tpl | 2 +- charts/karpor/templates/karpor-server.yml | 2 +- charts/karpor/templates/karpor-syncer.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/karpor/Chart.yaml b/charts/karpor/Chart.yaml index 7aad482..d0152d3 100644 --- a/charts/karpor/Chart.yaml +++ b/charts/karpor/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: karpor # The Chart Version -version: 0.5.5 +version: 0.5.6 type: application # The Application Version in the Chart appVersion: 0.4.5 diff --git a/charts/karpor/README.md b/charts/karpor/README.md index c51add8..08d0d90 100644 --- a/charts/karpor/README.md +++ b/charts/karpor/README.md @@ -1,6 +1,6 @@ # Karpor Chart -![Version: 0.5.5](https://img.shields.io/badge/Version-0.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.5](https://img.shields.io/badge/AppVersion-0.4.5-informational?style=flat-square) +![Version: 0.5.6](https://img.shields.io/badge/Version-0.5.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.5](https://img.shields.io/badge/AppVersion-0.4.5-informational?style=flat-square) A Helm chart for Karpor, a modern kubernetes visualization tool. diff --git a/charts/karpor/templates/_common.tpl b/charts/karpor/templates/_common.tpl index b4956d7..dc0704b 100644 --- a/charts/karpor/templates/_common.tpl +++ b/charts/karpor/templates/_common.tpl @@ -31,6 +31,6 @@ Real image. */}} {{- define "karpor.realImage" -}} {{- trimPrefix "/" (list (trimAll "/" .context.Values.registryProxy) -.repo | join "/") }}:{{ if .hasV }}v{{ end }}{{ default .context.Chart.AppVersion .tag }} +.repo | join "/") }}:{{ if .needV }}v{{ end }}{{ default .context.Chart.AppVersion .tag }} {{- end -}} diff --git a/charts/karpor/templates/karpor-server.yml b/charts/karpor/templates/karpor-server.yml index e253e3f..9523e79 100644 --- a/charts/karpor/templates/karpor-server.yml +++ b/charts/karpor/templates/karpor-server.yml @@ -35,7 +35,7 @@ spec: - --client-ca-file=/etc/karpor/ca.crt command: - /karpor - image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.server.image.repo "tag" .Values.server.image.tag "hasV" true) }} + image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.server.image.repo "tag" .Values.server.image.tag "needV" (not (hasPrefix "v" .Values.server.image.tag))) }} imagePullPolicy: {{ .Values.global.image.imagePullPolicy }} name: karpor-server ports: diff --git a/charts/karpor/templates/karpor-syncer.yml b/charts/karpor/templates/karpor-syncer.yml index f4648d2..81642e2 100644 --- a/charts/karpor/templates/karpor-syncer.yml +++ b/charts/karpor/templates/karpor-syncer.yml @@ -24,7 +24,7 @@ spec: env: - name: KUBECONFIG value: /etc/karpor/config - image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.syncer.image.repo "tag" .Values.syncer.image.tag "hasV" true) }} + image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.syncer.image.repo "tag" .Values.syncer.image.tag "needV" (not (hasPrefix "v" .Values.syncer.image.tag))) }} imagePullPolicy: {{ .Values.global.image.imagePullPolicy }} name: karpor-syncer ports: