From 518d8dfa3d8fdf27231236de5400a17064d0c14e Mon Sep 17 00:00:00 2001 From: Uncle-Justice <40391338+Uncle-Justice@users.noreply.github.com> Date: Tue, 12 Dec 2023 19:13:45 +0800 Subject: [PATCH] refactor: unify image customization methods (#687) --- helm/core/templates/controller-deployment.yaml | 6 +----- helm/core/templates/deployment.yaml | 2 +- helm/core/values.yaml | 4 ++++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/helm/core/templates/controller-deployment.yaml b/helm/core/templates/controller-deployment.yaml index 1eb21c73e..0c670a690 100644 --- a/helm/core/templates/controller-deployment.yaml +++ b/helm/core/templates/controller-deployment.yaml @@ -31,11 +31,7 @@ spec: containers: {{- if not .Values.global.enableHigressIstio }} - name: discovery -{{- if contains "/" .Values.pilot.image }} - image: "{{ .Values.pilot.image }}" -{{- else }} image: "{{ .Values.pilot.hub | default .Values.global.hub }}/{{ .Values.pilot.image | default "pilot" }}:{{ .Values.pilot.tag | default .Chart.AppVersion }}" -{{- end }} {{- if .Values.global.imagePullPolicy }} imagePullPolicy: {{ .Values.global.imagePullPolicy }} {{- end }} @@ -184,7 +180,7 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.controller.securityContext | nindent 12 }} - image: "{{ .Values.hub }}/{{ .Values.controller.image }}:{{ .Values.controller.tag | default .Chart.AppVersion }}" + image: "{{ .Values.controller.hub | default .Values.global.hub }}/{{ .Values.controller.image | default "higress" }}:{{ .Values.controller.tag | default .Chart.AppVersion }}" args: - "serve" - --gatewaySelectorKey=higress diff --git a/helm/core/templates/deployment.yaml b/helm/core/templates/deployment.yaml index 1bf81b625..4497250b2 100644 --- a/helm/core/templates/deployment.yaml +++ b/helm/core/templates/deployment.yaml @@ -68,7 +68,7 @@ spec: {{- end }} containers: - name: higress-gateway - image: "{{ .Values.hub }}/{{ .Values.gateway.image }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}" + image: "{{ .Values.gateway.hub | default .Values.global.hub }}/{{ .Values.gateway.image | default "gateway" }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}" args: - proxy - router diff --git a/helm/core/values.yaml b/helm/core/values.yaml index 72cbb0d15..f5c6bffa6 100644 --- a/helm/core/values.yaml +++ b/helm/core/values.yaml @@ -369,6 +369,8 @@ gateway: name: "higress-gateway" replicas: 2 image: gateway + + hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress tag: "" # revision declares which revision this gateway is a part of revision: "" @@ -457,6 +459,8 @@ controller: name: "higress-controller" replicas: 1 image: higress + + hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress tag: "" env: {}