Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 1 addition & 2 deletions .werf/consts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{{- $k8s := dict }}
{{- $k8s = set $k8s "1.20" (dict
"csi" (dict
"provisioner" "v5.3.0"
"provisioner" "dev"
"resizer" "v1.14.0"
"snapshotter" "dev"
"livenessprobe" "v2.17.0"
Expand All @@ -25,7 +25,6 @@
) }}
{{- $k8s = set $k8s "1.34" (dict
"csi" (dict
"provisioner" "v6.1.0"
"resizer" "v2.0.0"
)
) }}
Expand Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module fox.flant.com/deckhouse/storage/storage-foundation/api
module github.com/deckhouse/storage-foundation/api

go 1.24.9

Expand Down
49 changes: 49 additions & 0 deletions api/v1alpha1/conditions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
Copyright 2025 Flant JSC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

// Condition type constants
// Only Ready condition is used - it is set to True on success or False on final failure
const (
ConditionTypeReady = "Ready"
)

// Condition reason constants
const (
// ConditionReasonCompleted indicates successful completion
ConditionReasonCompleted = "Completed"
// ConditionReasonInvalidMode indicates invalid mode was specified
ConditionReasonInvalidMode = "InvalidMode"
// ConditionReasonIncompatible indicates incompatible configuration (e.g., WFFC or cross-SC restore)
ConditionReasonIncompatible = "Incompatible"
// ConditionReasonInvalidTTL indicates invalid TTL annotation format
ConditionReasonInvalidTTL = "InvalidTTL"
// ConditionReasonInternalError indicates internal error
ConditionReasonInternalError = "InternalError"
// ConditionReasonNotFound indicates resource not found
ConditionReasonNotFound = "NotFound"
// ConditionReasonRBACDenied indicates RBAC permission denied
ConditionReasonRBACDenied = "RBACDenied"
// ConditionReasonInvalidSource indicates invalid source specified
ConditionReasonInvalidSource = "InvalidSource"
// ConditionReasonPVBound indicates PV is bound and cannot be detached
ConditionReasonPVBound = "PVBound"
// ConditionReasonSnapshotCreationFailed indicates CSI snapshot creation failed
ConditionReasonSnapshotCreationFailed = "SnapshotCreationFailed"
// ConditionReasonRestoreFailed indicates restore operation failed
ConditionReasonRestoreFailed = "RestoreFailed"
)
5 changes: 0 additions & 5 deletions api/v1alpha1/volumecapturerequest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,11 @@ type VolumeCaptureRequestSpec struct {
// PersistentVolumeClaimRef references the PVC to capture
// Required for both Snapshot and Detach modes
PersistentVolumeClaimRef *ObjectReference `json:"persistentVolumeClaimRef,omitempty"`
// VolumeSnapshotClassName is the name of the VolumeSnapshotClass to use
// Required for Snapshot mode, ignored for Detach mode
VolumeSnapshotClassName string `json:"volumeSnapshotClassName,omitempty"`
}

// +k8s:deepcopy-gen=true
// VolumeCaptureRequestStatus defines the observed state of VolumeCaptureRequest
type VolumeCaptureRequestStatus struct {
// ObservedGeneration is the generation of the resource that was last processed
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// CompletionTimestamp is the time when the capture request completed
CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"`
// Conditions represent the latest available observations of the resource's state
Expand Down
2 changes: 0 additions & 2 deletions api/v1alpha1/volumerestorerequest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ type VolumeRestoreRequestSpec struct {
// +k8s:deepcopy-gen=true
// VolumeRestoreRequestStatus defines the observed state of VolumeRestoreRequest
type VolumeRestoreRequestStatus struct {
// ObservedGeneration is the generation of the resource that was last processed
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// CompletionTimestamp is the time when the restore request completed
CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"`
// Conditions represent the latest available observations of the resource's state
Expand Down
13 changes: 6 additions & 7 deletions crds/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ spec:
For a pre-existing VolumeSnapshotContent object, name and namespace of the
VolumeSnapshot object MUST be provided for binding to happen.
This field is immutable after creation.
Required.
Optional - can be empty for VSC-only model (VSC created without VolumeSnapshot, e.g., by VCR controller).
properties:
apiVersion:
description: API version of the referent.
Expand Down Expand Up @@ -220,14 +220,13 @@ spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-validations:
- message: both spec.volumeSnapshotRef.name and spec.volumeSnapshotRef.namespace
must be set
rule: has(self.name) && has(self.__namespace__)
- message: if spec.volumeSnapshotRef is set, both name and namespace must be specified together, or volumeSnapshotRef must be completely empty (VSC-only model)
rule: '(has(self.name) && has(self.__namespace__) && self.name != "" && self.__namespace__ != "") || (!has(self.name) && !has(self.__namespace__))'
required:
- deletionPolicy
- driver
- source
- volumeSnapshotRef
# volumeSnapshotRef is optional to support VSC-only model (VSC without VolumeSnapshot)
type: object
x-kubernetes-validations:
- message: sourceVolumeMode is required once set
Expand Down Expand Up @@ -385,7 +384,7 @@ spec:
description: name of the VolumeSnapshotClass from which this snapshot was (or will be) created. Note that after provisioning, the VolumeSnapshotClass may be deleted or recreated with different set of values, and as such, should not be referenced post-snapshot creation.
type: string
volumeSnapshotRef:
description: volumeSnapshotRef specifies the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName field must reference to this VolumeSnapshotContent's name for the bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent object, name and namespace of the VolumeSnapshot object MUST be provided for binding to happen. This field is immutable after creation. Required.
description: volumeSnapshotRef specifies the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName field must reference to this VolumeSnapshotContent's name for the bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent object, name and namespace of the VolumeSnapshot object MUST be provided for binding to happen. This field is immutable after creation. Optional - can be empty for VSC-only model (VSC created without VolumeSnapshot, e.g., by VCR controller).
properties:
apiVersion:
description: API version of the referent.
Expand Down Expand Up @@ -413,7 +412,7 @@ spec:
- deletionPolicy
- driver
- source
- volumeSnapshotRef
# volumeSnapshotRef is optional to support VSC-only model (VSC without VolumeSnapshot)
type: object
status:
description: status represents the current information of a snapshot.
Expand Down
5 changes: 0 additions & 5 deletions crds/storage.deckhouse.io_volumecapturerequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ spec:
required:
- name
type: object
observedGeneration:
description: ObservedGeneration is the generation of the resource
that was last processed
format: int64
type: integer
type: object
type: object
served: true
Expand Down
5 changes: 0 additions & 5 deletions crds/storage.deckhouse.io_volumerestorerequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ spec:
- type
type: object
type: array
observedGeneration:
description: ObservedGeneration is the generation of the resource
that was last processed
format: int64
type: integer
targetPVCRef:
description: TargetPVCRef references the created target PVC
properties:
Expand Down
Loading
Loading