-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy_operator.sh
executable file
·38 lines (31 loc) · 1.08 KB
/
deploy_operator.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
#!/bin/bash
action=$1
if [ $action == "create" ]
then
git clone [email protected]:jaegertracing/jaeger-operator.git
action='apply'
fi
if [ $action == "apply" ]
then
cd jaeger-operator
#deploy jaeger operator
kubectl create ns observability
kubectl create -n observability -f deploy/crds/jaegertracing.io_jaegers_crd.yaml
kubectl create -n observability -f deploy/service_account.yaml
kubectl create -n observability -f deploy/role.yaml
kubectl create -n observability -f deploy/role_binding.yaml
kubectl create -n observability -f deploy/operator.yaml
cd ../
kubectl apply -f all-in-one-with-options.yaml
elif [ $action == "delete" ]
then
cd jaeger-operator
kubectl delete -n observability -f deploy/crds/jaegertracing.io_jaegers_crd.yaml
kubectl delete -n observability -f deploy/service_account.yaml
kubectl delete -n observability -f deploy/role.yaml
kubectl delete -n observability -f deploy/role_binding.yaml
kubectl delete -n observability -f deploy/operator.yaml
cd ../
kubectl delete -f all-in-one-with-options.yaml
kubectl delete ns observability
fi