-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunnerfile.sh
48 lines (39 loc) · 1.2 KB
/
runnerfile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
task_setup() {
kubectl create namespace sock-shop
kubectl label namespace sock-shop istio-injection=enabled
kubectl apply -f json-lua/json-lua-configmap.yml
kubectl apply -f sock-shop/complete-demo-custom2.yml
kubectl apply -f sock-shop/istio-gw.yml
kubectl apply -f my-envoy-filter.yml
}
task_default() {
task_deploy
}
task_log() {
pod_name=$(kubectl get pod -n sock-shop | grep front-end | awk '{print $1}')
kubectl logs $pod_name -n sock-shop -c istio-proxy | grep lua
}
task_log2() {
pod_name=$(kubectl get pod -n sock-shop | grep front-end | awk '{print $1}')
kubectl logs $pod_name -n sock-shop -c istio-proxy -f | grep -v lua
}
task_tail() {
pod_name=$(kubectl get pod -n sock-shop | grep front-end | awk '{print $1}')
kubectl logs $pod_name -n sock-shop -c istio-proxy -f | grep lua
}
task_logs() {
task_log
}
task_deploy() {
kubectl apply -f my-envoy-filter.yml
kubectl get envoyfilter
}
task_gen() {
basedir=custom-istio
istioctl kube-inject \
--injectConfigFile $basedir/inject-config.yml \
--meshConfigFile $basedir/mesh-config.yml \
--valuesFile $basedir/inject-values.yml \
--filename sock-shop/complete-demo.yml > sock-shop/complete-demo-custom.yml
env/bin/python istio-customizer.py
}