Skip to content

Conversation

@nweisenauer-sap
Copy link

@nweisenauer-sap nweisenauer-sap commented Sep 16, 2025

Please add a summary of your change

Fixes restore for workerless clusters. Previously restore of custom resources would crash, because Velero Deployment is not running in the workerless cluster. This simple change prevents the crash and does not change behaviour for "normal" usage with standard clusters.

Does your change fix a particular issue?

Fixes #9251

Please indicate you've done the following:

- helps restore on workerless clusters
- logs error message, but continues

Signed-off-by: Nico Weisenauer <nico.weisenauer@sap.com>
Signed-off-by: Nico Weisenauer <nico.weisenauer@sap.com>
Signed-off-by: Nico Weisenauer <nico.weisenauer@sap.com>
@reasonerjt
Copy link
Contributor

IMO, this fix MAY fix your problem, but it delays the error in normal use cases.

I'm a little reluctant to make it upstream. Because in general we don't support velero running on another cluster at this moment and this looks like a workaround and is very limited.

@reasonerjt reasonerjt added the Needs triage We need discussion to understand problem and decide the priority label Sep 22, 2025
@nweisenauer-sap
Copy link
Author

There was already some demand of using Velero to backup resources of a remote cluster in the past: #7843
and the workaround with the remote kubeconfig dates back to 2019: #1751

@nweisenauer-sap
Copy link
Author

Any other opinions on this?

Comment on lines +66 to +69
if err := crClient.Get(context.TODO(), types.NamespacedName{Name: veleroDeploymentName, Namespace: namespace}, deployment); err != nil {
logger.WithError(err).Warnf("Could not find deployment %q in namespace %q", veleroDeploymentName, namespace)
} else {
image = veleroutil.GetVeleroServerImage(deployment)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So based on feedback saw earlier, my tip for getting this in would be to hide this behavior behind a server feature flag or something.

Like velero server --workerless-mode and you will then perhaps not have to use warn, but just info as it is an expected operating mode.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that sound reasonable? @reasonerjt perhaps you want this implementation explained and detailed as a design for the epic #7843

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-changelog Needs triage We need discussion to understand problem and decide the priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Velero 1.16 Fails to Restore in Workerless Clusters

3 participants