From 1f872ebaf5c1b2f2e6ee254b2db8fff3ff786396 Mon Sep 17 00:00:00 2001 From: Rishabh Gupta Date: Thu, 7 Mar 2019 13:47:04 +0530 Subject: [PATCH] Bring back Tiller Signed-off-by: Rishabh Gupta --- .travis.yml | 1 + contrib/deploy.sh | 7 +++---- contrib/install_tiller.sh | 10 ++++++++++ contrib/run_function.sh | 13 ++----------- 4 files changed, 16 insertions(+), 15 deletions(-) create mode 100755 contrib/install_tiller.sh diff --git a/.travis.yml b/.travis.yml index b36a6a1c5..93ee3de60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ script: - ./contrib/lint_chart.sh - ./contrib/get_kind.sh - ./contrib/create_kind_cluster.sh + - ./contrib/install_tiller.sh - ./contrib/deploy.sh - ./contrib/get_faas.sh - ./contrib/run_function.sh diff --git a/contrib/deploy.sh b/contrib/deploy.sh index 49f5c1571..55c21fe89 100755 --- a/contrib/deploy.sh +++ b/contrib/deploy.sh @@ -10,10 +10,9 @@ kubectl -n openfaas create secret generic basic-auth \ --from-literal=basic-auth-user=admin \ --from-literal=basic-auth-password="$PASSWORD" -helm template ./chart/openfaas \ +helm install ./chart/openfaas \ --name openfaas \ --namespace openfaas \ --set basic_auth=true \ - --set functionNamespace=openfaas-fn > ./openfaas.yaml - -kubectl apply -f ./openfaas.yaml \ No newline at end of file + --set functionNamespace=openfaas-fn \ + --wait \ No newline at end of file diff --git a/contrib/install_tiller.sh b/contrib/install_tiller.sh new file mode 100755 index 000000000..4eaa7e41a --- /dev/null +++ b/contrib/install_tiller.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +export KUBECONFIG="$(kind get kubeconfig-path)" + +kubectl -n kube-system create sa tiller \ + && kubectl create clusterrolebinding tiller \ + --clusterrole cluster-admin \ + --serviceaccount=kube-system:tiller + +helm init --skip-refresh --upgrade --service-account tiller --wait diff --git a/contrib/run_function.sh b/contrib/run_function.sh index 6fdbe3b5c..6f889056f 100755 --- a/contrib/run_function.sh +++ b/contrib/run_function.sh @@ -5,16 +5,7 @@ export KUBECONFIG="$(kind get kubeconfig-path)" kubectl rollout status deploy/gateway -n openfaas kubectl port-forward deploy/gateway -n openfaas 8080:8080 & -# Check if Openfaas GW is Up -for i in {1..60}; -do - curl -if 127.0.0.1:8080 - if [ $? == 0 ]; - then - break - fi - sleep 1 -done +sleep 10 # Login in OpenFaas export OPENFAAS_URL=http://127.0.0.1:8080 @@ -24,7 +15,7 @@ faas-cli login --username admin --password $PASSWORD faas-cli deploy --image=functions/alpine:latest --fprocess=cat --name echo # Call echo function -for i in {1..60}; +for i in {1..180}; do curl -if http://127.0.0.1:8080/function/echo if [ $? == 0 ];