Api rework#52
Draft
AleksZimin wants to merge 5 commits into
Draft
Conversation
A snapshot node binds at most one volume, so model the foundation VolumeCaptureRequest as a single target instead of a list: - spec.targets[] -> spec.target (single object), namespace omitted (the captured PVC always lives in the VCR namespace; the controller re-injects it in-memory and fills status.dataRef.target.namespace). - status.dataRefs[] -> status.dataRef (single object). - Drop the bulk capture path (merge/validate/upsert helpers, bulk progress patch) and rename the snapshot capture file accordingly. - Regenerate CRD and deepcopy. Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
…Ref (PVC-only for now) Collapse spec.targetNamespace + spec.targetPVCName into a single spec.targetRef (ObjectReference). Restore is never cross-namespace, so producers do not set targetRef.namespace; the controller derives the target namespace from metadata.namespace. Symmetrically rename status.targetPVCRef -> status.targetRef and populate its namespace so the status stays self-contained. Only kind=PersistentVolumeClaim is supported for now (empty kind defaults to PVC); kind reserves space for future cluster-scoped targets (e.g. PersistentVolume). The controller rejects unsupported target kinds with a terminal Ready=False/UnsupportedTargetKind condition. Updates the in-repo VRR producer (data-export snapshot resolver), the restore controller, tests, and regenerates CRDs + deepcopy. The patched csi-external-provisioner (external-provisioner-fox) consumes these fields and is updated separately during re-vendoring. Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
Add an optional uid field to VolumeDataArtifactRef so the durable artifact reference (e.g. VolumeSnapshotContent / PersistentVolume) is self-contained, symmetric with target.uid. The field is omitempty (no MinLength) because the artifact may be referenced before its UID is known; producers fill it best-effort from the real object. The VCR controller now threads the VSC UID (and PV UID on the detach path) into status.dataRef.artifact.uid. Regenerates the CRD; deepcopy is unchanged (scalar field). Tests assert the uid propagates on the snapshot happy path, the snapshot terminal-failure path, and the detach path. Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
…ation.deckhouse.io Move all storage-foundation CRD types (VolumeCaptureRequest, VolumeRestoreRequest, DataExport, DataImport) from the shared storage.deckhouse.io group to the per-module storage-foundation.deckhouse.io group, and regenerate CRDs. - api: register.go APIGroup, doc.go +groupName, GVK/GVR Group fields. - crds: git mv internal VCR/VRR CRD files to <new-group>_<plural>.yaml and regenerate (controller-gen); hand-curated DataExport/DataImport CRDs updated in place (metadata.name/spec.group); generate_code.sh rm-f paths follow the new names. - RBAC/hooks/templates/webhooks/CSI patches/docs/tests: group string updated. - Foundation-private annotation/label/finalizer key domains migrated to storage-foundation.deckhouse.io/. Cross-module boundaries preserved: - SnapshotContent (owned by state-snapshotter) keeps state-snapshotter.deckhouse.io in the data-export resolver GVR, its RBAC, and CRD docs. - The StorageClass annotation storage.deckhouse.io/volumesnapshotclass (written by sds-local-volume) stays on storage.deckhouse.io as an external contract. - snapshot.storage.k8s.io (CSI) and virtualization.deckhouse.io untouched. Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
Add an optional UID to DataArtifactReference (symmetric with VolumeCaptureRequest's status.dataRef.artifact.uid) and carry it through DataImport. Also fixes a wave1 regression: volumeCaptureArtifact still read the removed plural status.dataRefs slice; switch it to the single status.dataRef map (VCR is one target per request after wave1), so the DataImport artifact resolves again. Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Why do we need it, and what problem does it solve?
What is the expected result?
Checklist