Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-27257

As a global hub user, I can make sure all resource removed from source hub after cluster migration

XMLWordPrintable

    • Product / Portfolio Work
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • GH Train-35
    • None

      After cluster migratied, should follow the following doc to remove resources in source hub:

      6.1 Remove GitOps Applications

      # Delete specific ClusterInstance applicationoc delete application clusterinstance-sno-clusters -n openshift-gitops# Or delete multiple applicationsfor app in $(oc get application -n openshift-gitops -o name | grep -E 'sno1|sno2|sno3'); doecho "Deleting application: $app" oc delete $app -n openshift-gitopsdone

      6.2 Delete ClusterInstance Resources

      Important: Deleting ClusterInstance resources triggers the siteconfig operator to clean up all related resources (ClusterDeployment, ImageClusterInstall, BareMetalHost, Secrets, and ClusterNamespace.). For the clusters which migrated successfully, Global Hub has added pause annotations to ClusterDeployment and ImageClusterInstall resources, preventing the deletion of these resources from affecting the actual running clusters.

      {{# Delete individual ClusterInstancesoc delete clusterinstance sno1 -n sno1 --wait=false
      oc delete clusterinstance sno2 -n sno2 --wait=false
      oc delete clusterinstance sno3 -n sno3 --wait=false# Or use a batch scriptfor cluster in sno1 sno2 sno3; doecho "Deleting ClusterInstance: ${cluster}" oc delete clusterinstance ${cluster} -n ${cluster} --wait=false || echo "Already deleted or not found"done}}

      6.3 Verify Related Resources are Cleaned Up

      # Wait for ClusterNamespace cleanupoc get namespace -A | grep -E 'sno1|sno2|sno3'

       

       

      {}Definition of Done for Engineering Story Owner (Checklist){}

      • Design document created specifying which resources will be migrated
      • Review completed with telco team on migration scope
      • ClusterInstance functionality verified post-migration

      {}Development Complete{}

      • [ ] The code is complete.
      • [ ] Functionality is working.
      • [ ] Any required downstream Docker file changes are made.

      {}Tests Automated{}

      • [ ] Unit/function tests have been automated and incorporated into the build.
      • [ ] 100% automated unit/function test coverage for new or changed APIs.

      {}Secure Design{}

      • [ ] Security has been assessed and incorporated into your threat model.

      {}Multidisciplinary Teams Readiness{}

      Call out this sentence as it's own action:

      • [ ] Link the development issue to the doc issue.

      {}Support Readiness{}

      • [ ] The must-gather script has been updated.


      *Description updated to follow ACM Story template. Generated with Claude Code - https://claude.com/claude-code*

              daliu@redhat.com DangPeng Liu
              clyang82 Chunlin Yang
              Yaheng Liu Yaheng Liu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: