From 3f22c1df4f5fe54201426f09ee098afe0cb40b4d Mon Sep 17 00:00:00 2001 From: Johannes Kleinlercher Date: Fri, 3 May 2024 16:49:22 +0200 Subject: [PATCH] check if K3D cluster should get installed --- install-k3d-cluster.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/install-k3d-cluster.sh b/install-k3d-cluster.sh index 474552f8..2335c590 100644 --- a/install-k3d-cluster.sh +++ b/install-k3d-cluster.sh @@ -5,11 +5,14 @@ set -x # do we need to set this always? I had DNS issues on the train export K3D_FIX_DNS=1 -k3d cluster create cnp-local-demo \ - -p "80:80@loadbalancer" \ - -p "443:443@loadbalancer" \ - --agents 2 \ - --wait +# in github workflows we use the same script but don't want the k3d cluster to get installed +IF [ "${INSTALL_K3D_CLUSTER}" != "false" ] ; then + k3d cluster create cnp-local-demo \ + -p "80:80@loadbalancer" \ + -p "443:443@loadbalancer" \ + --agents 2 \ + --wait +fi # create mkcert certs in alle namespaces with ingress for namespace in backstage kargo monitoring argocd keycloak kubecost; do