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

🐛 Use CRD version prior to remap_crd_version backup item action #2683

Merged
merged 3 commits into from Jul 7, 2020

Conversation

ashish-amarnath
Copy link
Contributor

Signed-off-by: Ashish Amarnath ashisham@vmware.com

Fixes: #2682

Captures the version of the CRD before the remap_crd_version backup item action plugin updates the version.
This ensures that check at item_backupper.go#L253 is satisfied and that the manifest in the backup is persisted under <BACKUP_ROOT>/resource/customresourcedefinitions.apiextensions.k8s.io/cluster where it is expected to restore correctly

@ashish-amarnath
Copy link
Contributor Author

This PR looked good in testing against a kubernetes 1.17. Going to run more tests.

@ashish-amarnath
Copy link
Contributor Author

Verified this PR on KIND_IMAGE_VERSIONS=("kindest/node:v1.16.9" "kindest/node:v1.17.0" "kindest/node:v1.18.4")

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
@ashish-amarnath ashish-amarnath changed the title Use CRD version prior to remap_crd_version backup item action 🐛 Use CRD version prior to remap_crd_version backup item action Jul 2, 2020
@ashish-amarnath ashish-amarnath added this to the v1.5 milestone Jul 2, 2020
@nrb
Copy link
Contributor

nrb commented Jul 6, 2020

@ashish-amarnath Did you try this against versions lower than 1.17, too?

Also, what other CRDs did you test against? We probably want a few different ones to verify against, just to be sure we get a representative sample size. pkg/backup/testdata has the ones I used with #2478.

Copy link
Contributor

@nrb nrb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just waiting on confirmation of testing on Kubernetes versions.

@nrb nrb modified the milestones: v1.5, v1.4.1 Jul 6, 2020
@ashish-amarnath
Copy link
Contributor Author

Verified this PR on KIND_IMAGE_VERSIONS=("kindest/node:v1.16.9" "kindest/node:v1.17.0" "kindest/node:v1.18.4")
#2683 (comment)

I used the executionhook and hookaction CR from https://github.com/kubernetes-sigs/execution-hook/pull/5/files.

@nrb nrb added the versioning issues related to resource versioning label Jul 6, 2020
@ashish-amarnath ashish-amarnath requested a review from nrb July 6, 2020 22:46
@ashish-amarnath
Copy link
Contributor Author

@carlisia PTAL. Thanks!

Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@carlisia carlisia merged commit b4465e9 into vmware-tanzu:master Jul 7, 2020
@ashish-amarnath ashish-amarnath deleted the preserve-crd-version branch July 7, 2020 18:31
nrb pushed a commit to nrb/velero that referenced this pull request Jul 13, 2020
…re-tanzu#2683)

* 🐛 preserve crd version before remapping

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
ashish-amarnath added a commit that referenced this pull request Jul 13, 2020
* Adjust restic timeout and pod values up (#2696)

* Adjust restic timeout and pod values up

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* 🐛 Use CRD version prior to remap_crd_version backup item action (#2683)

* 🐛 preserve crd version before remapping

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* 🏃‍♂️ pass git state to build from makefile

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* Add scripts for tagging Velero releases (#2592)

* Add release tools

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Document the tag-release release tool

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Make sure the upstream used is correct

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add copyright statement

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Address review feedback

* Pause to allow for cherry-picking on the release branch before pushing
  it
* Move master branch logic into an else statement
* Correct typo

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Uncomment check for dirty git working tree

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
versioning issues related to resource versioning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Location of CRD manifests in the backup archive is not correct
3 participants