forked from DoD-Platform-One/bigbang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2-0-translate-script' into 'master'
Add basic values translation script, example 1.x defaults See merge request big-bang/bigbang!2687
- Loading branch information
Showing
3 changed files
with
89 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Runtime Security | ||
twistlock: | ||
enabled: true | ||
neuvector: | ||
enabled: false | ||
|
||
# Log Forwarding | ||
fluentbit: | ||
enabled: true | ||
promtail: | ||
enabled: false | ||
|
||
# Log Storage | ||
elasticsearchKibana: | ||
enabled: true | ||
loki: | ||
enabled: false | ||
|
||
# Policy Enforcement | ||
gatekeeper: | ||
enabled: true | ||
clusterAuditor: | ||
enabled: true | ||
kyverno: | ||
enabled: false | ||
kyvernoReporter: | ||
enabled: false | ||
kyvernoPolicies: | ||
enabled: false | ||
|
||
# Tracing | ||
jaeger: | ||
enabled: true | ||
tempo: | ||
enabled: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
values_file=$1 | ||
|
||
if [ -z $values_file ]; then | ||
echo "This script requires one parameter, the path to your values file. Rerun the script with that parameter, ex: './scripts/values-translate-2-0.sh my-values-file.yaml'." | ||
exit 1 | ||
fi | ||
|
||
if [ ! -f $values_file ]; then | ||
echo "Values file not found, verify that the correct path was provided for your values." | ||
exit 1 | ||
fi | ||
|
||
sed_gsed="sed" | ||
# Verify sed version if on macOS | ||
if [ "$(uname -s)" == "Darwin" ]; then | ||
if command -v gsed >/dev/null 2>&1; then | ||
sed_gsed="gsed" | ||
else | ||
echo "The 'gnu-sed' tool is not installed, but if required when running on macOS. 'gnu-sed' can be installed with 'brew install gnu-sed'." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if ! command -v $sed_gsed >/dev/null 2>&1; then | ||
echo "The 'sed' tool is required to run this script. Please install 'sed' then re-run this script." | ||
exit 1 | ||
fi | ||
|
||
# Update core packages | ||
$sed_gsed -i 's/^istiooperator:$/istioOperator:/' $values_file | ||
$sed_gsed -i 's/^kyvernopolicies:$/kyvernoPolicies:/' $values_file | ||
$sed_gsed -i 's/^kyvernoreporter:$/kyvernoReporter:/' $values_file | ||
$sed_gsed -i 's/^logging:$/elasticsearchKibana:/' $values_file | ||
$sed_gsed -i 's/^eckoperator:$/eckOperator:/' $values_file | ||
# Update addon packages | ||
$sed_gsed -i 's/^\(\s*\)mattermostoperator:$/\1mattermostOperator:/' $values_file | ||
$sed_gsed -i 's/^\(\s*\)nexus:$/\1nexusRepositoryManager:/' $values_file | ||
|
||
echo "Values translation completed successfully - validate that the below translations were completed as expected:" | ||
cat << EOF | ||
Core Packages: | ||
istiooperator -> istioOperator | ||
kyvernopolicies -> kyvernoPolicies | ||
kyvernoreporter -> kyvernoReporter | ||
logging -> elasticsearchKibana | ||
eckoperator -> eckOperator | ||
Addon Packages: | ||
mattermostoperator -> mattermostOperator | ||
nexus -> nexusRepositoryManager | ||
EOF | ||
echo "It is important to validate these and confirm that no other keys were affected." |