velero/pkg/restore
Nolan Brubaker 766ab5d3ee
Account for possible missing schemas on v1 CRDs (#2264)
* Account for possible missing schemas on v1 CRDs

If a v1beta1 CRD without a Schema was submitted to a Kubernets v1.16
cluster, then Kubernetes will server it back as a v1 CRD without a
schema.

However, when Velero tries to restore this document, the request will be
rejected as a v1 CRD must have a schema.

This commit has some defensive coding on the restore side, as well as
potential fixes on the backup side for getting around this.

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

* Back up nonstructural CRDs as v1beta1

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

* Add tests for remapping plugin

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

* Add builders for v1 CRDs

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

* Address review feedback

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

* Remove extraneous log message

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

* Add changelog

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2020-02-24 12:07:50 -07:00
..
mocks Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
add_pv_from_pvc_action.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
add_pv_from_pvc_action_test.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
add_pvc_from_pod_action.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
add_pvc_from_pod_action_test.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
change_storageclass_action.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
change_storageclass_action_test.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
clusterrolebinding_action.go Restore action for cluster/namespace role bindings (#1974) 2019-10-21 15:11:26 -06:00
clusterrolebinding_action_test.go Restore action for cluster/namespace role bindings (#1974) 2019-10-21 15:11:26 -06:00
crd_v1_preserve_unknown_fields_action.go Account for possible missing schemas on v1 CRDs (#2264) 2020-02-24 12:07:50 -07:00
job_action.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
job_action_test.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
merge_service_account.go update license headers to Velero contributors (#1302) 2019-03-20 12:32:48 -07:00
merge_service_account_test.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
pod_action.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
pod_action_test.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
pv_restorer.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
pv_restorer_test.go Extract providers (#1985) 2019-10-22 15:31:27 -07:00
restic_restore_action.go Assign default CPU/Memory resource value if not present (#2176) 2020-01-09 08:48:35 -07:00
restic_restore_action_test.go Add support for private registry with custom port in restic-helper image (#1999) 2019-12-04 08:01:39 -08:00
restore.go Use PV name returned from volumesnapshotter while creating a PV (#2216) 2020-02-10 13:17:15 -07:00
restore_test.go Use PV name returned from volumesnapshotter while creating a PV (#2216) 2020-02-10 13:17:15 -07:00
result.go Restore result refactoring (#2234) 2020-02-03 10:56:57 -08:00
result_test.go Restore result refactoring (#2234) 2020-02-03 10:56:57 -08:00
rolebinding_action.go Restore action for cluster/namespace role bindings (#1974) 2019-10-21 15:11:26 -06:00
rolebinding_action_test.go Restore action for cluster/namespace role bindings (#1974) 2019-10-21 15:11:26 -06:00
service_account_action.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
service_account_action_test.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
service_action.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
service_action_test.go Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00