Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 0e2d4b6

Browse files
committed
For #131: Update deployment scripts
1 parent be1121a commit 0e2d4b6

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

deployment/deploy-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -e
33
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
44
pushd "$SCRIPT_DIR"
55
./create-eks.sh
6+
./deploy-nginx.sh
67
./deploy-presidio.sh
78
./deploy-dlp-trigger.sh
89
popd

deployment/deploy-dlp-trigger.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,22 @@ set -e
33
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
44
source "$SCRIPT_DIR/env.sh"
55

6-
analyzer_hostname=$(kubectl get service presidio-presidio-analyzer \
7-
--namespace presidio \
8-
--output jsonpath='{.status.loadBalancer.ingress[0].hostname}')
9-
export PRESIDIO_ENDPOINT=http://$analyzer_hostname/analyze
6+
analyzer_hostname=""
7+
while [ -z $analyzer_hostname ]; do
8+
echo "Waiting for end point..."
9+
analyzer_hostname=$(kubectl get ingress presidio-ingress \
10+
-n presidio \
11+
--output jsonpath='{.status.loadBalancer.ingress[0].hostname}' \
12+
)
13+
[ -z "$analyzer_hostname" ] && sleep 5
14+
done
15+
16+
endpoint_basepath=$(kubectl get ingress presidio-ingress \
17+
-n presidio \
18+
--output jsonpath='{.spec.rules[0].http.paths[0].backend.serviceName}' \
19+
)
20+
21+
export PRESIDIO_ENDPOINT=https://$analyzer_hostname/$endpoint_basepath/analyze
1022

1123
pushd "${SCRIPT_DIR}/.."
1224
serverless deploy

deployment/deploy-nginx.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Add Helm Repo
2+
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
3+
# Install NGINX
4+
helm install nginx-ingress ingress-nginx/ingress-nginx \
5+
--namespace ingress-basic \
6+
--create-namespace \
7+
--set controller.replicaCount=2 \
8+
--set controller.nodeSelector."beta\.kubernetes\.io/os"=linux \
9+
--set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=linux \
10+
--set controller.admissionWebhooks.patch.nodeSelector."beta\.kubernetes\.io/os"=linux \
11+
--wait || true

deployment/deploy-presidio.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ set -e
33
REGISTRY=${1:-mcr.microsoft.com}
44
TAG=${2:-latest}
55
RELEASE=${3:-presidio}
6-
helm install $RELEASE --set registry=$REGISTRY,tag=$TAG ./charts/presidio --namespace presidio --create-namespace
6+
helm upgrade $RELEASE --set registry=$REGISTRY,tag=$TAG ./charts/presidio --namespace presidio --create-namespace --install

0 commit comments

Comments
 (0)