flux2-hub-spoke-example/scripts/fleet-down.sh
Stefan Prodan f05ca938d5
Add teardown script
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-10 12:06:57 +03:00

26 lines
641 B
Bash
Executable file

#!/usr/bin/env bash
# This script tears down the fleet of Kubernetes clusters.
# Copyright 2024 The Flux authors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -o errexit
set -o pipefail
CLUSTER_HUB="flux-hub"
echo "INFO - Deleting cluster ${CLUSTER_HUB}"
kind delete cluster --name "${CLUSTER_HUB}"
CLUSTER_STAGING="flux-staging"
echo "INFO - Deleting cluster ${CLUSTER_STAGING}"
kind delete cluster --name "${CLUSTER_STAGING}"
CLUSTER_PRODUCTION="flux-production"
echo "INFO - Deleting cluster ${CLUSTER_PRODUCTION}"
kind delete cluster --name "${CLUSTER_PRODUCTION}"
echo "INFO - Clusters deleted successfully"