Skip to content

Commit ae052f0

Browse files
committed
Create clean production.yaml
Production.yaml no longer repeats base chart versions (and other items) defined in the RADAR-Kubenetes release. From here on it will only be used to indicate deviations from base.yaml.
1 parent f3b8997 commit ae052f0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

bin/init

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
1010
fi
1111

1212
copy_template_if_absent environments.yaml environments.yaml.tmpl
13-
copy_template_if_absent etc/production.yaml etc/base.yaml
1413
copy_template_if_absent etc/production.yaml.gotmpl etc/base.yaml.gotmpl
14+
create_production_yaml
1515

1616
DNAME="$DNAME" bin/keystore-init
1717
bin/generate-secrets

bin/util.sh

+9
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ copy_template_if_absent() {
4545
fi
4646
}
4747

48+
create_production_yaml() {
49+
copy_template_if_absent etc/production.yaml etc/base.yaml
50+
# only keep the '_install: true/false' fields
51+
tempfile=$(mktemp)
52+
mv etc/production.yaml $tempfile
53+
cat $tempfile | grep -vE "^\s*#" | grep -E "atomicInstall|kubeContext|server_name|maintainer_email" > etc/production.yaml
54+
cat $tempfile | grep -vE "^\s*#" | grep -B 1 --no-group-separator "_install:" >> etc/production.yaml
55+
}
56+
4857
# Copies the template (defined by the given config file with suffix
4958
# ".template") to intended configuration file.
5059
copy_template() {

0 commit comments

Comments
 (0)