Skip to content

Commit

Permalink
Issue open-horizon#4181 - Bug: Output log for agent uninstall needs b…
Browse files Browse the repository at this point in the history
…etter clarity

Signed-off-by: Aleksandra Chyła <aleksandra.chyla@ibm.com>
  • Loading branch information
Aleksandra Chyła authored and LiilyZhang committed Dec 13, 2024
1 parent 2d76867 commit c7db8fe
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions agent-install/agent-uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,23 +379,23 @@ function deleteAgentResources() {
fi

log_info "Deleting configmap..."
$KUBECTL delete configmap $CONFIGMAP_NAME -n $AGENT_NAMESPACE
$KUBECTL delete configmap ${CONFIGMAP_NAME}-backup -n $AGENT_NAMESPACE
$KUBECTL delete configmap $CONFIGMAP_NAME -n $AGENT_NAMESPACE --ignore-not-found
$KUBECTL delete configmap ${CONFIGMAP_NAME}-backup -n $AGENT_NAMESPACE --ignore-not-found

log_info "Deleting secret..."
$KUBECTL delete secret $SECRET_NAME -n $AGENT_NAMESPACE
$KUBECTL delete secret $IMAGE_REGISTRY_SECRET_NAME -n $AGENT_NAMESPACE
$KUBECTL delete secret $IMAGE_PULL_SECRET_NAME -n $AGENT_NAMESPACE
$KUBECTL delete secret ${SECRET_NAME}-backup -n $AGENT_NAMESPACE
$KUBECTL delete secret $SECRET_NAME -n $AGENT_NAMESPACE --ignore-not-found
$KUBECTL delete secret $IMAGE_REGISTRY_SECRET_NAME -n $AGENT_NAMESPACE --ignore-not-found
$KUBECTL delete secret $IMAGE_PULL_SECRET_NAME -n $AGENT_NAMESPACE --ignore-not-found
$KUBECTL delete secret ${SECRET_NAME}-backup -n $AGENT_NAMESPACE --ignore-not-found

log_info "Deleting persistent volume..."
$KUBECTL delete pvc $PVC_NAME -n $AGENT_NAMESPACE
$KUBECTL delete pvc $PVC_NAME -n $AGENT_NAMESPACE --ignore-not-found

log_info "Deleting clusterrolebinding..."
$KUBECTL delete clusterrolebinding ${AGENT_NAMESPACE}-${CLUSTER_ROLE_BINDING_NAME}
$KUBECTL delete clusterrolebinding ${AGENT_NAMESPACE}-${CLUSTER_ROLE_BINDING_NAME} --ignore-not-found

log_info "Deleting serviceaccount..."
$KUBECTL delete serviceaccount $SERVICE_ACCOUNT_NAME -n $AGENT_NAMESPACE
$KUBECTL delete serviceaccount $SERVICE_ACCOUNT_NAME -n $AGENT_NAMESPACE --ignore-not-found

if [[ "$SKIP_DELETE_AGENT_NAMESPACE" != "true" ]]; then
log_info "Checking deployment and statefulset under namespace $AGENT_NAMESPACE"
Expand All @@ -412,7 +412,7 @@ function deleteAgentResources() {
fi

log_info "Deleting cert file from /etc/default/cert ..."
rm /etc/default/cert/agent-install.crt
rm -f /etc/default/cert/agent-install.crt
set -e

log_debug "deleteAgentResources() end"
Expand Down

0 comments on commit c7db8fe

Please sign in to comment.