Commit Graph

569 Commits (d6d9a0ec085edc53a74762a51f9491b6ef43ea37)

Author SHA1 Message Date
Xun Jiang a69bd8b1f3 Remove VolumeSnapshot created during backup, when the VolumeSnapshotClass's DeletionPolicy is set to Delete.
1. Delete VolumeSnapshot directly when DeletionPolicy set to Retain.
2. Change VolumeSnapshotContent's DeletionPolicy to Retain, then delete VolumeSnapshot. After that delete VolumeSnapshotContent and change VSC DeletionPolicy to Delete back, then re-create the VolumeSnapshotContent.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-05-05 18:30:59 +08:00
Xun Jiang 6421f8ad02 Make waiting VolumeSnapshot to ready process parallel.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-05-05 14:32:55 +08:00
Wenkai Yin(尹文开) aa71427576
Merge pull request #4887 from reasonerjt/delete-orphan-vs
Delete orphan CSI snapshots in backup sync controller
2022-05-05 11:27:44 +08:00
Daniel Jiang 89e90d9be4 Delete orphan CSI snapshots in backup sync controller
This commit makes backup sync controller delete the volumesnapshot and
volumesnapshotcontent created by the backup which is cleaned up as orphan

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-05-05 10:54:34 +08:00
Daniel Jiang 628164668f
Merge pull request #4655 from ywk253100/220214_pod_volume_restore
Convert Pod Volume Restore resource/controller to the Kubebuilder framework
2022-05-05 10:33:41 +08:00
Xun Jiang/Bruce Jiang 001229a8b3
Merge pull request #4855 from reasonerjt/bak-delete-refact
Refactor backup deletion controller based on kubebuilder
2022-04-28 10:48:11 +08:00
Wenkai Yin(尹文开) d42e353610
Merge pull request #4866 from reasonerjt/clusterclass-restore-order
Add ClusterClasses to the restore priority list
2022-04-28 09:04:41 +08:00
Scott Seago 58a8371ca2
Merge pull request #4833 from ywk253100/220413_restart
Make in-progress backup/restore as failed when doing the reconcile
2022-04-27 11:45:01 -04:00
Daniel Jiang 74fd158a1c Refactor backup deletion controller based on kubebuilder
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-04-27 17:00:54 +08:00
Daniel Jiang f89691c5c1 Add ClusterClasses to the restore priority list
Make sure ClusterClasses are stored before Clusters.
Fixes #4767

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-04-27 15:53:55 +08:00
Wenkai Yin(尹文开) c2c211fefb Convert Pod Volume Restore resource/controller to the Kubebuilder framework
Convert Pod Volume Restore resource/controller to the Kubebuilder framework

Fixes #4134

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-26 16:23:38 +08:00
Wenkai Yin(尹文开) dfc86566b8 Make in-progress backup/restore as failed when doing the reconcile
Make in-progress backup/restore as failed when doing the reconcile to avoid hanging in in-progress status

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-26 11:05:03 +08:00
Xun Jiang 22dd0b2ebb Modify CSI VolumeSnapshot metric related code.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-23 12:59:56 +08:00
Daniel Jiang 3ec96e2eac
Merge pull request #4838 from ywk253100/220418_marker
Use controller-gen to generate the deep copy methods for objects
2022-04-21 14:00:48 +08:00
Wenkai Yin(尹文开) 9e786d681b
Merge pull request #4832 from reasonerjt/fix-rm-csi-bak-tmp
Make the vsc created by backup sync controller deletable
2022-04-20 17:19:09 +08:00
Scott Seago de17605c62
Merge pull request #4769 from jibutech/4754-fix
Skip povdolumerestore creation when restore excludes pv/pvc
2022-04-19 11:54:30 -04:00
Daniel Jiang 4f9e445142 Make the vsc created by backup sync controller deletable
Fixes #4760

This commit make changes in 2 parts:
1) When a volumesnapshotcontent is persisted during backup, velero will reset its
   `Source` field to remove the VolumeHandle, so that the
   csi-snapshotter will not try to call `CreateSnapshot` when its synced
   to another cluster with a backup.
2) Make sure the referenced volumesnapshotclasses are persisted and
   synced with the backup, so that when the volumesnapshotcontent is
   deleted the storage snapshot is also removed.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-04-19 15:06:59 +08:00
Xun Jiang 8064421e83 Update integrated Restic version and add insecureSkipTLSVerify for Restic CLI
1. Add --insecure-tls for ResticManager's commands.
2. Add --insecure-tls in PodVolumeBackup and PodVolumeRestore controller.
3. Upgrade integrated Restic version to v0.13.1
4. Change --last flag in Restic command to --latest=1 due to Restic version update.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-18 21:29:33 +08:00
Wenkai Yin(尹文开) 28bc8b7eef Use controller-gen to generate the deep copy methods for objects
As we are refactoring controllers with kubebuilder, use the controller-gen rather than code-generator to generate the deep copy methods for objects

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-18 21:18:00 +08:00
qiuming 9373c8a383
Merge pull request #4818 from blackpiglet/2499-add-metric-for-csi-snapshot
Add CSI VolumeSnapshot related metrics.
2022-04-15 16:55:37 +08:00
Xun Jiang/Bruce Jiang 22189e8e19
Merge pull request #4436 from codegold79/3454-convert-pod-volume-backup-controller-to-kubebuilder-v3-framework
Convert Pod Volume Backup resource/controller to the Kubebuilder V3 framework
2022-04-15 15:07:09 +08:00
Xun Jiang/Bruce Jiang dcc7b939a4
Merge pull request #4817 from yuvalman/deleteEmptyBackup
fix: delete empty backups
2022-04-15 14:32:44 +08:00
Wenkai Yin(尹文开) 8ddbe5120e
Merge pull request #4831 from qiuming-best/fix-ttl
Fix default-backup-ttl not work
2022-04-15 14:30:37 +08:00
Xun Jiang/Bruce Jiang c115a37b27
Merge pull request #4797 from blackpiglet/4758-avoid-duplicate-snapshot-for-csi
Avoid duplicated snapshotting, when CSI is enabled
2022-04-14 19:49:34 +08:00
Ming c17172f4ef Fix default-backup-ttl not work
Signed-off-by: Ming <mqiu@vmware.com>
2022-04-14 15:11:44 +08:00
I538157 74db20993b fix: delete empty backups
Signed-off-by: Yuval Manor <yuvalman958@gmail.com>
2022-04-12 13:13:56 +03:00
Xun Jiang 4daeec7ab9 Update CRD and GRPC.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-09 12:35:09 +00:00
Xun Jiang 5c74aa22e6 Avoid duplicated snapshotting, when CSI is enabled
Fix #4758

Do not take snapshot for PV to avoid duplicated snapshotting, when CSI feature is enabled.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-04-07 23:32:48 +08:00
Wenkai Yin(尹文开) 016ac129c6 Refactor schedule controller with kubebuilder
Refactor schedule controller with kubebuilder

fixes #4671

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-04-07 17:32:52 +08:00
Daniel Jiang 7c40949992
Merge pull request #4800 from reasonerjt/bump-up-csi-to-v1
Bump up to v1 API for CSI snapshot
2022-04-01 13:46:00 +08:00
Daniel Jiang 04f59ce003 Bump up to v1 API for CSI snapshot
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-03-31 22:55:03 +08:00
half-life666 e24c8845c4 Skip podvolumerestore creation when restore excludes pv/pvc
Signed-off-by: half-life666 <half-life@jibudata.com>
2022-03-31 09:27:33 +08:00
qiuming cdb346f7fd
Merge pull request #4778 from blackpiglet/add-kibishii-direcotry-parameter-for-e2e
Add parameter for e2e test to support modify kibishii install path.
2022-03-29 17:24:35 +08:00
Wenkai Yin(尹文开) 0b8f19e4d4
Merge pull request #4779 from reasonerjt/fix-restore-hook
Ensure the restore hook applied to new namespace based on the mapping
2022-03-29 14:07:08 +08:00
Daniel Jiang 2939914113 Ensure the restore hook applied to new namespace based on the mapping
fixes #4720

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2022-03-28 10:24:47 +08:00
Xun Jiang fa646888ef Add parameter for e2e test to support modify kibishii install path.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-03-27 20:33:26 +08:00
Scott Seago 8e4f88db68
Merge pull request #4295 from mercedes-benz/tobiasgiese/items-metrics
Add metrics backup_items_total and backup_items_errors
2022-03-25 16:40:43 -04:00
Tiger Kaovilai d1fdaecc94
Add labels to expired backups failing garbage collection. (#4757)
* Add bsl related TTL gc errors to labelSelectors
* if backup label map is nil, make map
* clear label if not BSL error

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-03-25 17:01:55 +08:00
Tobias Giese 1b8da68fc2 metrics: add items gauges
Signed-off-by: Tobias Giese <tobias.giese@daimler.com>
2022-03-22 18:36:55 +01:00
Xun Jiang/Bruce Jiang 9df0394359
Merge pull request #4740 from phuongatemc/add-priorityclass-to-podaction-plugin
Add priorityclass to podaction plugin
2022-03-22 19:43:04 +08:00
Scott Seago 09ec3ba994
Insert all restore errors and warnings into restore log (#4743)
This allows a user inspecting the restore logs to see any
errors or warnings generated by the restore so that they
will be seen even without having to use the describe cli.

Signed-off-by: Scott Seago <sseago@redhat.com>
2022-03-21 14:29:03 +08:00
Hoang, Phuong e9d5f7121c Add unit tests, change copyright years and revert unrelated changes.
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:51:53 -04:00
Hoang, Phuong d2ef5cbe0a Add changelog
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:05:13 -04:00
Xun Jiang 291f0c17e8 Support multiple skip option for E2E test
The GINKGO_SKIP option is updated to string that can be separated by "." for "make test-e2e".

Signed-off-by: Xun Jiang <jxun@vmware.com>
Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
2022-03-15 19:05:13 -04:00
qiuming 3c49ec4fb4
Merge pull request #4725 from blackpiglet/4725-support-multiple-skip
Support multiple skip option for E2E test
2022-03-08 19:43:28 +08:00
Xun Jiang d694d40919 Support multiple skip option for E2E test
The GINKGO_SKIP option is updated to string that can be separated by "." for "make test-e2e".

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-03-08 17:04:32 +08:00
Wenkai Yin(尹文开) 208d250ddc
Merge pull request #4719 from ywk253100/220225_bsl
Update BSL CR as long as there is any error
2022-03-08 16:40:24 +08:00
Wenkai Yin(尹文开) bcc9aa8d69 Update BSL CR as long as there is any error
1. Mark the BSL as "Unavailable" when gets any error
2. Add a new field "Message" to the BSL status to record the error message

Fixes #4485
Fixes #4405

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-03-07 10:25:18 +08:00
qiuming 79037848c8
Merge pull request #4623 from blackpiglet/push-image-in-github-workflow
Add pushing image to GCR in github workflow
2022-03-01 15:52:45 +08:00
qiuming b0cd90253b
Merge pull request #4661 from blackpiglet/4499-hook-podexec-container
[fix] Avoid overwritten hook's exec.container parameter when running …
2022-03-01 15:39:54 +08:00