Commit Graph

6329 Commits

Author SHA1 Message Date
Lubron Zhan eda35227bb Make pkg/apis its own Go module
Extract pkg/apis into a standalone Go module with its own go.mod/go.sum,
and wire it back into the main module via a local replace directive.

Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 11:09:23 -07:00
lyndon-li 5844ce873d Merge pull request #9933 from Lyndon-Li/recall-rebind-volume-with-restore-pv-2
Recall rebind volume with restore pv
2026-06-24 17:41:56 +08:00
Lyndon-Li 6d87680ea0 Merge branch 'main' into recall-rebind-volume-with-restore-pv-2 2026-06-24 11:48:09 +08:00
Lyndon-Li 6af6e4e85f recall the way to rebind volume with restorePV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 11:47:42 +08:00
Lyndon-Li 8c3a638d88 use restorePV to cover retained and non-retained case
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 11:47:42 +08:00
Lyndon-Li 0f9874bf06 add wait restorePV detach to same mode route
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 11:47:42 +08:00
Lyndon-Li 9a615430ed recall the way to rebind volume with restorePV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 11:47:42 +08:00
lyndon-li 960a20f12c Merge pull request #9932 from Lyndon-Li/pv-rebind-test-2
Wait restorePV detached before binding the cloned PV
2026-06-24 11:42:52 +08:00
Adam Zhang dd5db4e863 restore filter enhancement (#9924)
* restore filter enhancement

enhance restore filter with resource policies, introduce resource
policies with fine-grained control for resources in restore, both
cluster scoped resources and namespace scoped resources, with
labels, names include/exclude support with glob patterns.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* address review comments

- Add introductory sentence linking to the Phase 1 backup filters PR.
- Add clarification that a backup's ConfigMap may not exist on the
  target cluster because it might be on a different Velero instance.
- Remove redundant explanations about backup-specific concepts
  (volume policies, include/exclude policies).
- Remove the non-goal regarding restore-side `includeExcludePolicy`.
- Remove the "Interaction with Backup-Side Filters" section.
- Remove "Step 5" from the design, as additional items requested by
  plugins should intentionally bypass fine-grained filter checks
  (consistent with backup side Stage 2).

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* address more review comments

- remove confusion rows regarding per-namespace kind list
- simplified CLI output to configmap name only

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

---------

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-23 21:32:07 -04:00
Lyndon-Li 04ef90dfb7 recall the way to rebind volume with restorePV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 17:35:44 +08:00
Lyndon-Li eb0aa625ce use restorePV to cover retained and non-retained case
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 17:33:17 +08:00
Lyndon-Li 20a0def15d add wait restorePV detach to same mode route
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 17:23:24 +08:00
Lyndon-Li 77520d0522 recall the way to rebind volume with restorePV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 17:21:36 +08:00
Lyndon-Li a8cf6646e1 wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 16:22:33 +08:00
Lyndon-Li b68aa15344 wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 16:21:51 +08:00
lyndon-li 3b66458edd Merge branch 'main' into pv-rebind-test-2 2026-06-22 13:17:51 +08:00
Lyndon-Li d626588c10 wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 13:17:26 +08:00
Xun Jiang/Bruce Jiang 6e6bf8119b Merge pull request #9911 from blackpiglet/jxun/add_log_for_filtered_resources
Add log when resources are filtered out due to verbs or sub-resources.
2026-06-22 11:36:03 +08:00
Lyndon-Li 00b25fe31a Merge branch 'main' into pv-rebind-test-2 2026-06-22 11:23:12 +08:00
Lyndon-Li 22d8b4acbb wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 11:21:20 +08:00
lyndon-li 8754459381 Merge pull request #9930 from Lyndon-Li/data-mover-support-fs-type
Support fsType for data mover
2026-06-22 11:12:30 +08:00
Lyndon-Li 4f22048472 support fsType for data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-18 15:39:44 +08:00
lyndon-li 6b9fd2f51f Merge branch 'main' into data-mover-support-fs-type 2026-06-18 15:36:51 +08:00
Joseph Antony Vaikath 2826b98190 Fix restore finalization overwriting dynamically provisioned PV labels (#9903)
* Merge backup PV labels instead of wholesale replacement during restore finalization

Change patchDynamicPVWithVolumeInfo to merge backup labels into the
dynamically provisioned PV rather than overwriting its entire label map.
Labels already present on the new PV (e.g. topology labels set by the
provisioner) are preserved, and only missing labels from the backup are
added. This prevents stale topology labels from the source cluster from
overwriting correct values set by the target cluster's provisioner.

Update needPatch to only trigger when backup labels are absent from the
new PV, not when values differ — since differing values now intentionally
favour the dynamically provisioned PV.

Signed-off-by: Joseph <joseph@amazee.io>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Add changelog

Signed-off-by: Joseph <jvaikath@redhat.com>

* Update changelog to reflect new approach

Signed-off-by: Joseph <joseph@amazee.io>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Trigger CI rebuild

Signed-off-by: Joseph <joseph@amazee.io>
Signed-off-by: Joseph <jvaikath@redhat.com>

---------

Signed-off-by: Joseph <joseph@amazee.io>
Signed-off-by: Joseph <jvaikath@redhat.com>
2026-06-17 08:30:33 -04:00
Joseph Antony Vaikath 483becaa7b Add CONTAINER_TOOL variable to Makefile for podman support (#9904)
* Add CONTAINER_TOOL variable to Makefile for podman support

Local development targets (shell, lint, build-image, clean, serve-docs)
hardcode `docker`, preventing developers who use podman from running
them. Add a CONTAINER_TOOL variable that defaults to `docker` and can
be overridden:

  make lint CONTAINER_TOOL=podman

CI/release targets (container builds, manifest push, buildx instance
management) are left unchanged since they use Docker-specific features
like `docker buildx` and `docker manifest`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Add changelog for PR #9904

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Add guards to prevent podman on docker-only targets

Multi-arch image targets (container, push-manifest, etc.) require
docker buildx/manifest which podman does not support. Add explicit
guards that fail fast with a clear error message instead of producing
cryptic runtime failures.

Guarded targets: container, container-linux, container-windows,
push-manifest, push-build-image, and the buildx path in build-image.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Trigger CI rebuild

Signed-off-by: Joseph <jvaikath@redhat.com>

---------

Signed-off-by: Joseph <jvaikath@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-17 08:29:01 -04:00
Daniel Jiang faf24ae9c1 Merge pull request #9901 from reasonerjt/bak-vol-policy-design
Design for global volume policies
2026-06-17 11:19:26 +08:00
Lyndon-Li 6a8ba4af5c support fsType for data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-16 17:59:51 +08:00
lyndon-li 1e1ce4d221 bump up kopia 0.23.1 (#9923)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-16 17:57:40 +08:00
lyndon-li 55eb5f2820 Clone pv on rebind (#9913)
* clone pv on rebind

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* update fsType to cloned PV

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* clone pv on rebind

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* clone pv on rebind

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-16 17:47:21 +08:00
Daniel Jiang 8a31544a64 Design for global volume policies
Add the design for global volume policies to address the requirement in
 #9858

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-06-16 15:16:45 +08:00
Adam Zhang 3fa00c679c Merge pull request #9908 from adam-jian-zhang/cache-ns-filter-lookup
caching the call for GetNamespaceFilter
2026-06-16 13:29:46 +08:00
Chlins Zhang afe0565201 Merge pull request #9906 from chlins/feat/pvc-volumemode-condition
feat(resourcepolicies): support PVC volume mode and access mode matching
2026-06-16 11:09:19 +08:00
Chlins Zhang 818d969b39 Merge branch 'main' into feat/pvc-volumemode-condition 2026-06-16 10:18:59 +08:00
Lyndon-Li 180bf4836e support fsType for data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-15 18:13:30 +08:00
Adam Zhang 13f06026c0 caching the call for GetNamespaceFilter
Introduces a concurrent-safe sync.Map cache to the backup Request struct
to memoize GetNamespaceFilter results. This avoids re-evaluating glob
patterns for every item, significantly improving backup performance while
preserving the original exact-match precedence logic.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-15 16:18:54 +08:00
Xun Jiang/Bruce Jiang 89f18122c2 Merge pull request #9917 from adam-jian-zhang/bump-kind-action
bump the setup kind action
2026-06-15 16:16:19 +08:00
chlins a191a449fb feat(resourcepolicies): support PVC volume mode and access mode matching
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-06-15 16:08:38 +08:00
Adam Zhang dd850a451c ensure the kind cluster name to "kind"
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-15 15:48:43 +08:00
Adam Zhang bb3e1203df update minio DOCKFILE_SHA url
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-15 15:36:22 +08:00
Adam Zhang 7627223d0f bump the setup kind action
update kind setup action to helm/kind-action@v1 and use
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true to suppress warning.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-15 14:44:43 +08:00
Xun Jiang 4cf33421da Add log when resources are filtered out due to verbs or sub-resources.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-12 14:57:26 +08:00
lyndon-li ea9e7da301 Merge pull request #9902 from shubham-pampattiwar/docs/vgs-external-snapshotter-requirement
Add external-snapshotter version requirement to VGS docs
2026-06-11 14:15:24 +08:00
Xun Jiang/Bruce Jiang 02cb85ce90 Merge pull request #9890 from blackpiglet/jxun/main/bump_deps
[main] Bump some dependancies to fix CVEs and replace some inactive maintained packages.
2026-06-11 10:08:22 +08:00
Shubham Pampattiwar b8a121d0b3 Add external-snapshotter version requirement to VGS docs
Document that Velero 1.18.1+ requires external-snapshotter v8.2.0 or
later for VolumeGroupSnapshot support, since Velero upgraded from
v1beta1 to v1beta2 APIs.

Relates to #9882

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-10 09:39:33 -07:00
lyndon-li 4c1950980a Merge pull request #9887 from Lyndon-Li/incremental-object-aware-write-at
Incremental aware object writer - writeat
2026-06-10 18:01:42 +08:00
Xun Jiang 49b670a791 Replace github.com/pkg/errors by github.com/cockroachdb/errors
Change errors.Cause to errors.Is, because github.com/cockroachdb/errors
New() function create a error with error stack with depth 1, but
github.com/pkg/errors's New() function create error with no depth.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-10 15:55:57 +08:00
Xun Jiang 981988d31b Replace github.com/joho/godotenv.
Move the needed code into Velero repository.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-10 15:54:17 +08:00
Xun Jiang e15e0af346 Replace gopkg.in/yaml.v3 by go.yaml.in/yaml/v3
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-10 15:54:17 +08:00
Xun Jiang e395b6ea6b Replace github.com/robfig/cron/v3 by github.com/netresearch/go-cron
Replace k8s.io/utils/pointer with k8s.io/utils/ptr

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-10 15:54:17 +08:00
lyndon-li 901b1a0ed1 Merge pull request #9892 from Lyndon-Li/refactor-generic-exposer-interface
Enhance RebindVolume method for generic restore exposer
2026-06-10 15:54:16 +08:00