feat: support templating in extraInitContainers#399
feat: support templating in extraInitContainers#399jwoloch wants to merge 4 commits intooauth2-proxy:mainfrom
Conversation
Enable Helm template expressions in extraInitContainers by wrapping toYaml output with tpl function, allowing dynamic values from release metadata, config maps, and secrets. Signed-off-by: Józef Wołoch <jozek.woloch@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds Helm templating support to the extraInitContainers chart value so users can reference release metadata and other templated values inside init container definitions.
Changes:
- Wrap
extraInitContainersrendering withtplto evaluate Helm template expressions. - Bump chart version and update Artifact Hub changelog entry for the release.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
helm/oauth2-proxy/templates/deployment.yaml |
Evaluates templated content in extraInitContainers via tpl when rendering the Deployment. |
helm/oauth2-proxy/Chart.yaml |
Updates chart version and Artifact Hub changes annotation for the new behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
helm/oauth2-proxy/Chart.yaml
Outdated
| @@ -1,5 +1,5 @@ | |||
| name: oauth2-proxy | |||
| version: 10.3.0 | |||
| version: 10.3.1 | |||
There was a problem hiding this comment.
Chart version bump looks like a SemVer patch (10.3.0 -> 10.3.1), but this PR introduces new functionality (templating support in extraInitContainers). Per SemVer and the repo's versioning guidance, consider bumping the minor version instead (or clarify why this is treated as a patch-level change).
| version: 10.3.1 | |
| version: 10.4.0 |
| - kind: added | ||
| description: Add tpl support for config.cookieName, config.existingSecret, customLabels, image.registry, imagePullSecrets, and networkPolicy.ingress/egress | ||
| - kind: changed | ||
| description: feat: support templating in extraInitContainers |
There was a problem hiding this comment.
This change adds templating support for the existing extraInitContainers value, but the user-facing docs don’t mention that extraInitContainers now supports tpl (unlike extraEnv, which is documented in the chart README). Please update the chart documentation (README and/or the values.yaml comments) to reflect the new templating behavior and any gotchas (e.g., {{ ... }} sequences will now be evaluated).
| description: feat: support templating in extraInitContainers | |
| description: feat: support templating in extraInitContainers (values are now rendered with tpl, so {{ ... }} sequences will be evaluated as Helm templates rather than treated as literal text) |
|
@jwoloch, can you check the Copilot conversation? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -31,7 +31,7 @@ kubeVersion: ">=1.16.0-0" | |||
| annotations: | |||
| artifacthub.io/changes: | | |||
| - kind: changed | |||
There was a problem hiding this comment.
The Artifact Hub changelog entry uses kind: changed, but this PR adds new functionality (templating support) rather than modifying existing behavior for default values. Consider using kind: added to better reflect the nature of the change in release notes.
| - kind: changed | |
| - kind: added |
|
Could we stop opening a single PRs for each next element we want to add |
Description
Enable Helm template expressions in extraInitContainers by wrapping toYaml output with tpl function, allowing dynamic values from release metadata, config maps, and secrets.
Checklist: