mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
37 lines
721 B
Bash
Executable File
37 lines
721 B
Bash
Executable File
#!/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
|
|
|