openshift / openshift/openshift-velero-plugin
Add backup/restore support for Shipwright Build resources (S2I successor)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 55
- Forks
- 45
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 11
Description
Background
OpenShift is shifting S2I (source-to-image) build tooling from BuildConfig/Build to Shipwright (productized as "Red Hat OpenShift Builds"). See the workshop overview: https://rhthsa.github.io/developer-advocacy-2025/openshift-developer-workshop-2025/01-shipwright.html
Shipwright introduces new CRDs that replace BuildConfig/Build:
BuildBuildStrategy/ClusterBuildStrategyBuildRun
Shipwright still supports S2I as one of its build strategies (alongside Buildah, Buildpacks, etc.), so clusters migrating off BuildConfig will have these new resource types in their namespaces instead.
Current state
This plugin already has backup/restore handling for the legacy build resources:
velero-plugins/buildconfig/restore.go— rewrites push secrets and docker image references (spec.output.to, strategyfromfields, source images) on restore, remapping between backup registry and restore registry, and applying namespace mapping.velero-plugins/build/restore.go— skips restoringBuildobjects directly (letsBuildConfigrecreate them) but exposesUpdateCommonSpec, the shared logic used by the buildconfig plugin.velero-plugins/imagecopy/imagestream.go— handles copying images between registries and updating image references forImageStreamresources.
None of this currently applies to Shipwright's Build/BuildRun/BuildStrategy/ClusterBuildStrategy resources, so clusters using Shipwright instead of BuildConfig will not have their build definitions' registry/secret references correctly rewritten on restore (e.g. output.image, output.pushSecret, source git/secret refs, strategy parameter refs pointing at internal registry paths).
Ask
Track adding equivalent Backup/Restore Item Action plugins for Shipwright resources:
-
Build— restore item action to rewritespec.output.imageandspec.output.pushSecret(and any other registry/secret references) analogous tobuild.UpdateCommonSpec, with backup/restore registry hostname swap and namespace mapping support. -
BuildRun— determine whether restore should be skipped (similar to howBuildrestore is skipped in favor ofBuildConfigrecreating it) or whether in-flightBuildRuns need any reference rewriting. -
BuildStrategy/ClusterBuildStrategy— evaluate whether these carry any registry/secret references that need rewriting, or if they are safe to restore as-is (cluster-scoped strategy definitions typically don't reference per-namespace secrets). - Determine whether
imagecopyneeds to account for images produced by Shipwright builds (e.g. ifoutput.imagetargets the internal registry via anImageStreamtag reference vs. a plain registry path). - Add BackupItemAction handling if needed (e.g. excluding managed fields, consistent with other resource plugins).
References
- Shipwright project: https://github.com/shipwright-io/build
- Workshop walkthrough (Shipwright + S2I/Buildah on OpenShift): https://rhthsa.github.io/developer-advocacy-2025/openshift-developer-workshop-2025/01-shipwright.html
- Existing analogous plugins:
velero-plugins/build/restore.go,velero-plugins/buildconfig/restore.go,velero-plugins/imagecopy/imagestream.go
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading velero-plugins/buildconfig/restore.go, velero-plugins/build/restore.go, and velero-plugins/imagecopy/imagestream.go to understand existing registry and secret rewriting. Then inspect the Shipwright Build, BuildRun, BuildStrategy, and ClusterBuildStrategy resource definitions and determine which actions and tests are needed; done means backup and restore correctly handle required references, scope mapping, and image-copy behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100