Skip to content

Commit

Permalink
just: fail on undeploy if namespace exists
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jan 17, 2024
1 parent ca3351f commit f7b3a1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ apply:

# Delete Kubernetes manifests.
undeploy:
-kubectl delete -f ./{{workspace_dir}}/deployment
#!/usr/bin/env bash
set -euo pipefail
ns=$(cat ./{{workspace_dir}}/just.namespace)
if kubectl get ns $ns 2> /dev/null; then
kubectl delete -f ./{{workspace_dir}}/deployment
fi
# Create a CoCo-enabled AKS cluster.
create:
Expand Down

0 comments on commit f7b3a1b

Please sign in to comment.