mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-26 09:54:23 +00:00
[Cherry-Pick] RIA MustInclude annotation and VSC fix for 1.18 (#10101)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Successful in 12s
Run the E2E test on kind / get-go-version (push) Successful in 13s
push.yml / extract (push) Successful in 11s
Main CI / get-go-version (push) Successful in 11s
Run the E2E test on kind / build (push) Failing after 28s
Run the E2E test on kind / run-e2e-test (push) Skipped
Main CI / Build (push) Failing after 32s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Successful in 12s
Run the E2E test on kind / get-go-version (push) Successful in 13s
push.yml / extract (push) Successful in 11s
Main CI / get-go-version (push) Successful in 11s
Run the E2E test on kind / build (push) Failing after 28s
Run the E2E test on kind / run-e2e-test (push) Skipped
Main CI / Build (push) Failing after 32s
* design for RIA must-include-additional-items Design for `restore.velero.io/must-include-additional-items` annotation and its usage and interaction with existing filtering mechanism. Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> (cherry picked from commitac76402aa0) Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> * Add RIA must-include additional items (#10082) Let RestoreItemActions opt in via annotation to bypass global restore filters for AdditionalItems, mirroring the backup-side must-include behavior. Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> (cherry picked from commita43a1bce6a) Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> * update v1.18 custom-plugins docs for RIA must-include additional items Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> * remove VolumeSnapshotContents from resourceMustHave list Stop force-including VolumeSnapshotContents via resourceMustHave on every restore; CSI VolumeSnapshot/PVC RestoreItemActions now set `restore.velero.io/must-include-additional-items` so bound snapshot dependencies are restored only when their parent is restored. Fixes: #9957 Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> (cherry picked from commitef100da89b) Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> * add tests to cover pvc and vsc ria Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> (cherry picked from commit63cfddd18d) Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> * fix change logs Signed-off-by: Adam Zhang <adam.zhang@broadcom.com> --------- Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
This commit is contained in:
@@ -58,6 +58,9 @@ func NewAPIServer(t *testing.T) *APIServer {
|
||||
{Group: "velero.io", Version: "v2alpha1", Resource: "datauploads"}: "DataUploadsList",
|
||||
{Group: "mygroup.io", Version: "v1", Resource: "mycustomkinds"}: "MyCustomKindList",
|
||||
{Group: "mygroup.io", Version: "v1", Resource: "myclustercustomkinds"}: "MyClusterCustomKindList",
|
||||
{Group: "storage.k8s.io", Version: "v1", Resource: "storageclasses"}: "StorageClassList",
|
||||
{Group: "snapshot.storage.k8s.io", Version: "v1", Resource: "volumesnapshots"}: "VolumeSnapshotList",
|
||||
{Group: "snapshot.storage.k8s.io", Version: "v1", Resource: "volumesnapshotcontents"}: "VolumeSnapshotContentList",
|
||||
})
|
||||
discoveryClient = &DiscoveryClient{FakeDiscovery: kubeClient.Discovery().(*discoveryfake.FakeDiscovery)}
|
||||
)
|
||||
|
||||
@@ -220,3 +220,37 @@ func DataUploads(items ...metav1.Object) *APIResource {
|
||||
Items: items,
|
||||
}
|
||||
}
|
||||
|
||||
func StorageClasses(items ...metav1.Object) *APIResource {
|
||||
return &APIResource{
|
||||
Group: "storage.k8s.io",
|
||||
Version: "v1",
|
||||
Name: "storageclasses",
|
||||
ShortName: "sc",
|
||||
Kind: "StorageClass",
|
||||
Namespaced: false,
|
||||
Items: items,
|
||||
}
|
||||
}
|
||||
|
||||
func VolumeSnapshotContents(items ...metav1.Object) *APIResource {
|
||||
return &APIResource{
|
||||
Group: "snapshot.storage.k8s.io",
|
||||
Version: "v1",
|
||||
Name: "volumesnapshotcontents",
|
||||
Kind: "VolumeSnapshotContent",
|
||||
Namespaced: false,
|
||||
Items: items,
|
||||
}
|
||||
}
|
||||
|
||||
func VolumeSnapshots(items ...metav1.Object) *APIResource {
|
||||
return &APIResource{
|
||||
Group: "snapshot.storage.k8s.io",
|
||||
Version: "v1",
|
||||
Name: "volumesnapshots",
|
||||
Kind: "VolumeSnapshot",
|
||||
Namespaced: true,
|
||||
Items: items,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user