Help us shape the future of Go! Take the 2026 Go Developer Survey

v1alpha1

package
v0.33.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIGroup   = "storage-foundation.deckhouse.io"
	APIVersion = "v1alpha1"
)

Variables

View Source
var (
	SchemeGroupVersion = schema.GroupVersion{
		Group:   APIGroup,
		Version: APIVersion,
	}
	SchemeBuilder = runtime.NewSchemeBuilder(AddKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

SchemeGroupVersion is group version used to register these objects

Functions

func AddKnownTypes

func AddKnownTypes(scheme *runtime.Scheme) error

Adds the list of known types to Scheme.

Types

type DataExportImportStatus

type DataExportImportStatus struct {
	URL                 string             `json:"url"`
	CA                  string             `json:"ca,omitempty"`
	PublicURL           string             `json:"publicURL"`
	AccessTimestamp     metav1.Time        `json:"accessTimestamp"`
	Conditions          []metav1.Condition `json:"conditions,omitempty"`
	VolumeMode          string             `json:"volumeMode,omitempty"`
	DataImportCompleted bool               `json:"dataImportCompleted,omitempty"`
}

func (*DataExportImportStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataExportImportStatus.

func (*DataExportImportStatus) DeepCopyInto

func (in *DataExportImportStatus) DeepCopyInto(out *DataExportImportStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DataImport

type DataImport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DataImportSpec         `json:"spec"`
	Status DataExportImportStatus `json:"status"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*DataImport) DeepCopy

func (in *DataImport) DeepCopy() *DataImport

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataImport.

func (*DataImport) DeepCopyInto

func (in *DataImport) DeepCopyInto(out *DataImport)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DataImport) DeepCopyObject

func (in *DataImport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DataImport) GetStatus

func (di *DataImport) GetStatus() *DataExportImportStatus

type DataImportList

type DataImportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []DataImport `json:"items"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*DataImportList) DeepCopy

func (in *DataImportList) DeepCopy() *DataImportList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataImportList.

func (*DataImportList) DeepCopyInto

func (in *DataImportList) DeepCopyInto(out *DataImportList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DataImportList) DeepCopyObject

func (in *DataImportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DataImportMode added in v0.32.5

type DataImportMode string

DataImportMode is spec.mode — the explicit discriminator that selects what a DataImport does with the imported bytes. It replaced the former polymorphic targetRef.kind discrimination; the current CRD has no spec.targetRef at all (it is pruned by the structural schema). See storage-foundation/api/v1alpha1/data_import.go for the SSOT.

const DataImportModeCreatePVC DataImportMode = "CreatePVC"

DataImportModeCreatePVC is the standalone PVC-import mode: data bytes are streamed straight into a preserved PVC built from spec.pvcTemplate, with no snapshot capture and no VolumeSnapshotContent artifact. `d8 data import` only ever creates CreatePVC DataImports; the snapshot-leaf mode (PopulateData) is driven by `d8 snapshot upload`, which builds its own unstructured spec.

type DataImportSpec

type DataImportSpec struct {
	TTL     string `json:"ttl"`
	Publish bool   `json:"publish,omitempty"`

	// WaitForFirstConsumer must not carry omitempty, unlike the other bool in this spec: the CRD
	// defaults this field to true, so an absent key means true on the server. omitempty drops
	// the zero value, which for a bool is exactly the false the caller asked for — making
	// `--wffc=false` (and hence the flag's own default) impossible to express.
	WaitForFirstConsumer bool `json:"waitForFirstConsumer"`

	Mode DataImportMode `json:"mode,omitempty"`

	// PvcTemplate fully describes the destination PVC. Its metadata.name is mandatory — the
	// controller names the imported PVC after it and the server CEL rejects an empty name.
	PvcTemplate *PersistentVolumeClaimTemplateSpec `json:"pvcTemplate,omitempty"`
}

DataImportSpec mirrors the CreatePVC subset of the unified DataImport CRD spec that the CLI produces. The CRD CEL rules require pvcTemplate and forbid snapshotRef/storageParams when mode == CreatePVC, so those PopulateData-only fields are deliberately absent here. +k8s:deepcopy-gen=true

func (*DataImportSpec) DeepCopy

func (in *DataImportSpec) DeepCopy() *DataImportSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataImportSpec.

func (*DataImportSpec) DeepCopyInto

func (in *DataImportSpec) DeepCopyInto(out *DataImportSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PersistentVolumeAccessMode

type PersistentVolumeAccessMode string

+enum

const (
	// can be mounted in read/write mode to exactly 1 host
	ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
	// can be mounted in read-only mode to many hosts
	ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
	// can be mounted in read/write mode to many hosts
	ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
	// can be mounted in read/write mode to exactly 1 pod
	// cannot be used in combination with other access modes
	ReadWriteOncePod PersistentVolumeAccessMode = "ReadWriteOncePod"
)

type PersistentVolumeClaimSpec

type PersistentVolumeClaimSpec struct {
	AccessModes      []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
	Resources        VolumeResourceRequirements   `json:"resources,omitempty"`
	StorageClassName *string                      `json:"storageClassName,omitempty"`
	VolumeMode       *PersistentVolumeMode        `json:"volumeMode,omitempty"`
}

+k8s:deepcopy-gen=true

func (*PersistentVolumeClaimSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimSpec.

func (*PersistentVolumeClaimSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PersistentVolumeClaimTemplateSpec

type PersistentVolumeClaimTemplateSpec struct {
	metav1.ObjectMeta         `json:"metadata,omitempty"`
	PersistentVolumeClaimSpec `json:"spec,omitempty"`
}

+k8s:deepcopy-gen=true

func (*PersistentVolumeClaimTemplateSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimTemplateSpec.

func (*PersistentVolumeClaimTemplateSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PersistentVolumeMode

type PersistentVolumeMode string

PersistentVolumeMode describes how a volume is intended to be consumed, either Block or Filesystem. +enum

const (
	// PersistentVolumeBlock means the volume will not be formatted with a filesystem and will remain a raw block device.
	PersistentVolumeBlock PersistentVolumeMode = "Block"
	// PersistentVolumeFilesystem means the volume will be or is formatted with a filesystem.
	PersistentVolumeFilesystem PersistentVolumeMode = "Filesystem"
)

type ResourceList

type ResourceList map[ResourceName]resource.Quantity

ResourceList is a set of (resource name, quantity) pairs.

type ResourceName

type ResourceName string

+enum

const (
	// Volume size, in bytes (e.g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024)
	ResourceStorage ResourceName = "storage"
)

type VolumeResourceRequirements

type VolumeResourceRequirements struct {
	Requests ResourceList `json:"requests,omitempty"`
}

VolumeResourceRequirements describes the storage resource requirements for a volume. +k8s:deepcopy-gen=true

func (*VolumeResourceRequirements) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeResourceRequirements.

func (*VolumeResourceRequirements) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL