-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathgenerate.sh
executable file
·39 lines (33 loc) · 1010 Bytes
/
generate.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
#! /bin/sh
PATH=../../bin:$PATH
echo_run()
{
echo $@
$@
}
if [ "$1" = "deployed" ]
then
echo_run kubectl apply -f cronjob.yaml
echo_run sleep 150
echo kubectl get
kubectl get cronjob,job,pod,cm,sa,node -o=yaml > cronjob-deployed.yaml
echo_run kubectl delete cronjob hello
echo_run kubectl apply -f nginx.yaml
echo_run sleep 60
kubectl get all,ingress,ingressclass,networkpolicy,ep,endpointslice,cm,sa,node -o=yaml > nginx-deployed-all.yaml
kubectl get all,ingress,ingressclass,networkpolicy,ep,cm,sa,node -o=yaml > nginx-deployed-only-ep.yaml
kubectl get all,ingress,ingressclass,networkpolicy,endpointslice,cm,sa,node -o=yaml > nginx-deployed-only-eps.yaml
echo_run kubectl delete -f nginx.yaml
fi
# Generate the miscellaneous architecture diagrams.
for file in `ls *.yaml`
do
echo_run kube-diagrams -v $file
done
echo_run kube-diagrams -v -o all-in-one \
cronjob.yaml \
limit-ranges.yaml \
network_policies.yaml \
nginx.yaml \
quotas.yaml \
runtime_classes.yaml