mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Add up.sh and down.sh development scripts for consistency with other ansible operators (#1991)
This commit is contained in:
36
down.sh
Executable file
36
down.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# AWX Operator down.sh
|
||||
# Purpose:
|
||||
# Cleanup and delete the namespace you deployed in
|
||||
|
||||
# -- Usage
|
||||
# NAMESPACE=awx ./down.sh
|
||||
|
||||
# -- Variables
|
||||
TAG=${TAG:-dev}
|
||||
AWX_CR=${AWX_CR:-awx}
|
||||
CLEAN_DB=${CLEAN_DB:-false}
|
||||
|
||||
|
||||
# -- Check for required variables
|
||||
# Set the following environment variables
|
||||
# export NAMESPACE=awx
|
||||
|
||||
if [ -z "$NAMESPACE" ]; then
|
||||
echo "Error: NAMESPACE env variable is not set. Run the following with your namespace:"
|
||||
echo " export NAMESPACE=developer"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# -- Delete Backups
|
||||
kubectl delete awxbackup --all
|
||||
|
||||
# -- Delete Restores
|
||||
kubectl delete awxrestore --all
|
||||
|
||||
# Deploy Operator
|
||||
make undeploy NAMESPACE=$NAMESPACE
|
||||
|
||||
# Remove PVCs
|
||||
kubectl delete pvc postgres-15-$AWX_CR-postgres-15-0
|
||||
|
||||
Reference in New Issue
Block a user