Uploaded image for project: 'Managed Service - API'
  1. Managed Service - API
  2. MGDAPI-4125

J03B - [DESTRUCTIVE] - backup-restore - Verify that namespaces get recreated by the integreatly-operator if deleted

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Blocker Blocker
    • 1.22.0
    • 1.22.0
    • Testing
    • False
    • Hide

      None

      Show
      None
    • False
    • No
    • RC2

      Origin: tests/backup-restore/j03b-verify-that-namespaces-get-recreated-by-the-integreatlyoper.md

      https://github.com/integr8ly/integreatly-operator/blob/master/test/common/namespace_restoration.go

      Description

      Note: this test should only be performed at a time it will not affect other ongoing testing, or on a separate cluster.

      Test that all namespace will be automatically recreated by the integreatly-operator

      Steps

      1. Login via oc as kubeadmin
      2. By default, this test is not run as part of the functional test suite. To run this singular functional test, run the following command from the RHOAM operator repo against a target cluster:
      DESTRUCTIVE=true INSTALLATION_TYPE=managed-api TEST="J03" make test/e2e/single | tee test-results.log
      
      1. Check the namespaces in RHOAM except the redhat-rhoam-operator are recreated during the test run, the Active for
        namespaces from the command below should be recent.
      oc get ns | grep rhoam
      redhat-rhoam-3scale                                Active   1h
      redhat-rhoam-3scale-operator                       Active   1h
      redhat-rhoam-cloud-resources-operator              Active   1h
      redhat-rhoam-customer-monitoring-operator          Active   1h
      redhat-rhoam-marin3r                               Active   1h
      redhat-rhoam-marin3r-operator                      Active   1h
      redhat-rhoam-observability                         Active   1h
      redhat-rhoam-observability-opreator                Active   1h
      redhat-rhoam-operator                              Active   5d13h
      redhat-rhoam-rhsso                                 Active   1h
      redhat-rhoam-rhsso-operator                        Active   1h
      redhat-rhoam-user-sso                              Active   1h
      redhat-rhoam-user-sso-operator                     Active   1h
      

      Note finalizers:

      If a namespace stuck in 'Terminating' state, it's needed to remove finalizers to proceed. To find resources with finalizers:

      kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get -n <namespace> --ignore-not-found --show-kind
      

      Then, to edit resource: oc edit <resource> -n <namespace>

      Other useful commands here:

      to get stage what is reconciler currently on: oc get rhmis rhoam -n redhat-rhoam-operator -o json | grep 'stage":'

      to get statuses (+ info) of all stages: oc get rhmis rhoam -n redhat-rhoam-operator -o json | jq -r '.status.stages'

      General guidelines for testing

      https://github.com/integr8ly/integreatly-operator/tree/master/test-cases/common/general-guidelines.md

              trepel Tomas Repel
              trepel Tomas Repel
              RHOAM Engineering
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: