-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding empty DEBUG checks * Adding empty DEBUG check and implemented KEYS_LIST="$(build_keys_list $ROOT_KEY $ROOT_KEY_SCHEMA)" * Adding shyaml get-values for selection list * Selection-list converter added * Dash-Param schema option added * Double dash as dash parm default * This was driving me nuts. * Implemented parameter list, updated schema to reflect last to changes, updated README for localscript dev * changed to use ascending numeric order * final clean up * example config files * Removed testing / proofs in helm schema, added dash_type, parameter-list to terraform schema * Fresh eyes - Adding /scripts to appropriate exports * foo / bar example * Adding adding in comments for old function and double dash default mention * Changing echo outputs to use DEEP_DEBUG * Updating Terraform configuration doc * Adding example to yaml * Cleaned up standalone script run * I meet your resolution request and raise you optional args. * EOD clean up * Adding the root_schema_key to function call, and removing ENV set * removing comments * removed NOTES.md
- Loading branch information
1 parent
a7565d4
commit 0ce4623
Showing
13 changed files
with
218 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
helm: | ||
cli: | ||
namespace: bitops | ||
debug: false | ||
atomic: true | ||
options: | ||
release-name: bitops-eks | ||
kubeconfig: | ||
fetch: | ||
enabled: true | ||
cluster-name: bitops-eks |
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,9 @@ | ||
terraform: | ||
cli: | ||
backend-config: | ||
- KEY1=foo | ||
- KEY2=bar | ||
options: | ||
command: apply | ||
version: "0.13.2" | ||
fetch-kubeconfig: false |
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
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,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Convert incoming values (from config file) into normalized CLI options | ||
set -e | ||
|
||
value="$1" | ||
cli_flag="$2" | ||
terminal="$3" | ||
dash_type="$4" | ||
space=" " | ||
|
||
if [ -n "$DEEP_DEBUG" ]; then | ||
echo "converters/parameter-list.sh" | ||
echo " value: $value" | ||
echo " cli_flag: $cli_flag" | ||
echo " terminal: $terminal" | ||
echo " dash_type: $dash_type" | ||
fi | ||
|
||
values=$(echo $value | tr "\n" " " | tr "\- " " " | xargs) | ||
|
||
IFS=" " read -r -a values_array <<< $values | ||
|
||
|
||
OUTPUT= | ||
for i in "${values_array[@]}" | ||
do | ||
# <dashes><schema_parameter><config value> | ||
OUTPUT="$OUTPUT $(echo "$dash_type$cli_flag=\"${i}\"")" | ||
done | ||
# OUTPUT NEEDS TO BE: backend-config="KEY1=VALUE1" backend-config="KEY2=VALUE2" | ||
|
||
echo "$OUTPUT" | ||
|
Oops, something went wrong.