This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu -o pipefail | |
CONTAINER_NAME="eap_proxy" | |
IMAGE_NAME="pbrah/eap_proxy-udmpro" | |
IMAGE_TAG="v1.1" | |
container_exists() { | |
podman container inspect "${1}" &>/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 8080; | |
server_name _; | |
access_log off; | |
location /api { | |
api write=off; | |
} | |
location = /dashboard.html { | |
root /usr/share/nginx/html; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First command is adding the sync directive to the keyavl zone | |
# Second command is adding the zone_sync listener and directive that lets NGINX sync the state of the keyval zone. It uses service discovery to find the other NGINX instances based off of a headless service in kubernetes for the nginx-ingress pods. | |
# Third command creates the headless service with port 12345 | |
# Fourth and Fifth apply the service and the nginx-config that includes the stream config for zone_sync and the keyval zones. | |
# sed -i 's/\(.*keyval_zone.*\);/\1 sync;/g' nginx-config.yaml.orig | |
# sed -i 's/\(^data:.*\)/\1 \n stream-snippets:\n resolver kube-dns.kube-system.svc.cluster.local valid=5s;\n\n server {\n listen 0.0.0.0:12345;\n zone_sync;\n zone_sync_server nginx-ingress-headless.nginx-ingress.svc.cluster.local:12345 resolve;\n }\n/g' nginx-config.yaml.orig | |
# cat << EOF >> headless.yaml | |
apiVersion: v1 | |
kind: Service |