X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=ric-infra%2F30-Kong%2Fbin%2Funinstall;fp=ric-infra%2F30-Kong%2Fbin%2Funinstall;h=01c97e06935640e448dbba7ac7c026536df12120;hb=ef05762e72bf0af584301bf58b2035f7ac4e3842;hp=0000000000000000000000000000000000000000;hpb=25428c74ecffd82152b5642cca81c19508d3218c;p=it%2Fdep.git diff --git a/ric-infra/30-Kong/bin/uninstall b/ric-infra/30-Kong/bin/uninstall new file mode 100755 index 00000000..01c97e06 --- /dev/null +++ b/ric-infra/30-Kong/bin/uninstall @@ -0,0 +1,49 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + + +source $DIR/../etc/kong.conf + +if [ -z "$RICINFRA_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICINFRA_RELEASE_NAME +fi + +if [ -z "$RICINFRA_NAMESPACE" ];then + INFRA_NAMESPACE=$infra_namespace +else + INFRA_NAMESPACE=$RICINFRA_NAMESPACE +fi + +RICINFRA_COMPONENTS="kong" + +echo "Undeploying RIC infra components [$RICINFRA_COMPONENTS]" +echo "Helm Release Name: $RELEASE_NAME" + + +for component in $RICINFRA_COMPONENTS; do + helm delete --purge "${RELEASE_NAME}-${component}" +done + +