From 0c9b575f05289966f6d313a84f58307ff000139d Mon Sep 17 00:00:00 2001 From: nitesh3108 Date: Mon, 8 Jul 2024 15:27:07 -0400 Subject: [PATCH] remove older connectivity client --- samples/connectivity_client_v100.yaml | 26 ------------------------ scripts/uninstall_connectivity_client.sh | 15 +++++++++++--- 2 files changed, 12 insertions(+), 29 deletions(-) delete mode 100644 samples/connectivity_client_v100.yaml diff --git a/samples/connectivity_client_v100.yaml b/samples/connectivity_client_v100.yaml deleted file mode 100644 index d2b06f0a4..000000000 --- a/samples/connectivity_client_v100.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: storage.dell.com/v1 -kind: ApexConnectivityClient -metadata: - name: dell-connectivity-client - namespace: dell-connectivity-client -spec: - client: - csmClientType: "apexConnectivityClient" - configVersion: v1.0.0 - connectionTarget: connect-into.dell.com - forceRemoveClient: true - common: - name: connectivity-client-docker-k8s - image: dellemc/connectivity-client-docker-k8s:1.2.3 - imagePullPolicy: IfNotPresent - initContainers: - - name: connectivity-client-init - image: dellemc/connectivity-client-docker-k8s:1.2.3 - imagePullPolicy: IfNotPresent - sideCars: - - name: kubernetes-proxy - image: bitnami/kubectl:1.28 - imagePullPolicy: IfNotPresent - - name: cert-persister - image: dellemc/connectivity-cert-persister-k8s:0.11.0 - imagePullPolicy: IfNotPresent diff --git a/scripts/uninstall_connectivity_client.sh b/scripts/uninstall_connectivity_client.sh index d5de87572..9388556e7 100644 --- a/scripts/uninstall_connectivity_client.sh +++ b/scripts/uninstall_connectivity_client.sh @@ -12,9 +12,18 @@ #!/bin/bash +if [[ $# -ne 1 ]]; then + echo "Incorrect input parameters provided to script $0." + echo "Script Usage:" + echo "$0 " + echo "Example:- connectivityclient-version => v100 , v110" + exit 1 +fi + SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" ROOTDIR="$(dirname "$SCRIPTDIR")" CMD="" +connectivity_ver=$1 out=$(command -v oc) if [ $? -eq 0 ]; then @@ -31,7 +40,7 @@ if [ -z "$CMD" ]; then exit 1 fi -$CMD delete -f ${ROOTDIR}/samples/connectivity_client_v100.yaml -$CMD delete ns dell-connectivity-client +$CMD apply -f $ROOTDIR/samples/connectivity_client_${connectivity_ver}.yaml +$CMD apply -f $ROOTDIR/samples/conn_secret_test.yaml -echo "Dell Connectivity Client uninstalled." +echo "Dell Connectivity Client ${connectivity_ver} uninstalled."