Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitutions of YAML / JSON values through configmap/ RestoreItemAction #5809

Closed
anshulahuja98 opened this issue Jan 31, 2023 · 3 comments · Fixed by #6452
Closed

Substitutions of YAML / JSON values through configmap/ RestoreItemAction #5809

anshulahuja98 opened this issue Jan 31, 2023 · 3 comments · Fixed by #6452
Assignees
Labels
kind/requirement Needs triage We need discussion to understand problem and decide the priority Restore
Milestone

Comments

@anshulahuja98
Copy link
Collaborator

Describe the problem/challenge you have
[A description of the current limitation/problem/challenge that you are experiencing.]

Generic way to subsitute YAML/ JSON properties of the workloads before restoring.

There are a lot of scenarios where customers wish to change certain properties in the YAMLs before restoration, for example removing any cloud specific properties (hardcoded disk encryption key references, VNET references), change the image URLs, change the StorageClass of the PVCs being restored, changing Disk drivers when migrating across clouds, changing other cloud specific properties.

As of today the solutions for each specific problem are being developed as different plugins and using different configmaps, it is very hard from user POV to handle them.

Describe the solution you'd like
[A clear and concise description of what you want to happen.]

Goal is to solve all these problems in a generic way through RestoreItemAction which can substitute all these various properties based on a configmap reference input.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Currently there are similar issues and solutions which are solving specific problems.

Examples: Deployment.spec.containers[0].image could be the json path.
Or replacing values which match a certain regex. Similarly for StorageClasses, we can change cloud specific SKUs.

Pending: will add more examples.

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.

  • 👍 for "The project would be better with this feature added"
  • 👎 for "This feature will not enhance the project in a meaningful way"
@blackpiglet blackpiglet added feature Request for a new feature Restore kind/requirement and removed feature Request for a new feature labels Jan 31, 2023
@sseago
Copy link
Collaborator

sseago commented Feb 10, 2023

This would be a useful plugin addition for allowing custom user transformations. I don't think it should replace any of the standard supported actions (i.e. storageclass change, etc.) since those are generally-useful actions that are supported directly by velero already. But this would allow for individual users to perform transformations that are useful in their own particular environments that wouldn't necessarily be useful for other velero users in other contexts.

@anshulahuja98
Copy link
Collaborator Author

The intention is not to immediately deprecate any existing standard supported actions. But in future if any "standard" actions come as a feature ask, we solve them in a generic way. Documenting usual scenarios using this generic feature will be a goal of this feature.

@reasonerjt
Copy link
Contributor

I'll double check the design and this is VERY LIKELY to be included in v1.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/requirement Needs triage We need discussion to understand problem and decide the priority Restore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants