Commit Graph
1965 Commits
Author SHA1 Message Date
Krishna AwasthiandGitHub 41b95b5919 Refactor: Replace context.TODO() with properly plumbed contexts in CSI actions (#10247)
Signed-off-by: opbot_xd <awasthikrishna23052005@gmail.com>
2026-08-14 16:17:29 +08:00
Jay SawantandGitHub 798e34054b fix: trim spaces in ordered-resources names (#10259)
* fix: trim spaces in ordered-resources names

Signed-off-by: Jay2006sawant <jay242902@gmail.com>

* chore: rename changelog for PR 10259

Signed-off-by: Jay2006sawant <jay242902@gmail.com>

---------

Signed-off-by: Jay2006sawant <jay242902@gmail.com>
2026-08-14 16:17:16 +08:00
RalthosandGitHub 8e3c92f0bf Document what the DownloadRequest Processed phase means (#10245)
Processed means the controller signed a URL into status.downloadURL. It
does not mean the object is present: GetDownloadURL builds the key by
convention and signs it, with no existence check, so a request whose
target never produced a file still reaches Processed and the URL 404s.

The CLI never sees this because it filters on backup and restore phase
before creating the request. Other API consumers have nothing in the
status telling them that filter is needed, and the field description
said only "Phase is the current state of the DownloadRequest".

Documentation only. The field comments are what controller-gen writes
into the CRD, so this reaches kubectl explain and generated clients
without anyone reading the Go source.

Refs #10232

Signed-off-by: saral <ilovegojo2580@gmail.com>
2026-08-14 15:37:05 +08:00
lyndon-liandGitHub d60ee8ba0e clarify the security context to velero server (#10256)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-14 15:30:45 +08:00
lyndon-liandGitHub 4f55fb5a65 Fix pvr deadlock (#10250)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Failing after 6s
Run the E2E test on kind / get-go-version (push) Failing after 7s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
* fix pvr deadlock

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

* fix pvr deadlock

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

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-13 12:21:20 -04:00
chlins b6e091a441 chore(changelogs): rename unreleased changelog entry to 10155-chlins
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-08-13 16:52:23 +08:00
Xun Jiang/Bruce JiangandGitHub b353fafe5e Merge pull request #10176 from blackpiglet/jxun/volume_policy_support_data_mover_setting
Support to set data mover for the uploader from volume policy.
2026-08-13 11:34:14 +08:00
Chlins ZhangandGitHub 7d36376109 Merge pull request #10251 from Lyndon-Li/pvr-restorer-could-run-concurrently
Fix wrong node-agent check result when PVR restorer run concurrently
2026-08-13 11:20:37 +08:00
R4mboandGitHub 1e368b0778 add curl --fail flag to kubectl download in e2e kind workflow (#10174)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
* add curl --fail flag to kubectl download in e2e kind workflow

Signed-off-by: samay43 <samayrbhat43@gmail.com>

* add changelog entry

Signed-off-by: samay43 <samayrbhat43@gmail.com>

---------

Signed-off-by: samay43 <samayrbhat43@gmail.com>
2026-08-12 10:24:40 -07:00
Lyndon-Li 5dd0b9e849 fix node-agent check contest
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-12 22:49:21 +08:00
RalthosandGitHub 8d275e69cc Print n/a for unset timestamps in backup and restore get (#10206)
velero backup get prints <nil> in CREATED for a backup that never
started, and velero restore get prints it in both STARTED and COMPLETED.
The timestamps are *metav1.Time and are appended to the row unformatted,
so a nil pointer reaches the user as Go's nil literal.

This is reachable in ordinary use. A backup that fails validation never
starts, so StartTimestamp is never set, and a restore that fails
validation gets neither timestamp.

formatTimestamp returns n/a for an unset value, matching
humanReadableTimeFromNow, which already handles a zero expiration in the
same row. A set timestamp is unchanged.

Adds tests for both printers, which had no row-level coverage.

Signed-off-by: saral <ilovegojo2580@gmail.com>
2026-08-12 15:42:53 +08:00
AftAb-25andGitHub 9a1d2e6eb0 Fix switch case ordering bug in filterBackupOwnerReferences (#10161)
* Fix switch case ordering in filterBackupOwnerReferences (Issue #10160)

When client.Get returns a transient (non-NotFound) error, the previous
case ordering caused the UID mismatch case to fire against a zero-value
struct, silently dropping the owner reference and logging a misleading
'mismatched UIDs' warning instead of the intended error log.

Fix: move the general error handler before the UID mismatch check so
it is evaluated while err is still relevant. The UID check now only
runs when err == nil (i.e. the Schedule was successfully fetched).

Also add a test case that injects a transient Get error via the fake
client interceptor to verify the owner reference is preserved.

Signed-off-by: aftab <aftab123215@gmail.com>

* Add changelog for #10160

Signed-off-by: aftab <aftab123215@gmail.com>

---------

Signed-off-by: aftab <aftab123215@gmail.com>
2026-08-12 15:12:58 +08:00
Daniel JiangandGitHub 2aa5175594 Mark the existed resource as skipped during restore (#10243)
This commit makes sure the object is marked as "skipped" when there's
object with same name exists in the cluster during restore.  Otherwise,
such object will appeared as "failed" in the "Resource list" in the
output of "velero restore describe xxx --details"

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-08-12 13:53:56 +08:00
Krishna AwasthiandGitHub c303809857 Enhancement: Add missing test assertions for PVCBackupSummary in podvolume backupper (#10218)
Signed-off-by: opbot_xd <awasthikrishna23052005@gmail.com>
2026-08-11 15:42:48 -04:00
RalthosandGitHub 105350b78b Make restore logs testable by returning errors (#10234)
pkg/cmd/cli/restore/logs.go was the last command in the CLI still calling
cmd.Exit, which calls os.Exit directly. Two of its own tests were skipped
because of it, and said so:

    t.Skip("Cannot test restore not complete case due to cmd.Exit() call")

This gives restore logs the LogsOptions shape that backup logs already
uses: Complete, BindFlags and Run returning an error, with the cobra
command passing that to cmd.CheckError. Both skipped tests now run and
assert on the returned errors.

Exit status is unchanged; cmd.CheckError also exits 1. The two refusal
messages now carry the standard "An error occurred:" prefix and match
the wording backup logs uses.

Signed-off-by: saral <ilovegojo2580@gmail.com>
2026-08-11 14:33:02 -04:00
ae1d869c77 Add printer columns for Backup and Restore CRDs (#10200)
e2e-test-kind.yaml / extract (push) Failing after 7s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
* Add printer columns for Backup and Restore CRDs

kubectl get backup and kubectl get restore fall back to the default
NAME/AGE table because neither type declares printer columns, while
Schedule and BackupStorageLocation do. Anything reading the API without
the velero binary cannot see a backup's phase, error count or timing.

Printer columns were added in #2881 and reverted in #3652 as a
workaround for #3600, a CRD install error that was never root-caused.
Schedule regained columns in 2022 and BackupStorageLocation has them
today, with no recurrence.

Only fields expressible as plain JSONPath are included. Expiration is
deliberately omitted: kubectl renders a date column as time elapsed,
so a future expiration prints <invalid>, which covers every backup that
has not yet expired.

Fixes #10199

Signed-off-by: saral <ilovegojo2580@gmail.com>

* Rename changelog name to pass changelog check

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>

---------

Signed-off-by: saral <ilovegojo2580@gmail.com>
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
2026-08-11 16:58:19 +00:00
RalthosandGitHub 48f2095dc9 Site: document artifact download failures with an in-cluster s3Url (#10231)
troubleshooting.md covers SignatureDoesNotMatch but not the other way a
log or results download fails: the pre-signed URL carries the s3Url host,
which for an in-cluster Service name does not resolve on the client.

The backup or restore itself is unaffected, which makes the error easy to
misread. The fix, publicUrl, is documented only under exposing Minio, so
this links there instead of duplicating it.

Signed-off-by: saral <ilovegojo2580@gmail.com>
2026-08-11 11:44:02 -04:00
RalthosandGitHub 93df34d2ea Add printer columns for VolumeSnapshotLocation (#10216)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Failing after 7s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
build-image / Build (push) Failing after 7s
push.yml / extract (push) Failing after 8s
Main CI / get-go-version (push) Failing after 9s
Main CI / Build (push) Skipped
kubectl get volumesnapshotlocation falls back to NAME and AGE, while
BackupStorageLocation beside it shows provider and phase. This follows
the same pattern for the remaining location type.

Phase is worth surfacing here because the CLI does not print it.
velero snapshot-location get shows only NAME and PROVIDER, so
status.phase, which carries the same Available/Unavailable enum as
BackupStorageLocation, is currently not visible from either tool.

Raised as an open question on #10199 and left out of #10200 to keep that
change to the two types the issue was filed about.

Signed-off-by: saral <ilovegojo2580@gmail.com>
2026-08-11 17:04:26 +08:00
Xun Jiang 79d9a5cde4 Support to set data mover for the uploader from volume policy.
Refactor function ShouldPerformCustomAction and GetActionParameters:
extract shared code to a new function getPVAndMatchAction.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-08-11 16:52:21 +08:00
Chlins ZhangandGitHub bb95f680cb Merge pull request #10125 from chlins/fix/hook-exec-timeout-and-leak
Cancel hook exec stream on timeout and bound hook timeouts
2026-08-11 15:57:10 +08:00
Chlins ZhangandGitHub 41df2dbe24 Merge pull request #10155 from chlins/fix/verify-build-tool-downloads
Verify build tool downloads
2026-08-11 15:56:49 +08:00
lyndon-liandGitHub 23c215d054 Merge pull request #10225 from Lyndon-Li/object-reader-throughput-improvement
Object reader throughput improvement
2026-08-11 15:48:42 +08:00
Wenkai Yin(尹文开)andGitHub 8b7951426b Add "SnapshotClass" to DataUploadResult (#10227)
Add "SnapshotClass" to DataUploadResult

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2026-08-11 15:48:31 +08:00
Lyndon-Li c8127e243b object reader throughput improvement
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-11 14:07:59 +08:00
Xun Jiang/Bruce JiangandGitHub e354e7aec4 Merge pull request #10138 from Jay2006sawant/fix/block-uploader-and-batchforget-errors
fix: return errors correctly in block restore validation and BatchForget
2026-08-11 11:25:06 +08:00
Tiger KaovilaiandGitHub ced051b72f Fix restore-wait init container ignoring pod-level securityContext (#10047)
restore-wait's securityContext fallback chain checked the fs-restore
ConfigMap, then the first container's SecurityContext, then hardcoded
runAsUser 1000. It never consulted pod.Spec.SecurityContext, so pods
that set identity only at the pod level got a helper running as uid
1000 regardless of the workload's actual uid. On volumes where restored
content is owner-only-visible to a non-1000 uid, the helper's stat on
the done-file returns EACCES forever and the pod deadlocks at Init:0/1.

Add pod-level spec.securityContext.runAsUser/runAsGroup as a fallback
between the container-level check and the hardcoded default, since the
workload's own identity is the one that can read what it restored.
Defer to the pod's own RunAsNonRoot setting when runAsUser is 0, since
the hardcoded RunAsNonRoot: true would otherwise contradict a root uid.

Also add a test case covering both container-level and pod-level
SecurityContext set together, confirming container-level still wins.

Fixes #10046

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-08-10 15:36:14 -04:00
cc4161b7ed ci: add backport/cherry-pick GitHub Action for release branches (#10158)
e2e-test-kind.yaml / extract (push) Failing after 5s
Run the E2E test on kind / get-go-version (push) Failing after 5s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 2s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
* ci: add backport/cherry-pick GitHub Action for release branches

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

* ci: add unreleased changelog for backport Action

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

* ci: pin backport-action to commit SHA for write-permission safety

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

* ci: address review nits on backport workflow

Move permissions to the job (least privilege), document the
backport-action bot user id guard, and fix a garbled comment.

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

---------

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
Co-authored-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
2026-08-09 11:01:32 -05:00
22ae12575c Fix excluded namespace objects leaking into backup with cross-namespa… (#10159)
* Fix excluded namespace objects leaking into backup with cross-namespace listing

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

* Add changelog for PR 10159

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

---------

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
Co-authored-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
2026-08-09 10:15:29 -05:00
Chlins ZhangandGitHub a5c14755d1 Merge pull request #10102 from chlins/fix/archive-item-path-containment
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Failing after 7s
Run the E2E test on kind / get-go-version (push) Failing after 7s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 5s
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
Verify extracted item paths stay inside the backup directory
2026-08-06 15:02:57 +08:00
JosephandClaude Opus 4.6 64079056b7 Fast-fail backup when built-in data mover has no running node-agent
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>
2026-08-05 11:48:39 -07:00
JosephandClaude Opus 4.6 3c49bbec75 Add dynamic resource autocompletion to Velero CLI
Register cobra completion callbacks for all commands that accept
existing Velero resource names. A centralized completeNames helper
uses apimachinery's meta.ExtractList/Accessor to list resources with
a 3-second timeout, filter by prefix, and deduplicate already-typed
arguments. Wires ValidArgsFunction on 20 commands and
RegisterFlagCompletionFunc on 9 flags across backup, restore,
schedule, backuplocation, snapshotlocation, repo, and debug.

Closes #9782

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>
2026-08-05 08:17:44 -07:00
Shubham PampattiwarandGitHub f73888abbd Add snapshotClass parameter to volume policy snapshot action (#10070)
* Add SnapshotClassParameter constant and GetSnapshotClass getter

Add a new snapshotClass action parameter to volume policies, allowing
users to specify which VolumeSnapshotClass to use for CSI snapshots.
This follows the existing dataMover parameter pattern with a typed
constant and getter method on the Action struct.

Ref: #8807

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add snapshotClass parameter validation

Validate the snapshotClass parameter in Action.validate(): it must only
appear on snapshot actions, must be a string, and must not be empty.
Follows the same validation pattern as the dataMover parameter.

Ref: #8807

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add volume policy tier to VolumeSnapshotClass selection

Add GetVolumeSnapshotClassFromVolumePolicy helper and extend
GetVolumeSnapshotClass with a policySnapshotClass parameter. The new
tier sits between PVC annotation and backup annotation in the priority
chain: PVC annotation > volume policy > backup annotation > VSC label.

Ref: #8807

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Wire snapshotClass from volume policy through CSI plugin

In pvcBackupItemAction.Execute, call GetActionParameters to extract the
snapshotClass from the matched volume policy and pass it through
getVolumeSnapshotReference and createVolumeSnapshot to
GetVolumeSnapshotClass. This connects the volume policy parameter to
the CSI snapshot creation path.

Fixes #8807

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add changelog for PR #10070

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Document snapshotClass volume policy parameter

Add documentation for the new snapshotClass parameter in the volume
policy snapshot action. Update the CSI docs to include volume policy
as a tier in the VolumeSnapshotClass selection priority, and add
Example 6 to resource-filtering.md showing multi-array usage.

Ref: #8807

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Fix import ordering in pvc_action.go

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add end-to-end test for snapshotClass volume policy parameter

Verify that when a volume policy specifies snapshotClass, the CSI
plugin creates a VolumeSnapshot using that VolumeSnapshotClass. The
test uses a VSC without the velero label to confirm selection comes
from the volume policy parameter, not the label-based fallback.

Ref: #8807

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Fix gofmt struct field alignment in pvc_action_test.go

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add GetSnapshotClass to VolumeHelper interface

Add a GetSnapshotClass method to VolumeHelper that encapsulates the
extraction of the snapshotClass parameter from volume policy actions.
This avoids requiring callers to parse raw parameters from
GetActionParameters. Simplify the CSI plugin to use the new method.

Ref: #8807

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Fix gofmt formatting in resource_policies.go

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-05 08:13:59 -07:00
chlins 5a615ad580 Verify build tool downloads
Pin architecture-specific SHA-256 checksums for kubebuilder, protoc, and GoReleaser before installation.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-08-04 17:22:50 +08:00
Jay2006sawant b2dea8d169 chore: add one-line changelog for PR 10138
Signed-off-by: Jay2006sawant <jay242902@gmail.com>
2026-08-04 14:49:08 +05:30
Adam ZhangandGitHub 094a183d94 Merge pull request #10016 from adam-jian-zhang/restore-filters-guide
add documentation for fine-grained restore filters
2026-08-04 16:06:03 +08:00
lyndon-liandGitHub 0e8664a018 Merge pull request #10106 from blackpiglet/jxun/cbt_modification
Fix some issues for CBT features:
2026-08-04 16:02:11 +08:00
Chlins ZhangandGitHub 0e16235a9b Merge pull request #10150 from chlins/fix/data-mover-drop-host-mounts
Drop node-agent host path mounts from data mover pods
2026-08-04 15:41:10 +08:00
de32d93b8e Fix ResourceDeletionStatusTracker key Kind mismatch in terminating-namespace wait (#9987)
EnsureNamespaceExistsAndIsReady wrote the tracker key with namespace.Kind
(getNamespace() sets Kind=Namespace) but read it with clusterNS.Kind
(client.Get strips TypeMeta -> Kind=empty). The keys never matched, so the
skip-path never fired and every item in a terminating namespace paid the full
--terminating-resource-timeout wait (per-resource instead of per-namespace).

Use the passed-in namespace object for Contains so Add/Contains keys match.
Add a regression test that reproduces the production Kind divergence.

Signed-off-by: Shashank1306s <shashasingh@microsoft.com>
Co-authored-by: Shashank1306s <shashasingh@microsoft.com>
Co-authored-by: Priyansh Choudhary <im1706@gmail.com>
2026-08-03 23:28:01 -07:00
Xun Jiang 11545ee63c Fix logs, CRD, and GetDataMover for CBT features.
Modify the logs.
Modify the CRD's data mover's comment.
Modify the resource policy's GetDataMover for default data mover case.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-08-04 06:25:05 +00:00
chlins 0eec47e574 Drop node-agent host path mounts from data mover pods
The CSI snapshot and generic restore exposers access data through PVCs, so they no longer inherit the node-agent host path volumes. Also drop all capabilities on the data mover container.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-08-04 13:48:57 +08:00
Shubham Pampattiwar d87a66393d Add changelog for PR #10098
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:48 -07:00
Adam Zhang 466148dfbe add documentation for fine-grained restore filters
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-08-03 16:36:55 +08:00
Jay2006sawant 8ec4b22496 fix: return errors correctly in block restore validation and BatchForget
Signed-off-by: Jay2006sawant <jay242902@gmail.com>
2026-08-03 09:44:00 +05:30
Xun Jiang f0797c9104 Use "" as parentSnapshot for DU when BackupType is incremental.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-07-31 16:24:17 +08:00
Chlins ZhangandGitHub 950e4adc73 Merge branch 'main' into fix/hook-exec-timeout-and-leak 2026-07-31 15:02:39 +08:00
chlins 4220c7abe8 Cancel hook exec stream on timeout and bound hook timeouts
Hook timeouts come from pod annotations via time.ParseDuration, which accepts
negative and arbitrarily large values, and the exec stream was never cancelled.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-31 15:02:23 +08:00
chlinsandgithub-actions[bot] 0f86521735 Verify extracted item paths stay inside the backup directory
archive.GetItemFilePath/GetVersionedItemFilePath joined the group resource,
namespace and name into a path without checking the result against rootDir.
Those components can come from backup contents - the additional items a
RestoreItemAction returns are built from annotations on a backed up object -
so a component containing ".." resolved to an arbitrary file on the Velero
pod, which was then Stat'd, unmarshalled and restored as a Kubernetes object.

Both helpers now return an error when the joined path escapes rootDir, and all
callers handle it. rootDir is empty when building an entry path inside the
backup tarball, so "." is used as the containment base for that relative form.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-31 06:02:43 +00:00
Chlins ZhangandGitHub 9063ee5fb7 Replace rebase action with GitHub CLI (#10093)
* Replace rebase action with GitHub CLI

Signed-off-by: chlins <chlins.zhang@gmail.com>

* Add contents write permission for rebase workflow

Updating the PR branch pushes to the head branch, which requires contents: write for the GITHUB_TOKEN.

Signed-off-by: chlins <chlins.zhang@gmail.com>

---------

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-30 12:24:51 -04:00
5691f7f29d Support overriding Schedule annotations via template.metadata.annotations (#10045)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Failing after 13s
Run the E2E test on kind / get-go-version (push) Failing after 14s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Successful in 14s
Main CI / get-go-version (push) Successful in 16s
Main CI / Build (push) Failing after 2m46s
* Support overriding Schedule annotations via template.metadata.annotations

Adds an Annotations field to BackupSpec.Metadata, mirroring the existing
Labels override. When Schedule.Spec.Template.Metadata.Annotations is set,
it is used for the resulting Backup's annotations instead of copying
Schedule.Annotations directly, allowing users to opt out of unwanted
annotations (e.g. ArgoCD tracking annotations) being propagated from
Schedule to Backup.

Fixes #5836

Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>

* Rename changelog fragment to match PR number 10045

Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>

---------

Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-07-29 15:55:51 +08:00
Scott SeagoandGitHub 041f577343 Merge branch 'main' into fix-vsc-hardcode 2026-07-28 20:21:50 -04:00