velero icon indicating copy to clipboard operation
velero copied to clipboard

Support RestoreItemActions for namespaces

Open mouellet opened this issue 3 years ago • 3 comments

Describe the problem/challenge you have

We're using Rancher to provision our clusters and it adds annotations on namespaces for their project (the ID and other stuff). A newly provisioned cluster w/ the same projects won't have the same annotation values on namespaces as they are randomly generated. So when we create a new cluster and restore a backup, the restored namespaces aren't in the right project, breaking stuff..

I was looking into making a backup/restore plugin to lookup Rancher's API and update the annotation on namespaces with the new value, but found out that namespaces are not restored as other resources. They don't go through the restore plugin chain, but are just restored from backup.

So I looked into making a multi-step restore process: restore namespaces first, run script to update the annotations then restore everything else, but found that you can't restore only namespaces (see #1970).

Describe the solution you'd like Let namespaces go through the restore plugin chain on restore instead of directly from backup.

Anything else you would like to add:

Environment:

  • Velero version (use velero version):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • :+1: for "The project would be better with this feature added"
  • :-1: for "This feature will not enhance the project in a meaningful way"

mouellet avatar Jan 03 '22 16:01 mouellet

After reviewing #1970 I think this is a valid requirement

Let namespaces go through the restore plugin chain on restore instead of directly from backup.

I'll discuss with other maintainers, and follow up your PR.

reasonerjt avatar Jan 09 '22 15:01 reasonerjt

Hi @reasonerjt,

Do you think this can be included in a future release? I could join a community meeting if needed...

Also, would you mind reopening my PR? It got closed du to being stale.

Thanks,

mouellet avatar Jun 11 '22 10:06 mouellet

Hi @reasonerjt,

Do you think this can be included in a future release? I could join a community meeting if needed...

Also, would you mind reopening my PR? It got closed du to being stale.

Thanks,

@reasonerjt : could you reopen the PR ? Also, is there a timeframe to release this since the PR is already completed?

Thanks

milapointe avatar Sep 16 '22 17:09 milapointe