vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.45k stars 1.37k forks source link

Maintenance jobs cannot be deployed because of the hard-coded deployment name. #7987

Open ugur99 opened 2 weeks ago

ugur99 commented 2 weeks ago

What steps did you take and what happened: After upgrading to v1.14 we experienced the following problem: maintenance jobs cannot be scheduled because of the hardcoded deployment name. This breaks velero for those who have different velero deployment names.

backup-velero-6f9964b46f-2pl4g velero time="2024-07-07T21:43:15Z" level=warning msg="error pruning repository" backupRepo=velero/test-default-kopia-72pvd error="error to build maintenance job: Deployment.apps \"velero\" not found" error.file="/go/src/github.com/vmware-tanzu/velero/pkg/repository/manager.go:211" error.function="github.com/vmware-tanzu/velero/pkg/repository.(*manager).PruneRepo" logSource="pkg/controller/backup_repository_controller.go:300"

What did you expect to happen: I believe that deployment name for the velero instance should be handled dynamically on the code. Ie, maybe deployment name can be determined based on the some unique label rather than directly looking for velero named one. The following information will help us better understand what's going on:

Anything else you would like to add:

Environment:

Lyndon-Li commented 2 weeks ago

Could you share more of below info:

  1. How did you change the name of velero deployment?
  2. Why do you need to change the name?

I don't think Velero could support it right now, more than one of places in the code are checking the hardcoded name "velero" or "node-agent".

Therefore, just share us your requirements and we will evaluate.

ugur99 commented 2 weeks ago

We are just using the ArgoCD application with different release names; this is not because of any specific need, but we just wanted to change the release name We simply opted for a different release name instead of "velero." According to the Helm chart, this should be supported(here and here), and we did not find any breaking changes mentioned in the changelog regarding this topic.

To clarify, are you saying that because there are a few hard-coded dependencies in the new version, we must use "velero" as the release name?

Lyndon-Li commented 2 weeks ago

are you saying that because there are a few hard-coded dependencies in the new version

Not just in the new version, but in all versions

ugur99 commented 2 weeks ago

Not sure what other hardcoded dependencies you are referring to; but velero worked fine in our environment up until this release.

And it might be wise to make users aware that they need to deploy it with the "correct" releaseName. Otherwise they might get the impression that they can deploy it with any releaseName.

Thanks for your quick assistance.

freemjohn commented 1 week ago

Same thing. Using helm deployment as initial install method

freemjohn commented 1 week ago

Probably its also breaks kopia repository restore after manual deletion in s3