Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create minimal production.yaml #319

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/init
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
fi

copy_template_if_absent environments.yaml environments.yaml.tmpl
copy_template_if_absent etc/production.yaml etc/base.yaml
copy_template_if_absent etc/production.yaml.gotmpl etc/base.yaml.gotmpl
create_production_yaml

DNAME="$DNAME" bin/keystore-init
bin/generate-secrets
8 changes: 8 additions & 0 deletions bin/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ copy_template_if_absent() {
fi
}

create_production_yaml() {
copy_template_if_absent etc/production.yaml etc/base.yaml
tempfile=$(mktemp)
mv etc/production.yaml $tempfile
# remove all '_chart_version' fields
cat $tempfile | grep -v _chart_version > etc/production.yaml
}

# Copies the template (defined by the given config file with suffix
# ".template") to intended configuration file.
copy_template() {
Expand Down
Loading