Skip to content

Commit

Permalink
refactor: unify image customization methods (alibaba#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uncle-Justice authored Dec 12, 2023
1 parent d2ee606 commit 518d8df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 1 addition & 5 deletions helm/core/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm/core/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions helm/core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down Expand Up @@ -457,6 +459,8 @@ controller:
name: "higress-controller"
replicas: 1
image: higress

hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
tag: ""
env: {}

Expand Down

0 comments on commit 518d8df

Please sign in to comment.