Skip to content
Snippets Groups Projects
Commit 98864ccc authored by Mart van Santen's avatar Mart van Santen
Browse files

Processed comments

parent 89e1c261
No related branches found
No related tags found
1 merge request!50Implemente basic flask + database APIs
......@@ -2,18 +2,39 @@
host=$1
namespace=$2
if [ "x$host" == "x" ]
then
echo "Please give host of kubernetes master as argument"
exit
echo "Please give host of kubernetes master as argument."
echo " "
echo $0 hostname [namespace]
exit 1
fi
if [ "x$namespace" == "x" ]
then
namespace="stackspin"
fi
admin=`ssh $host -lroot kubectl get service -n $namespace |grep single-sign-on-kratos-admin | awk '{print $3'}`
public=`ssh $host -lroot kubectl get service -n $namespace |grep single-sign-on-kratos-public | awk '{print $3}'`
hydra=`ssh $host -lroot kubectl get service -n $namespace |grep single-sign-on-hydra-admin | awk '{print $3}'`
psql=`ssh $host -lroot kubectl get service -n $namespace |grep single-sign-on-postgres|grep -v headless | awk '{print $3}'`
if [ "x$admin" == 'x' ]
then
echo "It seems we where not able connect at least one of the ports"
echo " please make sure that kubectl use the right namespace by default."
echo " normally this is 'stackspin'. If you use a different namespace"
echo " please provide this as second argument"
exit 1
fi
admin=`ssh $host -lroot kubectl get service -n oas|grep single-sign-on-kratos-admin | awk '{print $3'}`
public=`ssh $host -lroot kubectl get service -n oas|grep single-sign-on-kratos-public | awk '{print $3}'`
hydra=`ssh $host -lroot kubectl get service -n oas|grep single-sign-on-hydra-admin | awk '{print $3}'`
psql=`ssh $host -lroot kubectl get service -n oas|grep single-sign-on-postgres|grep -v headless | awk '{print $3}'`
echo $admin
echo "
kratos admin port will be at localhost: 8000
......@@ -22,5 +43,4 @@ hydra admin port will be at localhost:4445
psql port will be at localhost:5432
"
ssh -L 8000:$admin:80 -L 8080:$public:80 -L 4445:$hydra:4445 -L 5432:$psql:5432 root@$host
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment