Skip to content

Commit 6952329

Browse files
authored
feat(helm): Optimize Helm charts, fine-tune the imagePullPolicy configuration for gateway, plugin server, and controller pods (#3550)
1 parent 60ce07d commit 6952329

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

helm/core/templates/_pod.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ template:
2020
{{- end }}
2121
{{- include "gateway.selectorLabels" . | nindent 6 }}
2222
spec:
23+
{{- if .Values.gateway.imagePullPolicy }}
24+
imagePullPolicy: {{ .Values.gateway.imagePullPolicy }}
25+
{{- else if .Values.global.imagePullPolicy }}
26+
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
27+
{{- end }}
2328
{{- with .Values.gateway.imagePullSecrets }}
2429
imagePullSecrets:
2530
{{- toYaml . | nindent 6 }}

helm/core/templates/controller-deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ spec:
105105
mountPath: /var/log
106106
- name: discovery
107107
image: "{{ .Values.pilot.hub | default .Values.global.hub }}/higress/{{ .Values.pilot.image | default "pilot" }}:{{ .Values.pilot.tag | default .Chart.AppVersion }}"
108-
{{- if .Values.global.imagePullPolicy }}
108+
{{- if .Values.controller.imagePullPolicy }}
109+
imagePullPolicy: {{ .Values.controller.imagePullPolicy }}
110+
{{- else if .Values.global.imagePullPolicy }}
109111
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
110112
{{- end }}
111113
args:

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ spec:
2424
containers:
2525
- name: {{ .Chart.Name }}
2626
image: {{ .Values.pluginServer.hub | default .Values.global.hub }}/higress/{{ .Values.pluginServer.image | default "plugin-server" }}:{{ .Values.pluginServer.tag | default "1.0.0" }}
27-
{{- if .Values.global.imagePullPolicy }}
27+
{{- if .Values.pluginServer.imagePullPolicy }}
28+
imagePullPolicy: {{ .Values.pluginServer.imagePullPolicy }}
29+
{{- else if .Values.global.imagePullPolicy }}
2830
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
2931
{{- end }}
3032
ports:

helm/core/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ gateway:
423423
replicas: 2
424424
image: gateway
425425

426+
# -- Specify image pull policy if default behavior isn't desired.
427+
# Default behavior: latest images will be Always else IfNotPresent.
428+
imagePullPolicy: ""
429+
426430
# -- Use a `DaemonSet` or `Deployment`
427431
kind: Deployment
428432

@@ -577,6 +581,10 @@ controller:
577581
periodSeconds: 3
578582
timeoutSeconds: 5
579583

584+
# -- Specify image pull policy if default behavior isn't desired.
585+
# Default behavior: latest images will be Always else IfNotPresent.
586+
imagePullPolicy: ""
587+
580588
imagePullSecrets: []
581589

582590
rbac:
@@ -786,6 +794,10 @@ pluginServer:
786794
hub: "" # Will use global.hub if not set
787795
tag: ""
788796

797+
# -- Specify image pull policy if default behavior isn't desired.
798+
# Default behavior: latest images will be Always else IfNotPresent.
799+
imagePullPolicy: ""
800+
789801
imagePullSecrets: []
790802

791803
labels: {}

helm/higress/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The command removes all the Kubernetes components associated with the chart and
4646
| controller.env | object | `{}` | |
4747
| controller.hub | string | `""` | |
4848
| controller.image | string | `"higress"` | |
49+
| controller.imagePullPolicy | string | `""` | Specify image pull policy if default behavior isn't desired. Default behavior: latest images will be Always else IfNotPresent. |
4950
| controller.imagePullSecrets | list | `[]` | |
5051
| controller.labels | object | `{}` | |
5152
| controller.name | string | `"higress-controller"` | |
@@ -98,6 +99,7 @@ The command removes all the Kubernetes components associated with the chart and
9899
| gateway.httpsPort | int | `443` | |
99100
| gateway.hub | string | `""` | |
100101
| gateway.image | string | `"gateway"` | |
102+
| gateway.imagePullPolicy | string | `""` | Specify image pull policy if default behavior isn't desired. Default behavior: latest images will be Always else IfNotPresent. |
101103
| gateway.kind | string | `"Deployment"` | Use a `DaemonSet` or `Deployment` |
102104
| gateway.labels | object | `{}` | Labels to apply to all resources |
103105
| gateway.metrics.enabled | bool | `false` | If true, create PodMonitor or VMPodScrape for gateway |
@@ -270,6 +272,7 @@ The command removes all the Kubernetes components associated with the chart and
270272
| pilot.traceSampling | float | `1` | |
271273
| pluginServer.hub | string | `""` | |
272274
| pluginServer.image | string | `"plugin-server"` | |
275+
| pluginServer.imagePullPolicy | string | `""` | Specify image pull policy if default behavior isn't desired. Default behavior: latest images will be Always else IfNotPresent. |
273276
| pluginServer.imagePullSecrets | list | `[]` | |
274277
| pluginServer.labels | object | `{}` | |
275278
| pluginServer.name | string | `"higress-plugin-server"` | |

0 commit comments

Comments
 (0)