volumeSet

package
v1.1.68-test Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomEncryptionRegion

type CustomEncryptionRegion struct {
	KeyId string `json:"keyId,omitzero"`
}

type DiskType

type DiskType string

DiskType is volumeSet.ts's shared DiskTypes list (volumeSet.ts:238-244): one type for every field that spells `.valid(...DiskTypes)`, so a new disk type is added once.

const (
	DiskTypeGp3                DiskType = "gp3"
	DiskTypePdBalanced         DiskType = "pd-balanced"
	DiskTypePdSsd              DiskType = "pd-ssd"
	DiskTypeHyperdiskBalanced  DiskType = "hyperdisk-balanced"
	DiskTypePremiumV2Lrs       DiskType = "PremiumV2_LRS"
	DiskTypeDoBlockStorage     DiskType = "do-block-storage"
	DiskTypeHcloudVolume       DiskType = "hcloud-volume"
	DiskTypeLinodeBlockStorage DiskType = "linode-block-storage"
	DiskTypeOciBvBalanced      DiskType = "oci-bv-balanced"
	DiskTypeHostpath           DiskType = "hostpath"
	DiskTypeJuicefs            DiskType = "juicefs"
)

func (DiskType) EnumValues

func (DiskType) EnumValues() []string

type FileSystem

type FileSystem struct {
	Name              string   `json:"name"`
	AccessMode        string   `json:"accessMode"`
	CommandsSupported []string `json:"commandsSupported,omitzero"`
}

type FileSystemType

type FileSystemType string
const (
	FileSystemTypeExt4   FileSystemType = "ext4"
	FileSystemTypeXfs    FileSystemType = "xfs"
	FileSystemTypeShared FileSystemType = "shared"
)

func (FileSystemType) EnumValues

func (FileSystemType) EnumValues() []string

type MountResources

type MountResources struct {
	MaxCpu    string `json:"maxCpu,omitzero"`
	MinCpu    string `json:"minCpu,omitzero"`
	MinMemory string `json:"minMemory,omitzero"`
	MaxMemory string `json:"maxMemory,omitzero"`
}

type PerformanceClass

type PerformanceClass struct {
	Name              string                              `json:"name"`
	MinCapacity       float64                             `json:"minCapacity"`
	MaxCapacity       float64                             `json:"maxCapacity"`
	FeaturesSupported []PerformanceClassFeaturesSupported `json:"featuresSupported,omitzero"`
}

type PerformanceClassFeaturesSupported

type PerformanceClassFeaturesSupported string
const (
	PerformanceClassFeaturesSupportedAutomaticExpansion PerformanceClassFeaturesSupported = "automatic-expansion"
	PerformanceClassFeaturesSupportedSnapshots          PerformanceClassFeaturesSupported = "snapshots"
)

type PerformanceClassName

type PerformanceClassName string
const (
	PerformanceClassNameGeneralPurposeSsd PerformanceClassName = "general-purpose-ssd"
	PerformanceClassNameHighThroughputSsd PerformanceClassName = "high-throughput-ssd"
	PerformanceClassNameShared            PerformanceClassName = "shared"
)

func (PerformanceClassName) EnumValues

func (PerformanceClassName) EnumValues() []string

type PersistentVolumeStatus

type PersistentVolumeStatus struct {
	Lifecycle           PersistentVolumeStatusLifecycle  `json:"lifecycle,omitzero" validate:"default=creating"`
	StorageDeviceId     string                           `json:"storageDeviceId,omitzero"`
	OldStorageDeviceIds []string                         `json:"oldStorageDeviceIds,omitzero"`
	ResourceName        string                           `json:"resourceName,omitzero"`
	Index               float64                          `json:"index" validate:"required,integer,min=0"`
	CurrentSize         float64                          `json:"currentSize" validate:"required,min=0"`
	CurrentBytesUsed    *float64                         `json:"currentBytesUsed,omitzero" validate:"min=0"`
	CurrentBytesFree    *float64                         `json:"currentBytesFree,omitzero" validate:"min=0"`
	Iops                *float64                         `json:"iops,omitzero"`
	Throughput          *float64                         `json:"throughput,omitzero"`
	Driver              string                           `json:"driver" validate:"required"`
	DiskType            PersistentVolumeStatusDiskType   `json:"diskType,omitzero" validate:"optional"`
	VolumeSnapshots     []VolumeSnapshot                 `json:"volumeSnapshots,omitzero"`
	Attributes          PersistentVolumeStatusAttributes `json:"attributes,omitzero"`
	Zone                string                           `json:"zone,omitzero" validate:"allow="`
	Node                string                           `json:"node,omitzero" validate:"optional,allow="`
}

