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.
In order to maintain predictable deployments, as developer I want to generate and use "lock files" for all chart versions retrieved from a helmfile.
This change solves it by (1)enhancing
helmfile deps
to generate a lock file containing all the direct chart dependencies of each helmfile state file and(2)making other helmfile sub-commands reads the lock file and merge the locked version numbers to the helmfile state file being processed.
The lock file is named after the helmfile state file being locked, so that you can have multiple set of the helmfile state file and the lock file pairs in a directory.
When
helmfile deps
are not explicitly run before commands likesync
, all the helmfile behavior should remain as before.Let's say you have
helmfile.1.yaml
:helmfile deps
generateshelmfile.1.lock
that looks like:Under the hood,
helmfile deps
creates a temporary local helm chart with a dummyChart.yaml
andrequirements.yaml
deduced from thehelmfile.yaml
content, then runshelm dependency update
to produce and update the correspondingrequirements.lock
file.helmfile
then renames it to match the name of the targeted helmfile state file and moves it, so that it becomes adjacent to eachhelmfile.yaml
.Other
helmfile
commands likesync
,diiff
,apply
,lint
read chart version numbers from the lock file.Resolves #483
Resolves #563