feat(agent): expose initContainers, volumes and volumeMounts passthrough#447
Draft
serialito74 wants to merge 2 commits into
Draft
feat(agent): expose initContainers, volumes and volumeMounts passthrough#447serialito74 wants to merge 2 commits into
serialito74 wants to merge 2 commits into
Conversation
The underlying Helm chart already supports initContainers/volumes/volumeMounts (e.g. the githubTokenInit pattern), but this module rendered a fixed values.yaml with no way to reach them. This blocks any sidecar/init-container use case that needs to run before the agent starts, such as installing a kubelogin exec plugin wrapper for AAD/OIDC-enabled Kubernetes clusters — currently the only way to do that is a manual kubectl patch that gets wiped on every helm upgrade.
…roughs Mirrors the base module's rendered_values/tftest.hcl pattern so init_containers/volumes/volume_mounts have plan-time coverage.
serialito74
marked this pull request as draft
July 21, 2026 18:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds three new inputs to the
nullplatform/agentmodule —init_containers,volumes,volume_mounts(alllist(any), default[]) — and renders them into the agent chart'sinitContainers,volumes, andvolumeMountsvalues viayamlencode(). Nothing renders when the lists are empty, so existing consumers are unaffected.Why
The underlying Helm chart (
nullplatform/helm-chartscharts/agent) already supportsinitContainers,volumes, andvolumeMounts— the same mechanism the chart's owngithubTokenInitfeature builds on — but this module renders a fixedvalues.yamlwith no way to reach them.This blocks any init-container/sidecar use case that has to run before the agent starts. Concretely: on AAD/OIDC-enabled AKS clusters, the agent needs a
kubeloginexec-plugin wrapper installed and a shared volume mounted ontoPATH, or every scope/deployment operation fails withspawn kubelogin ENOENT. Today the only way to get that wrapper in is a manualkubectl patchagainst the agent Deployment — which Helm silently reverts on the nexthelm upgradeof this module, so it has to be reapplied by hand after every apply.No chart change is required —
helm-chartsalready accepts these values; only this module'stemplatefile()needed to pass them through.Changes
variables.tf— newinit_containers,volumes,volume_mountsinputslocals.tf— pass the three intotemplatefile()templates/nullplatform_agent_values.tmpl.yaml— conditionalinitContainers/volumes/volumeMountsblocks viayamlencode()outputs.tf(new) —rendered_valuesoutput, mirroring thebasemodule's pattern, so the template can be asserted on in teststests/agent_values.tftest.hcl(new) — plan-time coverage: blocks omitted by default, rendered correctly when setREADME.md— regenerated viaterraform-docsUsage
Testing
tofu test— 4 passed, 0 failed (init_containers/volumes/volumeMounts omitted by default; rendered correctly when set). Rendered template output also validated against a Python YAML parser to confirm chart-shape correctness (initContainers/volumes/volumeMountsat root, list-of-maps intact).tofu fmtclean.