type PersistentVolumeStatusAttributes

type PersistentVolumeStatusAttributes map[string]string

PersistentVolumeStatusAttributes → pattern(String, String().allow(”)) via RegisterType (the map value's allow(”) cannot be tagged).

func (PersistentVolumeStatusAttributes) ValidationRule

ValidationRule for the persistent-volume attributes map — pattern(String, String().allow(”)): the value's allow(”) cannot be expressed by a field tag.

type PersistentVolumeStatusDiskType added in v1.1.22

type PersistentVolumeStatusDiskType = DiskType

PersistentVolumeStatusDiskType names the field's type as the generator spelled it.

type PersistentVolumeStatusLifecycle

type PersistentVolumeStatusLifecycle string
const (
	PersistentVolumeStatusLifecycleCreating  PersistentVolumeStatusLifecycle = "creating"
	PersistentVolumeStatusLifecycleUnused    PersistentVolumeStatusLifecycle = "unused"
	PersistentVolumeStatusLifecycleUnbound   PersistentVolumeStatusLifecycle = "unbound"
	PersistentVolumeStatusLifecycleBound     PersistentVolumeStatusLifecycle = "bound"
	PersistentVolumeStatusLifecycleDeleted   PersistentVolumeStatusLifecycle = "deleted"
	PersistentVolumeStatusLifecycleRepairing PersistentVolumeStatusLifecycle = "repairing"
)

func (PersistentVolumeStatusLifecycle) EnumValues

func (PersistentVolumeStatusLifecycle) EnumValues() []string

type SnapshotRetentionDuration

type SnapshotRetentionDuration string

SnapshotRetentionDuration is the strongly-typed replacement for the `pattern=vsSnapshotRetention` tag on SnapshotSpec.RetentionDuration.

func (SnapshotRetentionDuration) ValidationRule

func (SnapshotRetentionDuration) ValidationRule() *validate.Rule

type SnapshotSchedule

type SnapshotSchedule string // → scheduleTypeRule() + snapshotSchedule frequency custom

func (SnapshotSchedule) ValidationRule

func (SnapshotSchedule) ValidationRule() *validate.Rule

ValidationRule for the snapshot schedule — workload ScheduleType (cron custom) plus the snapshot-frequency custom (may not be more frequent than hourly).

type SnapshotSpec

type SnapshotSpec struct {
	CreateFinalSnapshot *bool                     `json:"createFinalSnapshot,omitzero" validate:"default=true"`
	RetentionDuration   SnapshotRetentionDuration `json:"retentionDuration,omitzero"`
	Schedule            SnapshotSchedule          `json:"schedule,omitzero"`
}
type StatusWorkloadLink string // → LocalLink.custom(toKind('workload'))

func (StatusWorkloadLink) ValidationRule

func (StatusWorkloadLink) ValidationRule() *validate.Rule

ValidationRule for the status workload link — LocalLink.custom(toKind('workload')).

type StorageClassSuffix

type StorageClassSuffix string

StorageClassSuffix is the strongly-typed replacement for the `pattern=vsStorageClassSuffix` tag on VolumeSetSpec.StorageClassSuffix.

func (StorageClassSuffix) ValidationRule

func (StorageClassSuffix) ValidationRule() *validate.Rule

type VolumeSet

type VolumeSet struct {
	Id           string           `json:"id,omitzero" validate:"uuid,readOnly"`
	Name         base.Name        `json:"name,omitzero"`
	Kind         base.Kind        `json:"kind,omitzero"`
	Version      *float64         `json:"version,omitzero" validate:"positive,integer,readOnly"`
	Description  string           `json:"description,omitzero" validate:"trim,max=250,allow="`
	Tags         VolumeSetTags    `json:"tags,omitzero" validate:"default={}"`
	Created      string           `json:"created,omitzero" validate:"date,readOnly"`
	LastModified string           `json:"lastModified,omitzero" validate:"date,readOnly"`
	Links        base.Links       `json:"links,omitzero" validate:"readOnly"`
	Spec         VolumeSetSpec    `json:"spec" validate:"required"`
	Status       *VolumeSetStatus `json:"status,omitzero"`
	Gvc          any              `json:"gvc,omitzero" validate:"allow="`
}

func (*VolumeSet) StatusLocations

func (v *VolumeSet) StatusLocations() []VolumeSetStatusLocation

StatusLocations is Status.Locations, nil when the volume set has no status yet — a freshly created one does not, and Status is a pointer so absent stays distinguishable. Read locations through this: ranging over v.Status.Locations compiles and then panics.

func (VolumeSet) ValidationRule

func (VolumeSet) ValidationRule() *validate.Rule

ValidationRule reflects VolumeSet and layers the top-level performanceClass/ fileSystemType consistency custom — the schema the "volumeset" kind validates against (Base.keys({spec: required, status, gvc}).custom(volumeSetTopCustom)).

type VolumeSetConfig

type VolumeSetConfig struct {
	LocationVolumeZoneMap VolumeSetConfigLocationVolumeZoneMap `json:"locationVolumeZoneMap,omitzero"`
}

type VolumeSetConfigLocationVolumeZoneMap

type VolumeSetConfigLocationVolumeZoneMap map[string]VolumeZoneMap

type VolumeSetSpec

type VolumeSetSpec struct {
	InitialCapacity    float64                        `json:"initialCapacity" validate:"min=10,integer,required"`
	PerformanceClass   PerformanceClassName           `json:"performanceClass,omitzero"`
	StorageClassSuffix StorageClassSuffix             `json:"storageClassSuffix,omitzero"`
	FileSystemType     FileSystemType                 `json:"fileSystemType,omitzero" validate:"default=ext4"`
	CustomEncryption   *VolumeSetSpecCustomEncryption `json:"customEncryption,omitzero"`
	Snapshots          *SnapshotSpec                  `json:"snapshots,omitzero"`
	Autoscaling        *VolumeSetSpecAutoscaling      `json:"autoscaling,omitzero"`
	MountOptions       *VolumeSetSpecMountOptions     `json:"mountOptions,omitzero"`
}

VolumeSetSpec ports `VolumeSetSpec` (volumeSet.ts:318). Required + the volumeSetSpecCustom cross-field .custom() are the `required` tag on the parent field + the VolumeSetSpec Refine.

func (VolumeSetSpec) ValidationRule

func (VolumeSetSpec) ValidationRule() *validate.Rule

ValidationRule reflects VolumeSetSpec and layers the fileSystemType/ performanceClass/initialCapacity/autoscaling cross-field custom (volumeSet.ts:347-397). The parent VolumeSet.Spec field tag carries `required`.

type VolumeSetSpecAutoscaling

type VolumeSetSpecAutoscaling struct {
	MaxCapacity       *float64                            `json:"maxCapacity,omitzero" validate:"min=10,integer"`
	MinFreePercentage *float64                            `json:"minFreePercentage,omitzero" validate:"max=100,min=1"`
	ScalingFactor     *float64                            `json:"scalingFactor,omitzero" validate:"min=1.1"`
	Predictive        *VolumeSetSpecAutoscalingPredictive `json:"predictive,omitzero"`
}

type VolumeSetSpecAutoscalingPredictive

type VolumeSetSpecAutoscalingPredictive struct {
	Enabled                *bool    `json:"enabled,omitzero" validate:"default=false"`
	LookbackHours          *float64 `json:"lookbackHours,omitzero" validate:"min=1,max=168,default=24"`
	ProjectionHours        *float64 `json:"projectionHours,omitzero" validate:"min=1,max=72,default=6"`
	MinDataPoints          *float64 `json:"minDataPoints,omitzero" validate:"min=2,max=100,integer,default=10"`
	MinGrowthRateGBPerHour *float64 `json:"minGrowthRateGBPerHour,omitzero" validate:"min=0,default=0.01"`
	ScalingFactor          *float64 `json:"scalingFactor,omitzero" validate:"min=1.1"`
}

type VolumeSetSpecCustomEncryption

type VolumeSetSpecCustomEncryption struct {
	Regions VolumeSetSpecCustomEncryptionRegions `json:"regions,omitzero"`
}

type VolumeSetSpecCustomEncryptionRegions

type VolumeSetSpecCustomEncryptionRegions map[string]CustomEncryptionRegion

type VolumeSetSpecMountOptions

type VolumeSetSpecMountOptions struct {
	Resources *VolumeSetSpecMountOptionsResources `json:"resources,omitzero"`
}

type VolumeSetSpecMountOptionsResources

type VolumeSetSpecMountOptionsResources struct {
	MaxCpu    VsCpu    `json:"maxCpu,omitzero" validate:"default=2000m"`
	MinCpu    VsCpu    `json:"minCpu,omitzero" validate:"default=500m"`
	MinMemory VsMemory `json:"minMemory,omitzero" validate:"default=1Gi"`
	MaxMemory VsMemory `json:"maxMemory,omitzero" validate:"default=2Gi"`
}

VolumeSetSpecMountOptionsResources ports MountResources (volumeSet.ts:266); the cpu/memory ratio+range check is the mountResourcesCustom Refine.

func (VolumeSetSpecMountOptionsResources) ValidationRule

ValidationRule reflects the mount resources and layers the cpu/memory ratio+range custom (volumeSet.ts:273-308).

type VolumeSetStatus

type VolumeSetStatus struct {
	ParentId       string                    `json:"parentId,omitzero"`
	UsedByWorkload StatusWorkloadLink        `json:"usedByWorkload,omitzero"`
	WorkloadLinks  []StatusWorkloadLink      `json:"workloadLinks,omitzero"`
	BindingId      string                    `json:"bindingId,omitzero"`
	Locations      []VolumeSetStatusLocation `json:"locations,omitzero" validate:"default=[]"`
}

VolumeSetStatus ports `VolumeSetStatus` (volumeSet.ts:166); the duplicate-location check is the volumeSetStatusDuplicateLocations Refine.

func (VolumeSetStatus) ValidationRule

func (VolumeSetStatus) ValidationRule() *validate.Rule

ValidationRule reflects VolumeSetStatus and layers the duplicate-location check (volumeSet.ts:172-185).

type VolumeSetStatusLocation

type VolumeSetStatusLocation struct {
	Name               string                   `json:"name" validate:"required"`
	Volumes            []PersistentVolumeStatus `json:"volumes,omitzero" validate:"default=[]"`
	DesiredVolumeCount *float64                 `json:"desiredVolumeCount,omitzero" validate:"integer,default=0,min=0"`
	ClusterId          string                   `json:"clusterId,omitzero"`
}

type VolumeSetTags

type VolumeSetTags = base.Tags

VolumeSetTags aliases base.Tags for the reflection base-type registry.

type VolumeSnapshot

type VolumeSnapshot struct {
	Name    string               `json:"name" validate:"required"`
	Id      string               `json:"id,omitzero" validate:"default=,allow="`
	Created string               `json:"created" validate:"date,required"`
	Expires string               `json:"expires,omitzero" validate:"date"`
	Size    *float64             `json:"size,omitzero" validate:"default=0,min=0"`
	Tags    []VolumeSnapshotTags `json:"tags,omitzero"`
}

type VolumeSnapshotTags

type VolumeSnapshotTags map[string]string

type VolumeZoneMap added in v1.1.25

type VolumeZoneMap map[string]string

type VsCpu

type VsCpu string // → CpuRule()

func (VsCpu) ValidationRule

func (VsCpu) ValidationRule() *validate.Rule

ValidationRule for the mount CPU quantity — workload Cpu (String.regex(cpuFmt).max(20)).

type VsMemory

type VsMemory string // → MemoryRule()

func (VsMemory) ValidationRule

func (VsMemory) ValidationRule() *validate.Rule

ValidationRule for the mount memory quantity — workload Memory (String.regex(memFmt).max(20).custom(normalize)).

Jump to

Keyboard shortcuts

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