2016-03-01 01:11:36 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -ueo pipefail
|
|
|
|
|
2016-03-23 15:13:06 +01:00
|
|
|
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:
|
2016-03-23 15:13:06 +01:00
|
|
|
main.conf: ${main_conf}
|
|
|
|
http.conf: ${http_conf}
|
|
|
|
stream.conf: ${stream_conf}
|
2016-03-01 01:11:36 +01:00
|
|
|
EOF
|