Skip to content
2 changes: 2 additions & 0 deletions charts/gateway-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ To uninstall the chart:
| deployment.ports[3].targetPort | int | `19001` | |
| deployment.priorityClassName | string | `nil` | |
| deployment.replicas | int | `1` | |
| global.imagePullSecrets | list | `[]` | Global override for image pull secrets |
| global.imageRegistry | string | `""` | Global override for image registry |
| global.images.envoyGateway.image | string | `nil` | |
| global.images.envoyGateway.pullPolicy | string | `nil` | |
| global.images.envoyGateway.pullSecrets | list | `[]` | |
Expand Down
84 changes: 66 additions & 18 deletions charts/gateway-helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,37 +65,90 @@ Create the name of the service account to use
The name of the Envoy Gateway image.
*/}}
{{- define "eg.image" -}}
{{- if .Values.deployment.envoyGateway.image.repository }}
{{- .Values.deployment.envoyGateway.image.repository }}:{{ .Values.deployment.envoyGateway.image.tag | default .Values.global.images.envoyGateway.tag | default .Chart.AppVersion }}
{{- else if .Values.global.images.envoyGateway.image }}
{{- .Values.global.images.envoyGateway.image }}
{{- else }}
{{/* if deployment-specific repository is defined, it takes precedence */}}
{{- if .Values.deployment.envoyGateway.image.repository -}}
{{/* if global.imageRegistry is defined, it takes precedence always */}}
{{- if .Values.global.imageRegistry -}}
{{- $repositoryParts := splitn "/" 2 .Values.deployment.envoyGateway.image.repository -}}
{{- $registryName := .Values.global.imageRegistry -}}
{{- $repositoryName := $repositoryParts._1 -}}
{{- $imageTag := default .Chart.AppVersion .Values.deployment.envoyGateway.image.tag -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $imageTag -}}
{{/* if global.imageRegistry is undefined, take repository as is */}}
{{- else -}}
{{- $imageTag := default .Chart.AppVersion .Values.deployment.envoyGateway.image.tag -}}
{{- printf "%s:%s" .Values.deployment.envoyGateway.image.repository $imageTag -}}
{{- end -}}
{{/* else, global image is used if defined */}}
{{- else if .Values.global.images.envoyGateway.image -}}
{{- $imageParts := splitn "/" 2 .Values.global.images.envoyGateway.image -}}
{{/* if global.imageRegistry is defined, it takes precedence always */}}
{{- $registryName := default $imageParts._0 .Values.global.imageRegistry -}}
{{- $repositoryTag := $imageParts._1 -}}
{{- $repositoryParts := splitn ":" 2 $repositoryTag -}}
{{- $repositoryName := $repositoryParts._0 -}}
{{- $imageTag := $repositoryParts._1 -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $imageTag -}}
{{- else -}}
docker.io/envoyproxy/gateway:{{ .Chart.Version }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}

{{/*
Pull policy for the Envoy Gateway image.
*/}}
{{- define "eg.image.pullPolicy" -}}
{{ .Values.deployment.envoyGateway.imagePullPolicy | default .Values.global.images.envoyGateway.pullPolicy | default "IfNotPresent" }}
{{- default .Values.deployment.envoyGateway.imagePullPolicy .Values.global.images.envoyGateway.pullPolicy -}}
{{- end }}

{{/*
Pull secrets for the Envoy Gateway image.
*/}}
{{- define "eg.image.pullSecrets" -}}
{{- if .Values.deployment.envoyGateway.imagePullSecrets -}}
{{- if .Values.global.imagePullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.global.imagePullSecrets }}
{{- else if .Values.deployment.envoyGateway.imagePullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.deployment.envoyGateway.imagePullSecrets }}
{{- else if .Values.global.images.envoyGateway.pullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.global.images.envoyGateway.pullSecrets }}
{{- else -}}
imagePullSecrets: []
imagePullSecrets: {{ toYaml list }}
{{- end }}
{{- end }}

{{/*
The name of the Envoy Ratelimit image.
*/}}
{{- define "eg.ratelimit.image" -}}
{{- $imageParts := splitn "/" 2 .Values.global.images.ratelimit.image -}}
{{/* if global.imageRegistry is defined, it takes precedence always */}}
{{- $registryName := default $imageParts._0 .Values.global.imageRegistry -}}
{{- $repositoryTag := $imageParts._1 -}}
{{- $repositoryParts := splitn ":" 2 $repositoryTag -}}
{{- $repositoryName := $repositoryParts._0 -}}
{{- $imageTag := default "master" $repositoryParts._1 -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $imageTag -}}
{{- end -}}

{{/*
Pull secrets for the Envoy Ratelimit image.
*/}}
{{- define "eg.ratelimit.image.pullSecrets" -}}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.global.imagePullSecrets }}
{{- else if .Values.global.images.ratelimit.pullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.global.images.ratelimit.pullSecrets }}
{{- else }}
imagePullSecrets: {{ toYaml list }}
{{- end }}
{{- end }}


