Skip to content

Commit afa4601

Browse files
johnlannidaixijun
authored andcommitted
feat: share hub parameter between deployments and plugins with separate namespaces (higress-group#3521)
1 parent 387eb08 commit afa4601

8 files changed

Lines changed: 46 additions & 11 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ Port descriptions:
8686
>
8787
> **Southeast Asia**: `higress-registry.ap-southeast-7.cr.aliyuncs.com`
8888
89+
> **For Kubernetes deployments**, you can configure the `global.hub` parameter in Helm values to use a mirror registry closer to your region. This applies to both Higress component images and built-in Wasm plugin images:
90+
>
91+
> ```bash
92+
> # Example: Using North America mirror
93+
> helm install higress -n higress-system higress.io/higress --set global.hub=higress-registry.us-west-1.cr.aliyuncs.com --create-namespace
94+
> ```
95+
>
96+
> Available mirror registries:
97+
> - **China (Hangzhou)**: `higress-registry.cn-hangzhou.cr.aliyuncs.com` (default)
98+
> - **North America**: `higress-registry.us-west-1.cr.aliyuncs.com`
99+
> - **Southeast Asia**: `higress-registry.ap-southeast-7.cr.aliyuncs.com`
100+
89101
For other installation methods such as Helm deployment under K8s, please refer to the official [Quick Start documentation](https://higress.io/en-us/docs/user/quickstart).
90102
91103
If you are deploying on the cloud, it is recommended to use the [Enterprise Edition](https://www.aliyun.com/product/apigateway?spm=higress-github.topbar.0.0.0)

README_ZH.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,24 @@ docker run -d --rm --name higress-ai -v ${PWD}:/data \
8080

8181
**Higress 的所有 Docker 镜像都一直使用自己独享的仓库,不受 Docker Hub 境内访问受限的影响**
8282

83+
> 如果从 `higress-registry.cn-hangzhou.cr.aliyuncs.com` 拉取镜像超时,可以尝试使用以下镜像加速源:
84+
>
85+
> **北美**: `higress-registry.us-west-1.cr.aliyuncs.com`
86+
>
87+
> **东南亚**: `higress-registry.ap-southeast-7.cr.aliyuncs.com`
88+
89+
> **K8s 部署时**,可以通过 Helm values 配置 `global.hub` 参数来使用距离部署区域更近的镜像仓库,该参数会同时应用于 Higress 组件镜像和内置 Wasm 插件镜像:
90+
>
91+
> ```bash
92+
> # 示例:使用北美镜像源
93+
> helm install higress -n higress-system higress.io/higress --set global.hub=higress-registry.us-west-1.cr.aliyuncs.com --create-namespace
94+
> ```
95+
>
96+
> 可用镜像仓库:
97+
> - **中国(杭州)**: `higress-registry.cn-hangzhou.cr.aliyuncs.com`(默认)
98+
> - **北美**: `higress-registry.us-west-1.cr.aliyuncs.com`
99+
> - **东南亚**: `higress-registry.ap-southeast-7.cr.aliyuncs.com`
100+
83101
K8s 下使用 Helm 部署等其他安装方式可以参考官网 [Quick Start 文档](https://higress.cn/docs/latest/user/quickstart/)。
84102
85103
如果您是在云上部署,推荐使用[企业版](https://www.aliyun.com/product/apigateway?spm=higress-github.topbar.0.0.0)

helm/core/charts/redis/templates/statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
{{- end }}
2424
containers:
2525
- name: {{ .Chart.Name }}
26-
image: "{{ .Values.global.hub }}/{{ .Values.redis.image | default "redis-stack-server" }}:{{ .Values.redis.tag | default .Chart.AppVersion }}"
26+
image: "{{ .Values.global.hub }}/higress/{{ .Values.redis.image | default "redis-stack-server" }}:{{ .Values.redis.tag | default .Chart.AppVersion }}"
2727
{{- if .Values.global.imagePullPolicy }}
2828
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
2929
{{- end }}

helm/core/templates/_pod.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ template:
3939
{{- end }}
4040
containers:
4141
- name: higress-gateway
42-
image: "{{ .Values.gateway.hub | default .Values.global.hub }}/{{ .Values.gateway.image | default "gateway" }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
42+
image: "{{ .Values.gateway.hub | default .Values.global.hub }}/higress/{{ .Values.gateway.image | default "gateway" }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
4343
args:
4444
- proxy
4545
- router
@@ -205,7 +205,7 @@ template:
205205
{{- if $o11y.enabled }}
206206
{{- $config := $o11y.promtail }}
207207
- name: promtail
208-
image: {{ $config.image.repository | default (printf "%s/promtail" .Values.global.hub) }}:{{ $config.image.tag }}
208+
image: {{ $config.image.repository | default (printf "%s/higress/promtail" .Values.global.hub) }}:{{ $config.image.tag }}
209209
imagePullPolicy: IfNotPresent
210210
args:
211211
- -config.file=/etc/promtail/promtail.yaml

helm/core/templates/controller-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
- name: {{ .Chart.Name }}
3939
securityContext:
4040
{{- toYaml .Values.controller.securityContext | nindent 12 }}
41-
image: "{{ .Values.controller.hub | default .Values.global.hub }}/{{ .Values.controller.image | default "higress" }}:{{ .Values.controller.tag | default .Chart.AppVersion }}"
41+
image: "{{ .Values.controller.hub | default .Values.global.hub }}/higress/{{ .Values.controller.image | default "higress" }}:{{ .Values.controller.tag | default .Chart.AppVersion }}"
4242
args:
4343
- "serve"
4444
- --gatewaySelectorKey=higress
@@ -104,7 +104,7 @@ spec:
104104
- name: log
105105
mountPath: /var/log
106106
- name: discovery
107-
image: "{{ .Values.pilot.hub | default .Values.global.hub }}/{{ .Values.pilot.image | default "pilot" }}:{{ .Values.pilot.tag | default .Chart.AppVersion }}"
107+
image: "{{ .Values.pilot.hub | default .Values.global.hub }}/higress/{{ .Values.pilot.image | default "pilot" }}:{{ .Values.pilot.tag | default .Chart.AppVersion }}"
108108
{{- if .Values.global.imagePullPolicy }}
109109
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
110110
{{- end }}

helm/core/templates/plugin-server-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
{{- end }}
2424
containers:
2525
- name: {{ .Chart.Name }}
26-
image: {{ .Values.pluginServer.hub | default .Values.global.hub }}/{{ .Values.pluginServer.image | default "plugin-server" }}:{{ .Values.pluginServer.tag | default "1.0.0" }}
26+
image: {{ .Values.pluginServer.hub | default .Values.global.hub }}/higress/{{ .Values.pluginServer.image | default "plugin-server" }}:{{ .Values.pluginServer.tag | default "1.0.0" }}
2727
{{- if .Values.global.imagePullPolicy }}
2828
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
2929
{{- end }}

helm/core/values.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,14 @@ global:
7070
# cpu: 100m
7171
# memory: 128Mi
7272

73-
# -- Default hub for Istio images.
74-
# Releases are published to docker hub under 'istio' project.
75-
# Dev builds from prow are on gcr.io
76-
hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
73+
# -- Default hub (registry) for Higress images.
74+
# For Higress deployments, images are pulled from: {hub}/higress/{image}
75+
# For built-in plugins, images are pulled from: {hub}/{pluginNamespace}/{plugin-name}
76+
# Change this to use a mirror registry closer to your deployment region for faster image pulls.
77+
hub: higress-registry.cn-hangzhou.cr.aliyuncs.com
78+
# -- Namespace for built-in plugin images. Default is "plugins".
79+
# Used by higress-console to configure plugin image path.
80+
pluginNamespace: "plugins"
7781

7882
# -- Specify image pull policy if default behavior isn't desired.
7983
# Default behavior: latest images will be Always else IfNotPresent.

helm/higress/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ The command removes all the Kubernetes components associated with the chart and
178178
| global.enableStatus | bool | `true` | If true, Higress Controller will update the status field of Ingress resources. When migrating from Nginx Ingress, in order to avoid status field of Ingress objects being overwritten, this parameter needs to be set to false, so Higress won't write the entry IP to the status field of the corresponding Ingress object. |
179179
| global.externalIstiod | bool | `false` | Configure a remote cluster data plane controlled by an external istiod. When set to true, istiod is not deployed locally and only a subset of the other discovery charts are enabled. |
180180
| global.hostRDSMergeSubset | bool | `false` | |
181-
| global.hub | string | `"higress-registry.cn-hangzhou.cr.aliyuncs.com/higress"` | Default hub for Istio images. Releases are published to docker hub under 'istio' project. Dev builds from prow are on gcr.io |
181+
| global.hub | string | `"higress-registry.cn-hangzhou.cr.aliyuncs.com"` | Default hub (registry) for Higress images. For Higress deployments, images are pulled from: {hub}/higress/{image} For built-in plugins, images are pulled from: {hub}/{pluginNamespace}/{plugin-name} Change this to use a mirror registry closer to your deployment region for faster image pulls. |
182182
| global.imagePullPolicy | string | `""` | Specify image pull policy if default behavior isn't desired. Default behavior: latest images will be Always else IfNotPresent. |
183183
| global.imagePullSecrets | list | `[]` | ImagePullSecrets for all ServiceAccount, list of secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. For components that don't use ServiceAccounts (i.e. grafana, servicegraph, tracing) ImagePullSecrets will be added to the corresponding Deployment(StatefulSet) objects. Must be set for any cluster configured with private docker registry. |
184184
| global.ingressClass | string | `"higress"` | IngressClass filters which ingress resources the higress controller watches. The default ingress class is higress. There are some special cases for special ingress class. 1. When the ingress class is set as nginx, the higress controller will watch ingress resources with the nginx ingress class or without any ingress class. 2. When the ingress class is set empty, the higress controller will watch all ingress resources in the k8s cluster. |
@@ -203,6 +203,7 @@ The command removes all the Kubernetes components associated with the chart and
203203
| global.onlyPushRouteCluster | bool | `true` | |
204204
| global.operatorManageWebhooks | bool | `false` | Configure whether Operator manages webhook configurations. The current behavior of Istiod is to manage its own webhook configurations. When this option is set as true, Istio Operator, instead of webhooks, manages the webhook configurations. When this option is set as false, webhooks manage their own webhook configurations. |
205205
| global.pilotCertProvider | string | `"istiod"` | Configure the certificate provider for control plane communication. Currently, two providers are supported: "kubernetes" and "istiod". As some platforms may not have kubernetes signing APIs, Istiod is the default |
206+
| global.pluginNamespace | string | `"plugins"` | Namespace for built-in plugin images. Default is "plugins". Used by higress-console to configure plugin image path. |
206207
| global.priorityClassName | string | `""` | Kubernetes >=v1.11.0 will create two PriorityClass, including system-cluster-critical and system-node-critical, it is better to configure this in order to make sure your Istio pods will not be killed because of low priority class. Refer to https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass for more detail. |
207208
| global.proxy.autoInject | string | `"enabled"` | This controls the 'policy' in the sidecar injector. |
208209
| global.proxy.clusterDomain | string | `"cluster.local"` | CAUTION: It is important to ensure that all Istio helm charts specify the same clusterDomain value cluster domain. Default value is "cluster.local". |

0 commit comments

Comments
 (0)