#!/bin/bash

oc delete -n istio-system smcp basic --ignore-not-found=true
helm uninstall istio-csr jetstack/cert-manager-istio-csr -n istio-system || true


oc delete issuer istio-ca -n istio-system --ignore-not-found=true
oc delete certificate istio-ca -n istio-system --ignore-not-found=true
oc delete certificate root-ca -n cert-manager --ignore-not-found=true
oc delete issuer selfsigned-root-issuer -n cert-manageri --ignore-not-found=true
oc delete clusterissuer root-ca --ignore-not-found=true


oc delete subscription -n openshift-operators jaeger-product servicemeshoperator
oc delete subscription -n cert-manager-operator openshift-cert-manager-operator 

oc delete namespace bookinfo istio-system cert-manager cert-manager-operator
