UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit ff1b4cb9 authored by Micah Nagel's avatar Micah Nagel :moneybag:
Browse files

Add basic values translation script, example 1.x defaults

parent d229b4aa
No related branches found
No related tags found
1 merge request!2687Add basic values translation script, example 1.x defaults
---
revision_date: Last edited April 13, 2023
revision_date: Last edited April 14, 2023
tags:
- blog
---
......@@ -19,7 +19,7 @@ As mentioned in the first post, a number of values keys will be changing in orde
- `mattermostoperator` -> `mattermostOperator`
- `nexus` -> `nexusRepositoryManager`
Note that your upgrade to 2.0 will fail if you do not modify your values as seen above. Big Bang is now maintaining a [values schema](https://helm.sh/docs/topics/charts/#schema-files) to enforce strict adherence to the allowed/required keys within Big Bang. For reference Big Bang's values schema is located [here](https://repo1.dso.mil/big-bang/bigbang/-/blob/master/chart/values.schema.json).
Note that your upgrade to 2.0 will fail if you do not modify your values as seen above. Big Bang is now maintaining a [values schema](https://helm.sh/docs/topics/charts/#schema-files) to enforce strict adherence to the allowed/required keys within Big Bang. For reference Big Bang's values schema is located [here](https://repo1.dso.mil/big-bang/bigbang/-/blob/master/chart/values.schema.json). You can also leverage the script in `/scripts/values-translate-2-0.sh <values file path>` to perform these translations for you (note that this is a relatively simple script and may not work for your use case).
## Namespace Changes
......@@ -49,7 +49,7 @@ As mentioned in the previous post - Big Bang will deploy by default with a new o
- Gatekeeper: Set `gatekeeper.enabled` and `clusterAuditor.enabled` to true; set `kyverno.enabled`, `kyvernoReporter.enabled`, and `kyvernoPolicies.enabled` to false
- Jaeger: Set `jaeger.enabled` to true; set `tempo.enabled` to false
Provided you make the above adjustments you will be able to deploy with the same set of packages you were using in 1.x.
Provided you make the above adjustments you will be able to deploy with the same set of packages you were using in 1.x. Example values for each of the above are provided in a reference file [here](../docs/assets/configs/example/core-packages-1-x.yaml).
## HelmRelease / GitRepository Name Changes
......
# 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
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."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment