blob: 2f3e6356ce2572d25bf7c44fa7a02661fb230272 (
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
|
#! /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
}
gen > kaas-auto.conf
|