✨ expose init-shared-path readOnly var #393
Merged
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
By default
init-shared-path
is read-only mounted without the possibility to mount it read-write. This PR expose thereadOnly
setting of thevolumeMount
to be able to manage it through values file.why
We used to build a custom
atlantis
image to be able to embed additional tools required by custom workflows defined server-side (likeaws-cli
orasdf
to handleterraform
,terragrunt
,opentofu
,kubectl
and others). Although it works just fine, we had to maintain our custom image.Since
initConfig
object, we have been able to move the instruction from our customDockerfile
to theinitConfig.script
value.The main issue is that the
initConfig.sharedDir
is mounted read-write on the init container, but is mounted read-only on the main container.As we're using
asdf
is all our repositories with sometimes different versions for each tool, theatlantis
image is installing these different versions ofterraform
/opentofu
/...
during thepre_workflow_hooks
thanks to a.tool-versions
in each repository. Butasdf
require to download and install each version where it was installed (ie in thesharedDir
), thus require read-writevolumeMount
.Today we're using
kustomize
to patch it so that it's mounted correctly, but we're hoping this could be handled directly through the chart itself: