Skip to content

Commit 3be3181

Browse files
Tamás Hódirolandszoke
authored andcommitted
add cb
1 parent 91ad9c1 commit 3be3181

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

istio_examples/RouteRule/api/ingress.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apiVersion: extensions/v1beta1
22
kind: Ingress
33
metadata:
4-
name: api
4+
name: gateway
55
annotations:
6-
ingress.kubernetes.io/rewrite-target: /
6+
kubernetes.io/ingress.class: "istio"
77
spec:
88
rules:
99
- http:

istio_examples/RouteRule/deploy.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ for SERVICE_NAME in "${SERVICE_NAMES[@]}"; do
1313
kubectl apply -f <(istioctl kube-inject -f ../service.yml)
1414
done
1515

16-
API_URL=$(kubectl get svc api -o jsonpath='{.status.loadBalancer.ingress[0].ip}':5000)
16+
kubectl delete ingress gateway
17+
kubectl apply -f <(istioctl kube-inject -f $DIR/api/ingress.yml)
18+
19+
INGRESS_IP=""
20+
while [ -z $INGRESS_IP ]; do
21+
sleep 10
22+
INGRESS_IP=$(kubectl get ingress gateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
23+
done
24+
25+
API_URL="http://$INGRESS_IP"
1726
kubectl patch deployment ui --patch '{"spec": {"template": {"spec": {"containers": [{"name": "ui", "env":[{"name": "REACT_APP_API_URL", "value": "'$API_URL'"}]}]}}}}'
1827

1928
kubectl delete routerule -l app=api

0 commit comments

Comments
 (0)