Skip to content

Commit

Permalink
improve script
Browse files Browse the repository at this point in the history
  • Loading branch information
dbadura committed Jan 2, 2025
1 parent b077a7a commit 3f05f73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/scripts/deploy_busola.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ print_k8s_resources()

ENV=${ENV?"env is not set"}
IMG_TAG=$1
IMG_DIR=dev
IMG_DIR=${IMG_DIR:-"dev"}

kubectl delete configmap environment --ignore-not-found=true
kubectl create configmap environment --from-literal=ENVIRONMENT="${ENV}"
echo "### Deploying busola from: ${IMG_TAG}"
echo "### Deploying busola from: ${IMG_DIR}/${IMG_TAG}"

cd resources
(cd base/web && kustomize edit set image busola=europe-docker.pkg.dev/kyma-project/${IMG_DIR}/busola:"${IMG_TAG}")
(cd base && kustomize edit set image busola=europe-docker.pkg.dev/kyma-project/${IMG_DIR}/busola:"${IMG_TAG}")
kustomize build base/ | kubectl apply -f-

kubectl apply -f ingress/ingress.yaml

# WAIT FOR busola to be deployed
# wait for busola to be deployed
kubectl wait --for=condition=Available deployment/busola

# return ip address busola and save it to output
kubectl wait --for=jsonpath='{.status.loadBalancer.ingress}' ingress/busola
IP=$(kubectl get ingress busola -ojson | jq .status.loadBalancer.ingress[].ip | tr -d '/"')

echo "IP address: ${IP}"

# check if busola is available with curl
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/prepare_kubeconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ set -o pipefail # prevents errors in a pipeline from being masked

k3d kubeconfig get kyma > tests/integration/fixtures/kubeconfig.yaml

#To access kubernetes inside the cluster change the api server addrees available inside the cluster
#To access kubernetes cluster inside the same cluster change the api server address to url available inside the cluster.
yq --inplace '.clusters[].cluster.server = "https://kubernetes.default.svc:443"' tests/integration/fixtures/kubeconfig.yaml

0 comments on commit 3f05f73

Please sign in to comment.