about summary refs log tree commit diff
path: root/nginx/replace-config
blob: 5640b8200aa0b77213c3db69a3148c164eaaf919 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
set -ueo pipefail

readonly server_conf=$(cat server.conf | base64 -w0)

echo "Replacing nginx configuration ..."
kubectl replace --force -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: nginx-config
data:
  server.conf: ${server_conf}
EOF