From b293f4e422cd1fb6983337f91d7edebfd0abefda Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Tue, 17 Aug 2021 16:30:15 +0200
Subject: [PATCH] Check is namespace exists before creating

---
 install/install-openappstack.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/install-openappstack.sh b/install/install-openappstack.sh
index 953072c08..6a8475d2e 100755
--- a/install/install-openappstack.sh
+++ b/install/install-openappstack.sh
@@ -17,8 +17,8 @@ branch=${CI_COMMIT_REF_NAME:-}
 echo "Tracking branch $branch for https://open.greenhost.net/openappstack/openappstack flux repo"
 
 # Create oas and oas-apps namespaces
-kubectl create namespace oas
-kubectl create namespace oas-apps
+kubectl get namespace oas 2>/dev/null || kubectl create namespace oas
+kubectl get namespace oas-apps 2>/dev/null || kubectl create namespace oas-apps
 
 # Generate oauth and SSO secrets
 python "$(dirname "$0")/generate_secrets.py" single-sign-on
-- 
GitLab