feat(chart): Allow configuring envoy proxy image via helm chart#8785
feat(chart): Allow configuring envoy proxy image via helm chart#8785mgs255 wants to merge 3 commits intoenvoyproxy:mainfrom
Conversation
This commit is a continuation of the previous work to support supplying default proxy settings added in envoyproxy#7698 and adds three new chart values under `global.images.envoyProxy`: | Value | Type | Default | Description | |----------------------------------------|--------|------|---------------------------------------------------------------------| | `global.images.envoyProxy.image` | string | `""` | Full image name (`registry/repo:tag`) for the Envoy Proxy container | | `global.images.envoyProxy.pullPolicy` | string | `""` | Image pull policy | | `global.images.envoyProxy.pullSecrets` | list | `[]` | Image pull secrets | When any of these are set, the chart generates an `envoyProxy:` block inside the `EnvoyGateway` ConfigMap, wiring into the existing `EnvoyGatewaySpec.envoyProxy` field (added in envoyproxy#7698). The global `imageRegistry` override takes highest precedence, consistent with other chart components. Full EnvoyProxy defaults (replicas, resources, etc.) can be provided via `config.envoyGateway.envoyProxy`; the image values are merged on top. Closes envoyproxy#4764. Signed-off-by: Michael Sommerville <msommerville@gmail.com>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f65bd6a196
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| {{- $deployment := dict "container" $container }} | ||
| {{- if or .Values.global.imagePullSecrets .Values.global.images.envoyProxy.pullSecrets }} | ||
| {{- $pullSecretsYaml := include "eg.envoyProxy.image.pullSecrets" . }} | ||
| {{- $pullSecrets := dict "imagePullSecrets" ($pullSecretsYaml | fromYamlArray) }} |
There was a problem hiding this comment.
Decode pull secrets as map before extracting list
This parses the helper output with fromYamlArray, but eg.envoyProxy.image.pullSecrets renders a YAML object (imagePullSecrets: ...), not a top-level YAML array. Helm’s fromYamlArray only converts YAML arrays, so when users set global.imagePullSecrets or global.images.envoyProxy.pullSecrets, this conversion can yield an invalid/empty value and the generated envoyProxy.provider.kubernetes.envoyDeployment.pod.imagePullSecrets will not be populated as intended.
Useful? React with 👍 / 👎.
| {{- if .Values.global.images.envoyProxy.image }} | ||
| {{- $container := dict "image" (include "eg.envoyProxy.image" .) }} | ||
| {{- if .Values.global.images.envoyProxy.pullPolicy }} | ||
| {{- $_ := set $container "imagePullPolicy" .Values.global.images.envoyProxy.pullPolicy }} |
There was a problem hiding this comment.
Allow pull policy/secret overrides without image override
The pullPolicy and pullSecrets wiring is nested under if .Values.global.images.envoyProxy.image, so these new values are ignored unless global.images.envoyProxy.image is also set. In practice, users cannot set only pull policy or pull secrets while keeping Envoy Gateway’s default proxy image, even though those values were added as independent chart knobs.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8785 +/- ##
=======================================
Coverage 73.64% 73.64%
=======================================
Files 245 245
Lines 48864 48864
=======================================
Hits 35985 35985
Misses 10874 10874
Partials 2005 2005 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
thanks ! can you add some tests |
Signed-off-by: Michael Sommerville <msommerville@gmail.com>
This commit is a continuation of the previous work to support supplying default proxy settings added in #7698 and adds three new chart values under
global.images.envoyProxy:global.images.envoyProxy.image""registry/repo:tag) for the Envoy Proxy containerglobal.images.envoyProxy.pullPolicy""global.images.envoyProxy.pullSecrets[]When any of these are set, the chart generates an
envoyProxy:block inside theEnvoyGatewayConfigMap, wiring into the existingEnvoyGatewaySpec.envoyProxyfield (added in #7698). The globalimageRegistryoverride takes highest precedence, consistent with other chart components.Full EnvoyProxy defaults (replicas, resources, etc.) can be provided via
config.envoyGateway.envoyProxy; the image values are merged on top.Closes #4764.