Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Backup with deployment but only name contains "kahu", keyword but exclude the name "kahu-restore-deployment" and then restore the created backup #156

Open
Roshini0220 opened this issue Apr 18, 2023 · 0 comments

Comments

@Roshini0220
Copy link

Issue/Feature Description:
Testcase Precondition:

  1. Kahu project installed in given name-space (test-kahu)
  2. All below pods should be up and running:
    a. backup service
    b. Meta service with nfs provider
    c. nfs-server
  3. Metadata location is created already
  4. Namespace test-ns1, test-ns2 is created and contains
    some of the kubernetes resources
    5.Namespace restore-ns is created
    Testcase steps:
  5. Create below backup CR using kubectl command
    (use kubectl create -f <backup.yaml>)
    apiVersion: kahu.io/v1
    kind: Backup
    metadata:
    name: backup-Kahu-0001
    spec:
    includeNamespaces: [test-ns]
    metadataLocation: nfs
    includeResources:
  • name: kahu

kind: Deployment
isRegex: true
excludeResources:

  • name: kahu-restore-deployment
    kind: Deployment
    isRegex: false
  1. Use kubectl describe backup -n test-kahu
  2. Get inside nfs server pod and check for the content inside mount path given
    (use command kubectl exec -ti -n test-kahu /bin/sh)
  3. Create a restore CR on new namespace (restore-ns)
    apiVersion: kahu.io/v1
    kind: Restore
    metadata:
    name: restore-Kahu-0001
    Spec:
    backupName: backup-Kahu-0001
    namespaceMapping:
    test-ns : restore-ns
    Expected Result:
  4. In step 2,
    a) Verify that backup stage is Finished and State is Completed
    b) Verify the resource list in status shows all the required resources
  5. In step 3, verify that
    a) tar file is created with name of backup
    b) After untar file, All deployment has "kahu" keywork of default namespace is backuped.
    For example:
  6. kahu-123
  7. 123-kahu
  8. 123-kahu-456
    but it should not contain "kahu-restore-deployment" name
  9. The deployments that are backed up to be up in restore-ns namespace
    Why this issue to fixed / feature is needed(give scenarios or use cases):
    This is a testcase which is to automated to make surepod is properly backed up and restored
    How to reproduce, in case of a bug:
    Other Notes / Environment Information: (Please give the env information, log link or any
    useful information for this issue)

    @kalaiselvikks76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant