tvl-depot/nginx/replace-config

19 lines
425 B
Text
Raw Normal View History

2016-03-01 01:11:36 +01:00
#!/bin/bash
set -ueo pipefail
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)
2016-03-01 01:11:36 +01:00
echo "Replacing nginx configuration ..."
kubectl replace --force -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: nginx-config
data:
main.conf: ${main_conf}
http.conf: ${http_conf}
stream.conf: ${stream_conf}
2016-03-01 01:11:36 +01:00
EOF