blob: fddb0e0bb6e848d9a07777270d597a0f69e51486 (
plain)
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
|
#! /bin/bash
function oc {
cfg="/root/security/kaas.kit.edu.kubeconfig"
/usr/local/bin/oc --config "$cfg" "$@"
}
function gen {
sites=$(oc get route --all-namespaces | grep -P "^(adei|katrin|status|web) | grep kaas.kit.edu" | awk '{ print $3 }' | cut -d '.' -f 1) # "
for site in $sites; do
adei=$(echo $site | grep -P "^adei-")
url=""
[ -n "$adei" ] && url="/adei"
cat kaas-auto.template | sed -re "s|@name@|$site|g; s|@url@|$url|g"
done
}
function bora {
sites=$(oc get route --all-namespaces | grep -P "^(bora) | grep kaas.kit.edu" | awk '{ print $3 }' | cut -d '.' -f 1) # "
for site in $sites; do
adei=$(echo $site | grep -P "^adei-")
url=""
[ -n "$adei" ] && url="/adei"
cat kaas-auto-bora.template | sed -re "s|@name@|$site|g; s|@url@|$url|g"
done
}
gen > kaas-auto.conf
bora > kaas-auto-bora.conf
|