[nginx] Split config into multiple files

This commit is contained in:
Vincent Ambo 2016-03-23 15:13:06 +01:00
parent 196de92752
commit f3d71cf5fe
No known key found for this signature in database
GPG key ID: 66F505681DB8F43B
6 changed files with 116 additions and 66 deletions

View file

@ -1,7 +1,9 @@
#!/bin/bash
set -ueo pipefail
readonly server_conf=$(cat server.conf | base64 -w0)
readonly main_conf=$(cat conf/main.conf | base64 -w0)
readonly http_conf=$(cat conf/http.conf | base64 -w0)
readonly stream_conf=$(cat conf/stream.conf | base64 -w0)
echo "Replacing nginx configuration ..."
kubectl replace --force -f - <<EOF
@ -10,5 +12,7 @@ kind: Secret
metadata:
name: nginx-config
data:
server.conf: ${server_conf}
main.conf: ${main_conf}
http.conf: ${http_conf}
stream.conf: ${stream_conf}
EOF