Skip to content

Commit

Permalink
Added a step to create namespace if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreenwood committed Apr 2, 2024
1 parent 89c6149 commit caf421c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/deploy_helm_chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Deploy Helm Chart to FNS GKE

on:
push:
branches:
- devops/FAIRSPC-23_deployment
workflow_dispatch:
inputs:
name:
Expand Down Expand Up @@ -85,6 +88,16 @@ jobs:
echo "StatefulSet fairspace does not exist."
fi
- name: Check if namespace exists
id: check_namespace
run: |
if kubectl get namespace fairspace-${{ env.ENVIRONMENT }} &> /dev/null; then
echo "Namespace fairspace-${{ env.ENVIRONMENT }} exists."
else
echo "Namespace fairspace-${{ env.ENVIRONMENT }} does not exist. Creating namespace."
kubectl create namespace fairspace-${{ env.ENVIRONMENT }}
fi
- name: Deploy Helm chart
run: |
helm upgrade --install fairspace oci://${{ vars.HELM_REGISTRY }}/fairspace \
Expand Down

0 comments on commit caf421c

Please sign in to comment.