-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Julien Bouyoud <jBouyoud@users.noreply.github.com>
- Loading branch information
Showing
15 changed files
with
304 additions
and
82 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
#!/usr/bin/env sh | ||
|
||
_file_custom_get() { | ||
helm template "${SCRIPT_DIR}/lib/file/helm-values-getter" -f "${1}" | | ||
sed -E -e "s/^# Source: .+$//" -e "s/^---$//" | ||
uri="${1}" | ||
tmpfile="$(_file_tmpfile "${2}")" | ||
res="${3}" | ||
|
||
helm template "${SCRIPT_DIR}/lib/file/helm-values-getter" -f "${uri}" 2>/dev/null | | ||
sed -E -e "s/^# Source: .+$//" -e "s/^---$//" >"${tmpfile}" | ||
|
||
if [ -s "${tmpfile}" ]; then | ||
echo "${tmpfile}" >>"${res}" | ||
fi | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ingress: | ||
annotations: | ||
config-dir/a.yaml: 'true' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ingress: | ||
annotations: | ||
config-dir/b.yaml: 'true' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ingress: | ||
annotations: | ||
config-dir/c.yaml: 'true' |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,18 @@ | ||
|
||
assert-downloader-output-base() { | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/rand-assets/values.yaml'..." | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/assets/values.yaml'..." | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/assets/\${chart}.yaml'..." | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/assets/\${release}.yaml'..." | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/assets/\${CUSTOM_ENV_VAR}.yaml'..." | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/assets/\${namespace}/values.yaml'..." | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/assets/\${namespace}/\${chart}.yaml'..." | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/assets/\${namespace}/\${release}.yaml'..." | ||
assert_output --partial "[config-scheme][downloader] Looking for '${TEST_TEMP_DIR}/assets/\${namespace}/\${CUSTOM_ENV_VAR}.yaml'..." | ||
|
||
assert_file_not_exist "${HELM_CONFIG_SCHEME_TMP_DIR}" | ||
} | ||
|
||
assert-downloader-output() { | ||
assert-downloader-output-base | ||
assert_file_not_exist "${HELM_CONFIG_SCHEME_TMP_DIR}" | ||
|
||
namespace="${1}" | ||
chart="${2}" | ||
release="${3}" | ||
env="${4}" | ||
assert_output --partial "[config-scheme][downloader] Ignored config source : ${TEST_TEMP_DIR}/rand-assets/values.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loaded config source : ${TEST_TEMP_DIR}/assets/values.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loaded config source : ${TEST_TEMP_DIR}/assets/${chart}.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loaded config source : ${TEST_TEMP_DIR}/assets/${release}.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loaded config source : ${TEST_TEMP_DIR}/assets/${env}.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loaded config source : ${TEST_TEMP_DIR}/assets/${namespace}/values.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loaded config source : ${TEST_TEMP_DIR}/assets/${namespace}/${chart}.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loaded config source : ${TEST_TEMP_DIR}/assets/${namespace}/${release}.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loaded config source : ${TEST_TEMP_DIR}/assets/${namespace}/${env}.yaml" | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/rand-assets/values.yaml' skipped." | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/assets/values.yaml' done. 1 file(s) loaded." | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/assets/${chart}.yaml' done. 1 file(s) loaded." | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/assets/${release}.yaml' done. 1 file(s) loaded." | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/assets/${env}.yaml' done. 1 file(s) loaded." | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/assets/${namespace}/values.yaml' done. 1 file(s) loaded." | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/assets/${namespace}/${chart}.yaml' done. 1 file(s) loaded." | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/assets/${namespace}/${release}.yaml' done. 1 file(s) loaded." | ||
assert_output --partial "[config-scheme][downloader] Loading values for '${TEST_TEMP_DIR}/assets/${namespace}/${env}.yaml' done. 1 file(s) loaded." | ||
} |
Oops, something went wrong.