18 lines
425 B
Bash
Executable file
18 lines
425 B
Bash
Executable file
#!/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)
|
|
|
|
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}
|
|
EOF
|