{{/*
The default Envoy Gateway configuration.
*/}}
Expand All @@ -105,15 +158,10 @@ provider:
kubernetes:
rateLimitDeployment:
container:
{{- if .Values.global.images.ratelimit.image }}
image: {{ .Values.global.images.ratelimit.image }}
{{- else }}
image: "docker.io/envoyproxy/ratelimit:master"
{{- end }}
{{- with .Values.global.images.ratelimit.pullSecrets }}
image: {{ include "eg.ratelimit.image" . }}
{{- if (or .Values.global.imagePullSecrets .Values.global.images.ratelimit.pullSecrets) }}
pod:
imagePullSecrets:
{{- toYaml . | nindent 10 }}
{{- include "eg.ratelimit.image.pullSecrets" . | nindent 8 }}
{{- end }}
{{- with .Values.global.images.ratelimit.pullPolicy }}
patch:
Expand Down
13 changes: 11 additions & 2 deletions charts/gateway-helm/values.tmpl.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# The global settings for the Envoy Gateway Helm chart.
# These values will be used if the values are not overridden in the other sections.
# Global settings
global:
# If set, these take highest precedence and change both envoyGateway and ratelimit's container registry and pull secrets.
# -- Global override for image registry
imageRegistry: ""
# -- Global override for image pull secrets
imagePullSecrets: []

# If set, these override image-specific values: useful when installing the chart in a private registry environment.
# Override image-specific values directly if a global override is not desired.
images:
envoyGateway:
# This is the full image name including the hub, repo, and tag.
Expand All @@ -18,13 +25,15 @@ global:
pullPolicy: IfNotPresent
# List of secrets in the same namespace of the component that can be used to pull images from private repositories.
pullSecrets: []

podDisruptionBudget:
minAvailable: 0
# maxUnavailable: 1

deployment:
envoyGateway:
image:
# if both this and global.imageRegistry are specified, this has to include both registry and repository explicitly, eg docker.io/envoyproxy/gateway
repository: ""
tag: ""
imagePullPolicy: ""
Expand Down
2 changes: 2 additions & 0 deletions release-notes/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ new features: |
Added support for egctl Websocket in addation to SPDY
Added a configuration option in the Helm chart to set the TrafficDistribution field in the Envoy Gateway Service
Added support for setting the log level to trace for the Envoy Proxy
Added support for global imageRegistry and imagePullSecrets to the Helm chart
Added support for using a local JWKS in an inline string or in a ConfigMap to validate JWT tokens in SecurityPolicy


bug fixes: |
Fix traffic splitting when filters are attached to the backendRef.
Added support for Secret and ConfigMap parsing in Standalone mode.
Expand Down
2 changes: 2 additions & 0 deletions site/content/en/latest/install/gateway-helm-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ The Helm chart for Envoy Gateway
| deployment.ports[3].targetPort | int | `19001` | |
| deployment.priorityClassName | string | `nil` | |
| deployment.replicas | int | `1` | |
| global.imagePullSecrets | list | `[]` | Global override for image pull secrets |
| global.imageRegistry | string | `""` | Global override for image registry |
| global.images.envoyGateway.image | string | `nil` | |
| global.images.envoyGateway.pullPolicy | string | `nil` | |
| global.images.envoyGateway.pullSecrets | list | `[]` | |
Expand Down
3 changes: 2 additions & 1 deletion test/helm/gateway-helm/certgen-args.in.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ global:
envoyGateway:
image: "docker.io/envoyproxy/gateway-dev:latest"
pullPolicy: Always

certgen:
job:
args:
- --overwrite
- --overwrite
3 changes: 2 additions & 1 deletion test/helm/gateway-helm/certjen-custom-scheduling.in.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ global:
envoyGateway:
image: "docker.io/envoyproxy/gateway-dev:latest"
pullPolicy: Always

certgen:
job:
affinity:
Expand All @@ -18,4 +19,4 @@ certgen:
- effect: NoSchedule
key: taint1
operator: Equal
value: tol1
value: tol1
1 change: 1 addition & 0 deletions test/helm/gateway-helm/control-plane-with-pdb.in.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ global:
envoyGateway:
image: "docker.io/envoyproxy/gateway-dev:latest"
pullPolicy: Always

podDisruptionBudget:
minAvailable: 1
maxUnavailable: 1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ global:
envoyGateway:
image: "docker.io/envoyproxy/gateway-dev:latest"
pullPolicy: Always

deployment:
pod:
affinity:
Expand Down
1 change: 1 addition & 0 deletions test/helm/gateway-helm/deployment-priorityclass.in.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ global:
envoyGateway:
image: "docker.io/envoyproxy/gateway-dev:latest"
pullPolicy: Always

deployment:
priorityClassName: system-cluster-critical
5 changes: 5 additions & 0 deletions test/helm/gateway-helm/deployment-repo-no-registry.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deployment:
envoyGateway:
image:
repository: "envoy/gateway"
tag: "abcdef"
Loading