This commit hardens the func "patchDynamicPVWithVolumeInfo":
1. Add nil checks for storageClass and the attributes.
2. Remove the double reported errors.
Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
When a Schedule has no explicit spec.skipImmediately, the reconciler
assigned &c.skipImmediately directly into the Schedule's spec pointer.
The subsequent write-through-pointer (*ptr = false) mutated the
reconciler's own shared field, silently disabling
--schedule-skip-immediately for every schedule reconciled afterward
for the life of the process.
Fix: copy the value into a fresh bool before taking its address.
Adds TestReconcileDoesNotCorruptReconcilerSkipImmediately, which
reconciles two schedules against one reconciler instance and asserts
the shared default is preserved.
Signed-off-by: Prajwal <percy38621@gmail.com>
BeforeSuite applies testdata/volume-snapshot-class/<provider>.yaml when
CSI is enabled, and there is no kind.yaml, so the suite fails before any
spec runs and none of the existing CSI tests can run on kind.
This adds a class for csi-driver-host-path. The driver ships its own, but
it lacks the velero.io/csi-volumesnapshot-class label so Velero never
selects it. Nothing sets FEATURES=EnableCSI for kind yet, so no test that
runs today is affected.
Signed-off-by: Sairam Bisoyi <sairamb2007.21@gmail.com>
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>
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>
* 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>
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>
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>
* 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>
* site: add conference talks to resources page and LinkedIn to community page
Add a Conference Talks section to the resources page with Velero-related
talks from KubeCon EU 2026, KubeCon India 2026, KubeCon China 2024,
KubeCon EU 2023, and DevConf.IN 2025. Includes YouTube embeds where
recordings are available and sched.com links for all talks.
Add LinkedIn page link to the community page alongside existing
Twitter and Slack links.
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
* site: add Open Source Summit NA 2022 Velero talk to resources
Add the Velero talk by Orlin Vasilev and Scott Seago from
Open Source Summit North America 2022 with YouTube embed
and sched.com link.
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
---------
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
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>
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>
Refactor function ShouldPerformCustomAction and GetActionParameters:
extract shared code to a new function getPVAndMatchAction.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>