Uninstalling the Guardium Data Security Center instance

You can remove Guardium Data Security Center by completing the following steps.

Before you begin

Important: The uninstallation steps are irreversible. Make sure that you back up any data that you want to keep or move to a new installation.

Procedure

  1. Export the namespace where Guardium Data Security Center is installed.
    export NAMESPACE=<guardium_data_security_center_namespace>
  2. Remove the Guardium Data Security Center instance.
    oc delete `oc get guardiumdatasecuritycenter -oname -n ${NAMESPACE}` -n ${NAMESPACE}
    The output is similar to the following example.
    guardiumdatasecuritycenter.gi.ds.isc.ibm.com "staging" deleted
  3. Remove the custom resource files.
    for cr in gqs gi gdsc; do 
      for resource in $(oc get $cr -o name -n ${NAMESPACE}); do
        oc patch $resource -n ${NAMESPACE} --type=merge -p '{"metadata":{"finalizers":[]}}' && \
        oc delete $resource -n ${NAMESPACE} --ignore-not-found;
      done
    done
  4. Clean up Guardium Data Security Center dependencies.
    oc delete $(oc get tenantguc -oname) || true
    oc delete $(oc get tenantminisnif -oname) || true
  5. Remove the remaining persistent volume claims.
    oc delete `oc get pvc -oname -n ${NAMESPACE} | grep -v icp-mongodb | grep -v common-service-db ` -n ${NAMESPACE}
  6. Remove the remaining secrets.
    oc delete `oc get secrets -oname -n ${NAMESPACE} | grep <GI-INSTANCE-NAME> ` -n ${NAMESPACE}
  7. Remove the remaining configmaps.
    oc delete `oc get cm -oname -n ${NAMESPACE} | grep <GI-INSTANCE-NAME> ` -n ${NAMESPACE}
    
  8. Uninstall the catalogs.
    oc ibm-pak launch $CASE_NAME \
    --version $CASE_VERSION \
    --namespace ${NAMESPACE} \
    --inventory install \
    --action uninstall-catalog \
    --args "--inputDir ${LOCAL_CASE_DIR}"
  9. Uninstall the operators:
    oc ibm-pak launch $CASE_NAME \ 
    --version $CASE_VERSION \ 
    --inventory install \ 
    --action uninstall-operator \ 
    --namespace ${NAMESPACE} \ 
    --args "--registry cp.icr.io --user ${CP_REPO_USER} --pass ${CP_REPO_PASS} --secret ibm-entitlement-key --inputDir ${LOCAL_CASE_DIR}"
  10. Switch to the default namespace (if inside the Guardium Data Security Center namespace) and delete the Guardium Data Security Center namespace:
    oc project default
    oc delete project ${NAMESPACE}
    Important:
    • Deleting this namespace removes IBM Cloud Pak® foundational services and IBM® Common Services because they are installed in the same namespace as Guardium Data Security Center. If you want to keep IBM Cloud Pak foundational services and IBM Common Services in this namespace, skip this step.
    • This action can take a few minutes to complete. During this time, the project appears as Terminating.
  11. To uninstall the IBM Common Services operators, complete the steps in Uninstalling foundational services.