You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When bringing up a new cluster, one often needs to delete the one that isn't working. I hacked this from 3_deploy_conjur_cluster.sh and 4_create_load_balancer.sh:
echo "deleting main cluster"
if $cli get statefulset &>/dev/null; then # this returns non-0 if platform doesn't support statefulset
conjur_cluster_template="./$PLATFORM/conjur-cluster-stateful.yaml"
else
conjur_cluster_template="./$PLATFORM/conjur-cluster.yaml"
fi
sed -e "s#{{ CONJUR_APPLIANCE_IMAGE }}#$conjur_appliance_image#g" $conjur_cluster_template |
$cli delete -f -
When bringing up a new cluster, one often needs to delete the one that isn't working. I hacked this from 3_deploy_conjur_cluster.sh and 4_create_load_balancer.sh:
$ cat delete-deployments.sh
#!/bin/bash
#set -eo pipefail
. utils.sh
announce "Deleting Conjur cluster."
set_namespace $CONJUR_NAMESPACE_NAME
conjur_appliance_image=$(platform_image "conjur-appliance")
echo "deleting main cluster"
if $cli get statefulset &>/dev/null; then # this returns non-0 if platform doesn't support statefulset
conjur_cluster_template="./$PLATFORM/conjur-cluster-stateful.yaml"
else
conjur_cluster_template="./$PLATFORM/conjur-cluster.yaml"
fi
sed -e "s#{{ CONJUR_APPLIANCE_IMAGE }}#$conjur_appliance_image#g" $conjur_cluster_template |
$cli delete -f -
echo "deleting load balancer"
docker_image=$(platform_image haproxy)
sed -e "s#{{ DOCKER_IMAGE }}#$docker_image#g" "./$PLATFORM/haproxy-conjur-master.yaml" |
$cli delete -f -
echo "deleting followers"
sed -e "s#{{ CONJUR_APPLIANCE_IMAGE }}#$conjur_appliance_image#g" "./$PLATFORM/conjur-follower.yaml" |
sed -e "s#{{ AUTHENTICATOR_ID }}#$AUTHENTICATOR_ID#g" |
$cli delete -f -
sleep 10
echo "Waiting for Conjur pods to terminate..."
conjur_pod_count=0
wait_for_it 300 "$cli describe po conjur-cluster | grep Status: | grep -c Running | grep -q $conjur_pod_count"
echo "Cluster deleted."
The text was updated successfully, but these errors were encountered: