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

Fix for #1888: check item's original namespace, not remapped one, for inclusion/exclusion #1909

Merged
merged 3 commits into from
Sep 26, 2019

Conversation

skriss
Copy link
Contributor

@skriss skriss commented Sep 25, 2019

Closes #1888

cc @betta1 - would be great if you could test this out! I can push an image if you need.

@betta1
Copy link
Contributor

betta1 commented Sep 25, 2019

Thanks Steve, I'll checkout your branch and build the image. I'll update in a few mins.

@betta1
Copy link
Contributor

betta1 commented Sep 25, 2019

Yes this 💯 fixes #1888, tested with the build from your branch and restore works as expected:

k get po -n mysql
NAME                     READY   STATUS    RESTARTS   AGE
mysql-5c5cd4b775-lrp29   1/1     Running   0          8m28s

k get deploy -n mysql
NAME    READY   UP-TO-DATE   AVAILABLE   AGE
mysql   1/1     1            1           8m55s

k get po -n nginx
NAME                        READY   STATUS    RESTARTS   AGE
my-nginx-6cc48cd8db-zx8fh   1/1     Running   0          9m23s

k get deploy -n nginx
NAME       READY   UP-TO-DATE   AVAILABLE   AGE
my-nginx   1/1     1            1           9m45s

# back up mysql, nginx namespaces
velero backup create backup-0 --include-namespaces mysql,nginx

velero get backups
NAME       STATUS      CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
backup-0   Completed   2019-09-25 12:56:40 -0700 PDT   29d       dd-bsl             <none>

# restore mysql namespace to new namespace
velero restore create mysql-restore --namespace-mappings mysql:mysql-new --from-backup backup-0 --include-namespaces mysql

# mysql deployment and pods restored into new namespace
k get po -n mysql-new
NAME                     READY   STATUS    RESTARTS   AGE
mysql-5c5cd4b775-lrp29   1/1     Running   0          34s

k get deploy -n mysql-new
NAME    READY   UP-TO-DATE   AVAILABLE   AGE
mysql   1/1     1            1           41s

@skriss skriss requested review from carlisia and nrb September 25, 2019 20:15
@carlisia carlisia merged commit 2e849dc into vmware-tanzu:master Sep 26, 2019
@skriss skriss deleted the fix-1888 branch September 27, 2019 21:07
jessestuart added a commit to jessestuart/velero that referenced this pull request Sep 28, 2019
* upstream/master: (38 commits)
  sync controller: replace revision file with full diff each interval (vmware-tanzu#1892)
  Increment logging for item backupper (vmware-tanzu#1904)
  Add LD_LIBRARY_PATH as an env varible for the use of vsphere plugin (vmware-tanzu#1893)
  Remove unused flag (vmware-tanzu#1913)
  Use layers in the builder Dockerfile (vmware-tanzu#1907)
  Fix for vmware-tanzu#1888: check item's original namespace, not remapped one, for inclusion/exclusion (vmware-tanzu#1909)
  fail on make verify if generated CRDs differ (vmware-tanzu#1906)
  velero API type changes for structural schema CRDs (vmware-tanzu#1898)
  Generate CRDs with structural schema (vmware-tanzu#1885)
  Plan for moving plugin repos (vmware-tanzu#1870)
  move plugin proto updating into make update (vmware-tanzu#1887)
  Add features package (vmware-tanzu#1849)
  GCP: support specifying Cloud KMS key name for backup storage locations (vmware-tanzu#1879)
  Adds to website (vmware-tanzu#1882)
  proposal for generating Velero CRDs with structural schema (vmware-tanzu#1875)
  Improve contributing docs (vmware-tanzu#1852)
  [doc] Diagram (image) now mentions velero  (vmware-tanzu#1877)
  AWS: add support for arbitrary SSE algorithms, e.g. AES256 (vmware-tanzu#1869)
  update restic docs for PR vmware-tanzu#1807 (vmware-tanzu#1867)
  changelog for PR vmware-tanzu#1864
  ...
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

Successfully merging this pull request may close these issues.

Restore with namespace mappings and include namespaces does not restore deployments/pods into target namespace
4 participants