[nginx] Split config into multiple files
This commit is contained in:
parent
196de92752
commit
f3d71cf5fe
6 changed files with 116 additions and 66 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue