2 ##############################################################################
4 # Copyright (C) 2024: OpenInfra Foundation Europe
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 ##############################################################################
20 echo $(date -u) "delete-from-k8s started"
22 # Delete R1-SME-Manager with Capifcore
23 kubectl delete -f ../manifests/servicemanager.yaml
24 kubectl delete configmap env-configmap -n servicemanager
25 kubectl delete -f ../manifests/capifcore.yaml
26 kubectl delete ns servicemanager
29 go run ../../internal/kongclearup.go
30 helm uninstall kong -n kong
32 kubectl wait deploy/kong-kong --for=delete --timeout=-300s -n kong
34 # Delete storage for the Postgres used by Kong
35 kubectl delete -f ../manifests/kong-postgres-pvc.yaml
36 kubectl delete ns kong
38 echo $(date -u) "delete-from-k8s completed"