This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
Ignore helm charts when scanning manifests #993
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.
At the minute, if you have any Helm charts in the path you give to flux, it'll probably bork. The templated manifests in
<chart>/templates/
will either not parse as yamels, or be applied with weird field values.So: when walking the repo looking for manifests, skip any directory that looks like a chart. What looks like a chart? The telltale things are:
Chart.yaml
file; and,values.yaml
file.Both of these, and only these, are mandatory. Looking for anything else would give false negatives (-> failing to skip a chart); not looking for those would give false positives (-> failing to include a non-chart).
The first commit prepares the ground a little by making the test fixture more varied (i.e., including subdirectories and non-yamels), so chart files can be added to it in the latter commit to verify that everything still works by virtue of the chart being ignored.