Skip to content

Commit 8e62d3d

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 8e62d3d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-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

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

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

0 commit comments

Comments
 (0)