feat(executor): executor.cache block for provider + module caching (chart 4.8.0) - #293
Draft
TigranKhudav wants to merge 2 commits into
Draft
feat(executor): executor.cache block for provider + module caching (chart 4.8.0)#293TigranKhudav wants to merge 2 commits into
TigranKhudav wants to merge 2 commits into
Conversation
Adds executor.cache.{enabled,path,sizeLimit,existingClaim,providers,
ignoreLockFile,modules}. When enabled the chart mounts one cache volume
(emptyDir with a size limit, or an existing PVC) at executor.cache.path
and sets, in one place, the variables that today have to be assembled
by hand from the docs:
TF_PLUGIN_CACHE_DIR=<path>/plugin-cache
TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE=1 (ignoreLockFile)
TerraformDataDirCacheRoot=<path>/data (modules; executor support required)
Disabled by default; rendering is unchanged for existing values files.
Bumps the chart to 4.8.0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 31, 2026
…ntainer
Terraform/OpenTofu do not create TF_PLUGIN_CACHE_DIR ("the directory must
already exist") and a freshly mounted volume is empty, so init reported
'The specified plugin cache dir ... cannot be opened'. When the cache is
enabled the chart now runs a tiny init container (the executor image
itself, same user) that creates <path>/plugin-cache and <path>/data.
User-supplied executor.initContainers are still rendered after it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Follow-up commit: when |
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.
Summary
Adds an
executor.cacheblock that sets up job-to-job caching for the executor in one place:Today the Provider Cache docs tell users to add a volume, a mount and the env var by hand; it is easy to end up with the volume mounted and the variable missing (which is exactly what we found in our own deployment — the cache dir stayed empty).
modules: truewires the new executor setting that also keeps the modules between jobs of the same workspace; older executor images simply ignore that variable.Disabled by default: rendering is byte-for-byte unchanged for existing values files (
helm templatediff is empty).values.schema.json, the README values table and the chart version (4.8.0) are updated.Test plan
helm linthelm templatewith the default values → no cache env/volume rendered--set executor.cache.enabled=true --set executor.cache.ignoreLockFile=true→ emptyDir volume with sizeLimit, mount at/home/cnb/.terraform.d, the three env vars--set executor.cache.existingClaim=tf-cache --set executor.cache.path=/cache/ --set executor.cache.providers=false→ PVC volume, trailing slash trimmed, onlyTerraformDataDirCacheRootset🤖 Generated with Claude Code