diff --git a/charts/karpor/Chart.yaml b/charts/karpor/Chart.yaml index 9167280..82ed766 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.0 +version: 0.5.1 type: application # The Application Version in the Chart appVersion: 0.4.2 diff --git a/charts/karpor/README.md b/charts/karpor/README.md index 3255933..d8a1984 100644 --- a/charts/karpor/README.md +++ b/charts/karpor/README.md @@ -1,6 +1,6 @@ # Karpor Chart -![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.2](https://img.shields.io/badge/AppVersion-0.4.2-informational?style=flat-square) +![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.2](https://img.shields.io/badge/AppVersion-0.4.2-informational?style=flat-square) A Helm chart for Karpor, a modern kubernetes visualization tool. @@ -49,6 +49,7 @@ The following table lists the configurable parameters of the chart and their def |-----|------|---------|-------------| | namespace | string | `"karpor"` | Which namespace to be deployed. | | namespaceEnabled | bool | `true` | Whether to generate namespace. | +| registryProxy | string | `""` | Image registry proxy will be the prefix as all component image. | ### Global Parameters diff --git a/charts/karpor/templates/_common.tpl b/charts/karpor/templates/_common.tpl index 618e842..b4956d7 100644 --- a/charts/karpor/templates/_common.tpl +++ b/charts/karpor/templates/_common.tpl @@ -26,3 +26,11 @@ app.kubernetes.io/component: {{ .component }} app.kubernetes.io/instance: {{ .context.Release.Name }} {{- end }} +{{/* +Real image. +*/}} +{{- define "karpor.realImage" -}} +{{- trimPrefix "/" (list (trimAll "/" .context.Values.registryProxy) +.repo | join "/") }}:{{ if .hasV }}v{{ end }}{{ default .context.Chart.AppVersion .tag }} +{{- end -}} + diff --git a/charts/karpor/templates/elasticsearch.yml b/charts/karpor/templates/elasticsearch.yml index acdb301..90dbab6 100644 --- a/charts/karpor/templates/elasticsearch.yml +++ b/charts/karpor/templates/elasticsearch.yml @@ -42,7 +42,7 @@ spec: value: elastic - name: ES_JAVA_OPTS value: -Xms1g -Xmx1g - image: {{ .Values.elasticsearch.image.repo }}:{{ .Values.elasticsearch.image.tag }} + image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.elasticsearch.image.repo "tag" .Values.elasticsearch.image.tag) }} imagePullPolicy: {{ .Values.global.image.imagePullPolicy }} name: elasticsearch ports: diff --git a/charts/karpor/templates/etcd.yml b/charts/karpor/templates/etcd.yml index eaa8f2e..c35139b 100644 --- a/charts/karpor/templates/etcd.yml +++ b/charts/karpor/templates/etcd.yml @@ -29,7 +29,7 @@ spec: spec: containers: - name: etcd - image: {{ .Values.etcd.image.repo }}:{{ .Values.etcd.image.tag }} + image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.etcd.image.repo "tag" .Values.etcd.image.tag) }} imagePullPolicy: {{ .Values.global.image.imagePullPolicy }} command: - /usr/local/bin/etcd diff --git a/charts/karpor/templates/job.yml b/charts/karpor/templates/job.yml index fbdd19b..b10fa25 100644 --- a/charts/karpor/templates/job.yml +++ b/charts/karpor/templates/job.yml @@ -9,7 +9,7 @@ spec: spec: containers: - name: karpor-generate-cert - image: {{ .Values.job.image.repo }}:{{ .Values.job.image.tag }} + image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.job.image.repo "tag" .Values.job.image.tag) }} imagePullPolicy: {{ .Values.global.image.imagePullPolicy }} command: - /bin/sh diff --git a/charts/karpor/templates/karpor-server.yml b/charts/karpor/templates/karpor-server.yml index 8d1d209..197ddad 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: {{ .Values.server.image.repo }}:v{{ default .Chart.AppVersion .Values.server.image.tag }} + image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.server.image.repo "tag" .Values.server.image.tag "hasV" true) }} 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 f55f1b7..d39f421 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: {{ .Values.syncer.image.repo }}:v{{ default .Chart.AppVersion .Values.syncer.image.tag }} + image: {{ include "karpor.realImage" (dict "context" . "repo" .Values.syncer.image.repo "tag" .Values.syncer.image.tag "hasV" true) }} imagePullPolicy: {{ .Values.global.image.imagePullPolicy }} name: karpor-syncer ports: diff --git a/charts/karpor/values.yaml b/charts/karpor/values.yaml index bbc869c..d5c8f01 100644 --- a/charts/karpor/values.yaml +++ b/charts/karpor/values.yaml @@ -6,6 +6,8 @@ namespace: karpor # -- Whether to generate namespace. namespaceEnabled: true +# -- Image registry proxy will be the prefix as all component image. +registryProxy: "" # Global configuration for Karpor components global: