Shubham Pampattiwar 898fa13ed7 Fix managed fields patch for resources using GenerateName
When restoring resources with GenerateName (where name is empty and K8s
assigns the actual name), the managed fields patch was failing with error
"name is required" because it was using obj.GetName() which returns empty
for GenerateName resources.

The fix uses createdObj.GetName() instead, which contains the actual name
assigned by Kubernetes after resource creation.

This affects any resource using GenerateName for restore, including:
- PersistentVolumeClaims restored by kubevirt-velero-plugin
- Secrets and ConfigMaps created with generateName
- Any custom resources using generateName

Changes:
- Line 1707: Use createdObj.GetName() instead of obj.GetName() in Patch call
- Lines 1702, 1709, 1713, 1716: Use createdObj in error/info messages for accuracy

This is a backwards-compatible fix since:
- For resources WITHOUT generateName: obj.GetName() == createdObj.GetName()
- For resources WITH generateName: createdObj.GetName() has the actual name

The managed fields patch was already correctly using createdObj (lines 1698-1700),
only the Patch() call was incorrectly using obj.

Fixes restore status showing FinalizingPartiallyFailed with "name is required"
error when restoring resources with GenerateName.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2025-10-27 11:57:55 -07:00
2025-10-27 04:41:04 +00:00
2025-10-23 15:02:17 +08:00
2025-07-22 15:56:04 +08:00
2025-09-10 17:58:38 +08:00
2025-06-06 10:54:11 -04:00
2024-10-22 18:30:26 +08:00
2025-07-22 15:56:04 +08:00
2025-07-22 15:56:04 +08:00
2024-07-10 23:44:55 -07:00
2017-08-02 13:27:17 -04:00
2024-05-14 14:19:25 -04:00
2025-07-22 15:56:04 +08:00

100

Build Status CII Best Practices GitHub release (latest SemVer)

Overview

Velero (formerly Heptio Ark) gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. You can run Velero with a public cloud platform or on-premises.

Velero lets you:

  • Take backups of your cluster and restore in case of loss.
  • Migrate cluster resources to other clusters.
  • Replicate your production cluster to development and testing clusters.

Velero consists of:

  • A server that runs on your cluster
  • A command-line client that runs locally

Documentation

The documentation provides a getting started guide and information about building from source, architecture, extending Velero and more.

Please use the version selector at the top of the site to ensure you are using the appropriate documentation for your version of Velero.

Troubleshooting

If you encounter issues, review the troubleshooting docs, file an issue, or talk to us on the #velero channel on the Kubernetes Slack server.

Contributing

If you are ready to jump in and test, add code, or help with documentation, follow the instructions on our Start contributing documentation for guidance on how to setup Velero for development.

Changelog

See the list of releases to find out about feature changes.

Velero compatibility matrix

The following is a list of the supported Kubernetes versions for each Velero version.

Velero version Expected Kubernetes version compatibility Tested on Kubernetes version
1.17 1.18-latest 1.31.7, 1.32.3, 1.33.1, and 1.34.0
1.16 1.18-latest 1.31.4, 1.32.3, and 1.33.0
1.15 1.18-latest 1.28.8, 1.29.8, 1.30.4 and 1.31.1
1.14 1.18-latest 1.27.9, 1.28.9, and 1.29.4
1.13 1.18-latest 1.26.5, 1.27.3, 1.27.8, and 1.28.3
1.12 1.18-latest 1.25.7, 1.26.5, 1.26.7, and 1.27.3
1.11 1.18-latest 1.23.10, 1.24.9, 1.25.5, and 1.26.1

Velero supports IPv4, IPv6, and dual stack environments. Support for this was tested against Velero v1.8.

The Velero maintainers are continuously working to expand testing coverage, but are not able to test every combination of Velero and supported Kubernetes versions for each Velero release. The table above is meant to track the current testing coverage and the expected supported Kubernetes versions for each Velero version.

If you are interested in using a different version of Kubernetes with a given Velero version, we'd recommend that you perform testing before installing or upgrading your environment. For full information around capabilities within a release, also see the Velero release notes or Kubernetes release notes. See the Velero support page for information about supported versions of Velero.

For each release, Velero maintainers run the test to ensure the upgrade path from n-2 minor release. For example, before the release of v1.10.x, the test will verify that the backup created by v1.9.x and v1.8.x can be restored using the build to be tagged as v1.10.x.

Description
No description provided
Readme Apache-2.0 111 MiB
Languages
Go 97.8%
Shell 0.6%
HTML 0.4%
SCSS 0.4%
Makefile 0.4%
Other 0.3%