Uninstalling the remaining resources after migrating to foundational services version 4.x.x

You can use the OpenShift console or run commands to uninstall resources after upgrading to foundational services version 4.x.x.

Prerequisites

  1. Each namespace listed in the common-service-maps ConfigMap entries does not have any ibm-common-service-operator on v3.x version.
  2. If the cert-manager operator or operand is deployed in controlNamespace, another instance of cert-manager (regardless of its version, and whether it is from IBM, Red Hat, or community) should exist in another namespace.

Uninstall operators

  1. Uninstall the ibm-namespace-scope operator and its operand.

    1. Delete the NamespaceScope instances.
    2. Click Operators > Installed Operators > IBM NamespaceScope Operator > NamespaceScope. Delete all the NamespaceScope instances.
    3. If NamespaceScope is already uninstalled, you can search for those NamespaceScope instances in the controlNamespace:
      oc delete namespacescope odlm-scope-managedby-odlm nss-odlm-scope nss-managedby-odlm -n <namespace> --ignore-not-found
      
  2. Uninstall ibm-common-service-webhook and its operand.

    Remove ibm-common-service-webhook deployment

    1. Click Workloads > Deployments > ibm-common-service-webhook.
    2. Alternatively, you can run the following command to delete this deployment:
      oc delete deployment ibm-common-service-webhook -n <namespace>
      

    Remove WebhookConfigurations

    1. Click Home > Search > MutatingWebhookConfiguration.
    2. Delete ibm-common-service-webhook-configuration and ibm-operandrequest-webhook-configuration.
    3. Click Home > Search > ValidatingWebhookConfiguration.
    4. Alternatively, you can run the following commands to delete ibm-cs-ns-mapping-webhook-configuration:

      oc delete MutatingWebhookConfiguration ibm-common-service-webhook-configuration ibm-operandrequest-webhook-configuration --ignore-not-found
      
      oc delete ValidatingWebhookConfiguration ibm-cs-ns-mapping-webhook-configuration --ignore-not-found
      

    Remove podpresets instance

    1. Click Home > Search > Podpresets.
    2. Alternatively, you can run the following command to delete the podpresets resources:
      oc get podpresets.operator.ibm.com -A --no-headers | awk '{print $1}' | xargs oc delete -n $ns --ignore-not-found podpresets.operator.ibm.com
      
  3. Uninstall ibm-secret-share-operator and its operand.

    Remove ibm-secret-share-operator deployment

    1. Click Workloads > Deployments > secretshare.
    2. Alternatively, you can run the following command to delete the deployment:
      oc delete deployment secretshare -n <namespace>
      

    Remove secretshare instance

    1. Click Home > Search > SecretShare.
    2. Alternatively, you can run the following command to delete the resources:
      oc get secretshare -A --no-headers | awk '{print $1}' | xargs oc delete -n $ns --ignore-not-found secretshare
      
  4. Uninstall ibm-crossplane-operator and ibm-corssplane-provider-operator.

    Remove secretshare instance

    1. Click Home > Search > configuration.pkg.ibm.crossplane.io.
    2. Delete all.
    3. Click Home > Search > lock.pkg.ibm.crossplane.io.
    4. Delete all.
    5. Click Home > Search > ProviderConfig.
    6. Alternatively, run the following commands to delete the resources:

      oc get configuration.pkg.ibm.crossplane.io -A --no-headers | awk '{print $1}' | xargs oc delete --ignore-not-found configuration.pkg.ibm.crossplane.io
      
      oc get lock.pkg.ibm.crossplane.io -A --no-headers | awk '{print $1}' | xargs oc delete --ignore-not-found lock.pkg.ibm.crossplane.io
      
      oc get ProviderConfig -A --no-headers | awk '{print $1}' | xargs oc delete --ignore-not-found ProviderConfig
      
  5. Remove crossplane CSV and subscription.

    1. Click Home > Search > search for CSV. Delete ibm-crossplane-operator-app and one of ibm-crossplane-provider-kubernetes-operator-app, or ibm-crossplane-provider-ibm-cloud-operator-app.
    2. Click Home > Search > search for sub. Delete ibm-crossplane-operator-app and one of ibm-crossplane-provider-kubernetes-operator-app, or ibm-crossplane-provider-ibm-cloud-operator-app

      oc delete sub ibm-crossplane-operator-app -n <namespace> --ignore-not-found
      
      oc delete sub ibm-crossplane-provider-kubernetes-operator-app -n <namespace> --ignore-not-found
      
      oc delete sub ibm-crossplane-provider-ibm-cloud-operator-app -n <namespace> --ignore-not-found
      
      oc get csv -n <namespace> | grep ibm-crossplane
      
      oc delete csv <csv_name>  -n <namespace>