Documentation ¶
Overview ¶
Package block provides resources related to blockdevices, mounts, etc.
Index ¶
- Constants
- func EncryptionKeyTypeStrings() []string
- func EncryptionProviderTypeStrings() []string
- func FilesystemTypeStrings() []string
- func VolumePhaseStrings() []string
- func VolumeTypeStrings() []string
- type Device
- type DeviceExtension
- type DeviceSpec
- type DiscoveredVolume
- type DiscoveredVolumeExtension
- type DiscoveredVolumeSpec
- type DiscoveryRefreshRequest
- type DiscoveryRefreshRequestExtension
- type DiscoveryRefreshRequestSpec
- type DiscoveryRefreshStatus
- type DiscoveryRefreshStatusExtension
- type DiscoveryRefreshStatusSpec
- type Disk
- type DiskExtension
- type DiskSelector
- type DiskSpec
- type EncryptionKey
- type EncryptionKeyType
- type EncryptionProviderType
- type EncryptionSpec
- type FilesystemSpec
- type FilesystemType
- type LocatorSpec
- type MountSpec
- type PartitionSpec
- type ProvisioningSpec
- type SystemDisk
- type SystemDiskExtension
- type SystemDiskSpec
- type UserDiskConfigStatus
- type UserDiskConfigStatusExtension
- type UserDiskConfigStatusSpec
- type VolumeConfig
- type VolumeConfigExtension
- type VolumeConfigSpec
- type VolumeLifecycle
- type VolumeLifecycleExtension
- type VolumeLifecycleSpec
- type VolumePhase
- type VolumeStatus
- type VolumeStatusExtension
- type VolumeStatusSpec
- type VolumeType
Constants ¶
const ( WaveSystemDisk = -1 WaveUserDisks = 0 WaveLegacyUserDisks = 1000000 // legacy user disks rely on specific order of provisioning )
Wave constants.
const DeviceType = resource.Type("BlockDevices.block.talos.dev")
DeviceType is type of BlockDevice resource.
const DiscoveredVolumeType = resource.Type("DiscoveredVolumes.block.talos.dev")
DiscoveredVolumeType is type of DiscoveredVolume resource.
const DiscoveryRefreshRequestType = resource.Type("DiscoveryRefreshRequests.block.talos.dev")
DiscoveryRefreshRequestType is type of DiscoveryRefreshRequest resource.
const DiscoveryRefreshStatusType = resource.Type("DiscoveryRefreshStatuses.block.talos.dev")
DiscoveryRefreshStatusType is type of DiscoveryRefreshStatus resource.
const DiskType = resource.Type("Disks.block.talos.dev")
DiskType is type of Disk resource.
const NamespaceName resource.Namespace = v1alpha1.NamespaceName
NamespaceName contains configuration resources.
const PlatformLabel = "talos.dev/platform"
PlatformLabel is the label for platform volumes.
const RefreshID resource.ID = "refresh"
RefreshID is the ID of the singleton discovery refresh request/statue.
const SystemDiskID resource.ID = "system-disk"
SystemDiskID is the singleton resource ID.
const SystemDiskType = resource.Type("SystemDisks.block.talos.dev")
SystemDiskType is type of SystemDisk resource.
const UserDiskConfigStatusID = "user-disks"
UserDiskConfigStatusID is the ID of the UserDiskConfigStatus resource.
const UserDiskConfigStatusType = resource.Type("UserDiskConfigStatuses.block.talos.dev")
UserDiskConfigStatusType is type of UserDiskConfigStatus resource.
const UserDiskLabel = "talos.dev/user-disk"
UserDiskLabel is the label for user disks.
const VolumeConfigType = resource.Type("VolumeConfigs.block.talos.dev")
VolumeConfigType is type of VolumeConfig resource.
const VolumeLifecycleID = resource.ID("volumes")
VolumeLifecycleID is the singleton ID of the resource.
const VolumeLifecycleType = resource.Type("VolumeLifecycles.block.talos.dev")
VolumeLifecycleType is type of VolumeLifecycle resource.
const VolumeStatusType = resource.Type("VolumeStatuses.block.talos.dev")
VolumeStatusType is type of VolumeStatus resource.
Variables ¶
This section is empty.
Functions ¶
func EncryptionKeyTypeStrings ¶ added in v1.8.0
func EncryptionKeyTypeStrings() []string
EncryptionKeyTypeStrings returns a slice of all String values of the enum
func EncryptionProviderTypeStrings ¶ added in v1.8.0
func EncryptionProviderTypeStrings() []string
EncryptionProviderTypeStrings returns a slice of all String values of the enum
func FilesystemTypeStrings ¶ added in v1.8.0
func FilesystemTypeStrings() []string
FilesystemTypeStrings returns a slice of all String values of the enum
func VolumePhaseStrings ¶ added in v1.8.0
func VolumePhaseStrings() []string
VolumePhaseStrings returns a slice of all String values of the enum
func VolumeTypeStrings ¶ added in v1.8.0
func VolumeTypeStrings() []string
VolumeTypeStrings returns a slice of all String values of the enum
Types ¶
type Device ¶
type Device = typed.Resource[DeviceSpec, DeviceExtension]
Device resource holds status of hardware devices (overall).
type DeviceExtension ¶
type DeviceExtension struct{}
DeviceExtension is auxiliary resource data for BlockDevice.
func (DeviceExtension) ResourceDefinition ¶
func (DeviceExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type DeviceSpec ¶
type DeviceSpec struct { Type string `yaml:"type" protobuf:"1"` Major int `yaml:"major" protobuf:"2"` Minor int `yaml:"minor" protobuf:"3"` PartitionName string `yaml:"partitionName,omitempty" protobuf:"4"` PartitionNumber int `yaml:"partitionNumber,omitempty" protobuf:"5"` DevicePath string `yaml:"devicePath" protobuf:"7"` // Generation is bumped every time the device might have changed and might need to be re-probed. Generation int `yaml:"generation" protobuf:"6"` // Parent (if set) specifies the parent device ID. Parent string `yaml:"parent,omitempty" protobuf:"8"` // Secondaries (if set) specifies the secondary device IDs. // // E.g. for a LVM volume secondary is a list of blockdevices that the volume consists of. Secondaries []string `yaml:"secondaries,omitempty" protobuf:"9"` }
DeviceSpec is the spec for devices status.
func (DeviceSpec) DeepCopy ¶
func (o DeviceSpec) DeepCopy() DeviceSpec
DeepCopy generates a deep copy of DeviceSpec.
type DiscoveredVolume ¶
type DiscoveredVolume = typed.Resource[DiscoveredVolumeSpec, DiscoveredVolumeExtension]
DiscoveredVolume resource holds status of hardware DiscoveredVolumes (overall).
func NewDiscoveredVolume ¶
func NewDiscoveredVolume(namespace resource.Namespace, id resource.ID) *DiscoveredVolume
NewDiscoveredVolume initializes a BlockDiscoveredVolume resource.
type DiscoveredVolumeExtension ¶
type DiscoveredVolumeExtension struct{}
DiscoveredVolumeExtension is auxiliary resource data for BlockDiscoveredVolume.
func (DiscoveredVolumeExtension) ResourceDefinition ¶
func (DiscoveredVolumeExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type DiscoveredVolumeSpec ¶
type DiscoveredVolumeSpec struct { DevPath string `yaml:"dev_dath" protobuf:"17"` Type string `yaml:"type" protobuf:"14"` DevicePath string `yaml:"device_path" protobuf:"15"` Parent string `yaml:"parent,omitempty" protobuf:"16"` ParentDevPath string `yaml:"parent_dev_path,omitempty" protobuf:"18"` // Overall size of the probed device (in bytes). Size uint64 `yaml:"size" protobuf:"1"` PrettySize string `yaml:"pretty_size" protobuf:"19"` // Sector size of the device (in bytes). SectorSize uint `yaml:"sector_size,omitempty" protobuf:"2"` // Optimal I/O size for the device (in bytes). IOSize uint `yaml:"io_size,omitempty" protobuf:"3"` Name string `yaml:"name" protobuf:"4"` UUID string `yaml:"uuid,omitempty" protobuf:"5"` Label string `yaml:"label,omitempty" protobuf:"6"` BlockSize uint32 `yaml:"block_size,omitempty" protobuf:"7"` FilesystemBlockSize uint32 `yaml:"filesystem_block_size,omitempty" protobuf:"8"` ProbedSize uint64 `yaml:"probed_size,omitempty" protobuf:"9"` PartitionUUID string `yaml:"partition_uuid,omitempty" protobuf:"10"` PartitionType string `yaml:"partition_type,omitempty" protobuf:"11"` PartitionLabel string `yaml:"partition_label,omitempty" protobuf:"12"` PartitionIndex uint `yaml:"partition_index,omitempty" protobuf:"13"` }
DiscoveredVolumeSpec is the spec for DiscoveredVolumes resource.
func (DiscoveredVolumeSpec) DeepCopy ¶
func (o DiscoveredVolumeSpec) DeepCopy() DiscoveredVolumeSpec
DeepCopy generates a deep copy of DiscoveredVolumeSpec.
func (*DiscoveredVolumeSpec) SetSize ¶ added in v1.8.0
func (s *DiscoveredVolumeSpec) SetSize(size uint64)
SetSize sets the size of the DiscoveredVolume, including the pretty size.
type DiscoveryRefreshRequest ¶ added in v1.8.0
type DiscoveryRefreshRequest = typed.Resource[DiscoveryRefreshRequestSpec, DiscoveryRefreshRequestExtension]
DiscoveryRefreshRequest resource holds a request to refresh the discovered volumes.
func NewDiscoveryRefreshRequest ¶ added in v1.8.0
func NewDiscoveryRefreshRequest(namespace resource.Namespace, id resource.ID) *DiscoveryRefreshRequest
NewDiscoveryRefreshRequest initializes a DiscoveryRefreshRequest resource.
type DiscoveryRefreshRequestExtension ¶ added in v1.8.0
type DiscoveryRefreshRequestExtension struct{}
DiscoveryRefreshRequestExtension is auxiliary resource data for DiscoveryRefreshRequest.
func (DiscoveryRefreshRequestExtension) ResourceDefinition ¶ added in v1.8.0
func (DiscoveryRefreshRequestExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type DiscoveryRefreshRequestSpec ¶ added in v1.8.0
type DiscoveryRefreshRequestSpec struct {
Request int `yaml:"request" protobuf:"1"`
}
DiscoveryRefreshRequestSpec is the spec for DiscoveryRefreshRequest.
func (DiscoveryRefreshRequestSpec) DeepCopy ¶ added in v1.8.0
func (o DiscoveryRefreshRequestSpec) DeepCopy() DiscoveryRefreshRequestSpec
DeepCopy generates a deep copy of DiscoveryRefreshRequestSpec.
type DiscoveryRefreshStatus ¶ added in v1.8.0
type DiscoveryRefreshStatus = typed.Resource[DiscoveryRefreshStatusSpec, DiscoveryRefreshStatusExtension]
DiscoveryRefreshStatus resource holds a status of refresh.
func NewDiscoveryRefreshStatus ¶ added in v1.8.0
func NewDiscoveryRefreshStatus(namespace resource.Namespace, id resource.ID) *DiscoveryRefreshStatus
NewDiscoveryRefreshStatus initializes a DiscoveryRefreshStatus resource.
type DiscoveryRefreshStatusExtension ¶ added in v1.8.0
type DiscoveryRefreshStatusExtension struct{}
DiscoveryRefreshStatusExtension is auxiliary resource data for DiscoveryRefreshStatus.
func (DiscoveryRefreshStatusExtension) ResourceDefinition ¶ added in v1.8.0
func (DiscoveryRefreshStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type DiscoveryRefreshStatusSpec ¶ added in v1.8.0
type DiscoveryRefreshStatusSpec struct {
Request int `yaml:"request" protobuf:"1"`
}
DiscoveryRefreshStatusSpec is the spec for DiscoveryRefreshStatus status.
func (DiscoveryRefreshStatusSpec) DeepCopy ¶ added in v1.8.0
func (o DiscoveryRefreshStatusSpec) DeepCopy() DiscoveryRefreshStatusSpec
DeepCopy generates a deep copy of DiscoveryRefreshStatusSpec.
type Disk ¶ added in v1.8.0
type Disk = typed.Resource[DiskSpec, DiskExtension]
Disk resource holds status of hardware disks.
type DiskExtension ¶ added in v1.8.0
type DiskExtension struct{}
DiskExtension is auxiliary resource data for BlockDisk.
func (DiskExtension) ResourceDefinition ¶ added in v1.8.0
func (DiskExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type DiskSelector ¶ added in v1.8.0
type DiskSelector struct {
Match cel.Expression `yaml:"match,omitempty" protobuf:"1"`
}
DiskSelector selects a disk for the volume.
type DiskSpec ¶ added in v1.8.0
type DiskSpec struct { DevPath string `yaml:"dev_path" protobuf:"14"` Size uint64 `yaml:"size" protobuf:"1"` PrettySize string `yaml:"pretty_size" protobuf:"15"` IOSize uint `yaml:"io_size" protobuf:"2"` SectorSize uint `yaml:"sector_size" protobuf:"3"` Readonly bool `yaml:"readonly" protobuf:"4"` CDROM bool `yaml:"cdrom" protobuf:"13"` Model string `yaml:"model,omitempty" protobuf:"5"` Serial string `yaml:"serial,omitempty" protobuf:"6"` Modalias string `yaml:"modalias,omitempty" protobuf:"7"` WWID string `yaml:"wwid,omitempty" protobuf:"8"` BusPath string `yaml:"bus_path,omitempty" protobuf:"9"` SubSystem string `yaml:"sub_system,omitempty" protobuf:"10"` Transport string `yaml:"transport,omitempty" protobuf:"11"` Rotational bool `yaml:"rotational,omitempty" protobuf:"12"` // SecondaryDisks (if set) specifies the secondary disk IDs. // // E.g. if the blockdevice secondary is vda5, the secondary disk will be set as vda. // This allows to map secondaries between disks ignoring the partitions. SecondaryDisks []string `yaml:"secondary_disks,omitempty" protobuf:"16"` }
DiskSpec is the spec for Disks status.
type EncryptionKey ¶ added in v1.8.0
type EncryptionKey struct { Slot int `yaml:"slot" protobuf:"1"` Type EncryptionKeyType `yaml:"type" protobuf:"2"` // Only for Type == "static": StaticPassphrase []byte `yaml:"staticPassphrase,omitempty" protobuf:"3"` // Only for Type == "kms": KMSEndpoint string `yaml:"kmsEndpoint,omitempty" protobuf:"4"` // Only for Type == "tpm": TPMCheckSecurebootStatusOnEnroll bool `yaml:"tpmCheckSecurebootStatusOnEnroll,omitempty" protobuf:"5"` }
EncryptionKey is the spec for volume encryption key.
type EncryptionKeyType ¶ added in v1.8.0
type EncryptionKeyType int
EncryptionKeyType describes encryption key type.
const ( EncryptionKeyStatic EncryptionKeyType = iota // static EncryptionKeyNodeID // nodeID EncryptionKeyKMS // kms EncryptionKeyTPM // tpm )
Encryption key types.
func EncryptionKeyTypeString ¶ added in v1.8.0
func EncryptionKeyTypeString(s string) (EncryptionKeyType, error)
EncryptionKeyTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func EncryptionKeyTypeValues ¶ added in v1.8.0
func EncryptionKeyTypeValues() []EncryptionKeyType
EncryptionKeyTypeValues returns all values of the enum
func (EncryptionKeyType) IsAEncryptionKeyType ¶ added in v1.8.0
func (i EncryptionKeyType) IsAEncryptionKeyType() bool
IsAEncryptionKeyType returns "true" if the value is listed in the enum definition. "false" otherwise
func (EncryptionKeyType) MarshalText ¶ added in v1.8.0
func (i EncryptionKeyType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for EncryptionKeyType
func (EncryptionKeyType) String ¶ added in v1.8.0
func (i EncryptionKeyType) String() string
func (*EncryptionKeyType) UnmarshalText ¶ added in v1.8.0
func (i *EncryptionKeyType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for EncryptionKeyType
type EncryptionProviderType ¶ added in v1.8.0
type EncryptionProviderType int
EncryptionProviderType describes encryption provider type.
const ( EncryptionProviderNone EncryptionProviderType = iota // none EncryptionProviderLUKS2 // luks2 )
Encryption provider types.
func EncryptionProviderTypeString ¶ added in v1.8.0
func EncryptionProviderTypeString(s string) (EncryptionProviderType, error)
EncryptionProviderTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func EncryptionProviderTypeValues ¶ added in v1.8.0
func EncryptionProviderTypeValues() []EncryptionProviderType
EncryptionProviderTypeValues returns all values of the enum
func (EncryptionProviderType) IsAEncryptionProviderType ¶ added in v1.8.0
func (i EncryptionProviderType) IsAEncryptionProviderType() bool
IsAEncryptionProviderType returns "true" if the value is listed in the enum definition. "false" otherwise
func (EncryptionProviderType) MarshalText ¶ added in v1.8.0
func (i EncryptionProviderType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for EncryptionProviderType
func (EncryptionProviderType) String ¶ added in v1.8.0
func (i EncryptionProviderType) String() string
func (*EncryptionProviderType) UnmarshalText ¶ added in v1.8.0
func (i *EncryptionProviderType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for EncryptionProviderType
type EncryptionSpec ¶ added in v1.8.0
type EncryptionSpec struct { Provider EncryptionProviderType `yaml:"provider" protobuf:"1"` Keys []EncryptionKey `yaml:"keys" protobuf:"2"` Cipher string `yaml:"cipher,omitempty" protobuf:"3"` KeySize uint `yaml:"keySize,omitempty" protobuf:"4"` BlockSize uint64 `yaml:"blockSize,omitempty" protobuf:"5"` PerfOptions []string `yaml:"perfOptions,omitempty" protobuf:"6"` }
EncryptionSpec is the spec for volume encryption.
type FilesystemSpec ¶ added in v1.8.0
type FilesystemSpec struct { // Filesystem type. Type FilesystemType `yaml:"type" protobuf:"1"` // Filesystem label. Label string `yaml:"label,omitempty" protobuf:"2"` }
FilesystemSpec is the spec for volume filesystem.
type FilesystemType ¶ added in v1.8.0
type FilesystemType int
FilesystemType describes filesystem type.
const ( FilesystemTypeNone FilesystemType = iota // none FilesystemTypeXFS // xfs FilesystemTypeVFAT // vfat FilesystemTypeEXT4 // ext4 FilesystemTypeISO9660 // iso9660 )
Filesystem types.
func FilesystemTypeString ¶ added in v1.8.0
func FilesystemTypeString(s string) (FilesystemType, error)
FilesystemTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func FilesystemTypeValues ¶ added in v1.8.0
func FilesystemTypeValues() []FilesystemType
FilesystemTypeValues returns all values of the enum
func (FilesystemType) IsAFilesystemType ¶ added in v1.8.0
func (i FilesystemType) IsAFilesystemType() bool
IsAFilesystemType returns "true" if the value is listed in the enum definition. "false" otherwise
func (FilesystemType) MarshalText ¶ added in v1.8.0
func (i FilesystemType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for FilesystemType
func (FilesystemType) String ¶ added in v1.8.0
func (i FilesystemType) String() string
func (*FilesystemType) UnmarshalText ¶ added in v1.8.0
func (i *FilesystemType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for FilesystemType
type LocatorSpec ¶ added in v1.8.0
type LocatorSpec struct {
Match cel.Expression `yaml:"match,omitempty" protobuf:"1"`
}
LocatorSpec is the spec for volume locator.
type MountSpec ¶ added in v1.8.0
type MountSpec struct { // Mount path for the volume. TargetPath string `yaml:"targetPath" protobuf:"1"` // SELinux label for the volume. SelinuxLabel string `yaml:"selinuxLabel" protobuf:"2"` }
MountSpec is the spec for volume mount.
type PartitionSpec ¶ added in v1.8.0
type PartitionSpec struct { // Partition minimum size in bytes. MinSize uint64 `yaml:"minSize" protobuf:"1"` // Partition maximum size in bytes, if not set, grows to the maximum size. MaxSize uint64 `yaml:"maxSize,omitempty" protobuf:"2"` // Grow the partition automatically to the maximum size. Grow bool `yaml:"grow" protobuf:"3"` // Label for the partition. Label string `yaml:"label,omitempty" protobuf:"4"` // Partition type UUID. TypeUUID string `yaml:"typeUUID,omitempty" protobuf:"5"` }
PartitionSpec is the spec for volume partitioning.
type ProvisioningSpec ¶ added in v1.8.0
type ProvisioningSpec struct { // Provisioning wave for the volume. // // Waves are processed sequentially - the volumes in the wave are only provisioned after the previous wave is done. Wave int `yaml:"wave,omitempty" protobuf:"3"` // DiskSelector selects a disk for the volume. DiskSelector DiskSelector `yaml:"diskSelector,omitempty" protobuf:"1"` // PartitionSpec describes how to provision the volume (partition type). PartitionSpec PartitionSpec `yaml:"partitionSpec,omitempty" protobuf:"2"` // FilesystemSpec describes how to provision the volume (filesystem type). FilesystemSpec FilesystemSpec `yaml:"filesystemSpec,omitempty" protobuf:"4"` }
ProvisioningSpec is the spec for volume provisioning.
type SystemDisk ¶ added in v1.8.0
type SystemDisk = typed.Resource[SystemDiskSpec, SystemDiskExtension]
SystemDisk resource holds ID of the disk which is the Talos system disk.
func NewSystemDisk ¶ added in v1.8.0
func NewSystemDisk(namespace resource.Namespace, id resource.ID) *SystemDisk
NewSystemDisk initializes a BlockSystemDisk resource.
type SystemDiskExtension ¶ added in v1.8.0
type SystemDiskExtension struct{}
SystemDiskExtension is auxiliary resource data for BlockSystemDisk.
func (SystemDiskExtension) ResourceDefinition ¶ added in v1.8.0
func (SystemDiskExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type SystemDiskSpec ¶ added in v1.8.0
type SystemDiskSpec struct { DiskID string `yaml:"diskID" protobuf:"1"` DevPath string `yaml:"devPath" protobuf:"2"` }
SystemDiskSpec is the spec for SystemDisks resource.
func GetSystemDisk ¶ added in v1.8.0
GetSystemDisk returns the system disk from the state.
If the system disk is not found, it returns nil.
func (SystemDiskSpec) DeepCopy ¶ added in v1.8.0
func (o SystemDiskSpec) DeepCopy() SystemDiskSpec
DeepCopy generates a deep copy of SystemDiskSpec.
type UserDiskConfigStatus ¶ added in v1.8.0
type UserDiskConfigStatus = typed.Resource[UserDiskConfigStatusSpec, UserDiskConfigStatusExtension]
UserDiskConfigStatus resource holds a status of user disk machine configuration.
func NewUserDiskConfigStatus ¶ added in v1.8.0
func NewUserDiskConfigStatus(namespace resource.Namespace, id resource.ID) *UserDiskConfigStatus
NewUserDiskConfigStatus initializes a UserDiskConfigStatus resource.
type UserDiskConfigStatusExtension ¶ added in v1.8.0
type UserDiskConfigStatusExtension struct{}
UserDiskConfigStatusExtension is auxiliary resource data for UserDiskConfigStatus.
func (UserDiskConfigStatusExtension) ResourceDefinition ¶ added in v1.8.0
func (UserDiskConfigStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type UserDiskConfigStatusSpec ¶ added in v1.8.0
type UserDiskConfigStatusSpec struct {
Ready bool `yaml:"ready" protobuf:"1"`
}
UserDiskConfigStatusSpec is the spec for UserDiskConfigStatus resource.
func (UserDiskConfigStatusSpec) DeepCopy ¶ added in v1.8.0
func (o UserDiskConfigStatusSpec) DeepCopy() UserDiskConfigStatusSpec
DeepCopy generates a deep copy of UserDiskConfigStatusSpec.
type VolumeConfig ¶ added in v1.8.0
type VolumeConfig = typed.Resource[VolumeConfigSpec, VolumeConfigExtension]
VolumeConfig resource contains configuration for machine volumes.
func NewVolumeConfig ¶ added in v1.8.0
func NewVolumeConfig(namespace resource.Namespace, id resource.ID) *VolumeConfig
NewVolumeConfig initializes a BlockVolumeConfig resource.
type VolumeConfigExtension ¶ added in v1.8.0
type VolumeConfigExtension struct{}
VolumeConfigExtension is auxiliary resource data for BlockVolumeConfig.
func (VolumeConfigExtension) ResourceDefinition ¶ added in v1.8.0
func (VolumeConfigExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type VolumeConfigSpec ¶ added in v1.8.0
type VolumeConfigSpec struct { // Parent volume ID, if set no operations on the volume continue until the parent volume is ready. ParentID string `yaml:"parentId,omitempty" protobuf:"1"` // Volume type. Type VolumeType `yaml:"type" protobuf:"2"` // Provisioning configuration (how to provision a volume). Provisioning ProvisioningSpec `yaml:"provisioning" protobuf:"3"` // Encryption configuration (how to encrypt a volume). Encryption EncryptionSpec `yaml:"encryption,omitempty" protobuf:"6"` // How to find a volume. Locator LocatorSpec `yaml:"locator" protobuf:"4"` // Mount options for the volume. Mount MountSpec `yaml:"mount,omitempty" protobuf:"5"` }
VolumeConfigSpec is the spec for VolumeConfig resource.
func (VolumeConfigSpec) DeepCopy ¶ added in v1.8.0
func (o VolumeConfigSpec) DeepCopy() VolumeConfigSpec
DeepCopy generates a deep copy of VolumeConfigSpec.
type VolumeLifecycle ¶ added in v1.8.0
type VolumeLifecycle = typed.Resource[VolumeLifecycleSpec, VolumeLifecycleExtension]
VolumeLifecycle resource exists to signal that the volumes are to be closed.
Volume manager controller puts a finalizer on this resource, and when this resource is being torn down, it will close all the volumes, and release the finalizer.
func NewVolumeLifecycle ¶ added in v1.8.0
func NewVolumeLifecycle(namespace resource.Namespace, id resource.ID) *VolumeLifecycle
NewVolumeLifecycle initializes an empty VolumeLifecycle resource.
type VolumeLifecycleExtension ¶ added in v1.8.0
type VolumeLifecycleExtension struct{}
VolumeLifecycleExtension provides auxiliary methods for VolumeLifecycle.
func (VolumeLifecycleExtension) ResourceDefinition ¶ added in v1.8.0
func (VolumeLifecycleExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements typed.Extension interface.
type VolumeLifecycleSpec ¶ added in v1.8.0
type VolumeLifecycleSpec struct{}
VolumeLifecycleSpec is empty.
func (VolumeLifecycleSpec) DeepCopy ¶ added in v1.8.0
func (o VolumeLifecycleSpec) DeepCopy() VolumeLifecycleSpec
DeepCopy generates a deep copy of VolumeLifecycleSpec.
type VolumePhase ¶ added in v1.8.0
type VolumePhase int
VolumePhase describes volume phase.
const ( VolumePhaseWaiting VolumePhase = iota // waiting VolumePhaseFailed // failed VolumePhaseMissing // missing VolumePhaseLocated // located VolumePhaseProvisioned // provisioned VolumePhasePrepared // prepared VolumePhaseReady // ready VolumePhaseClosed // closed )
Volume phases.
func VolumePhaseString ¶ added in v1.8.0
func VolumePhaseString(s string) (VolumePhase, error)
VolumePhaseString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func VolumePhaseValues ¶ added in v1.8.0
func VolumePhaseValues() []VolumePhase
VolumePhaseValues returns all values of the enum
func (VolumePhase) IsAVolumePhase ¶ added in v1.8.0
func (i VolumePhase) IsAVolumePhase() bool
IsAVolumePhase returns "true" if the value is listed in the enum definition. "false" otherwise
func (VolumePhase) MarshalText ¶ added in v1.8.0
func (i VolumePhase) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for VolumePhase
func (VolumePhase) String ¶ added in v1.8.0
func (i VolumePhase) String() string
func (*VolumePhase) UnmarshalText ¶ added in v1.8.0
func (i *VolumePhase) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for VolumePhase
type VolumeStatus ¶ added in v1.8.0
type VolumeStatus = typed.Resource[VolumeStatusSpec, VolumeStatusExtension]
VolumeStatus resource contains information about the volume status.
func NewVolumeStatus ¶ added in v1.8.0
func NewVolumeStatus(namespace resource.Namespace, id resource.ID) *VolumeStatus
NewVolumeStatus initializes a BlockVolumeStatus resource.
func WaitForVolumePhase ¶ added in v1.8.0
func WaitForVolumePhase(ctx context.Context, st state.State, volumeID string, expectedPhases ...VolumePhase) (*VolumeStatus, error)
WaitForVolumePhase waits for the volume to reach the expected phase(s).
type VolumeStatusExtension ¶ added in v1.8.0
type VolumeStatusExtension struct{}
VolumeStatusExtension is auxiliary resource data for BlockVolumeStatus.
func (VolumeStatusExtension) ResourceDefinition ¶ added in v1.8.0
func (VolumeStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type VolumeStatusSpec ¶ added in v1.8.0
type VolumeStatusSpec struct { Phase VolumePhase `yaml:"phase" protobuf:"1"` PreFailPhase VolumePhase `yaml:"preFailPhase,omitempty" protobuf:"6"` // Location is the path to the block device (raw). Location string `yaml:"location,omitempty" protobuf:"2"` // MountLocation is the location to be mounted, might be different from location. MountLocation string `yaml:"mountLocation,omitempty" protobuf:"11"` PartitionIndex int `yaml:"partitionIndex,omitempty" protobuf:"8"` // ParentLocation (if present) is the location of the parent block device for partitions. ParentLocation string `yaml:"parentLocation,omitempty" protobuf:"7"` UUID string `yaml:"uuid,omitempty" protobuf:"4"` PartitionUUID string `yaml:"partitionUUID,omitempty" protobuf:"5"` Size uint64 `yaml:"size,omitempty" protobuf:"9"` PrettySize string `yaml:"prettySize,omitempty" protobuf:"13"` // Filesystem is the filesystem type. Filesystem FilesystemType `yaml:"filesystem,omitempty" protobuf:"10"` // EncryptionProvider is the provider of the encryption. EncryptionProvider EncryptionProviderType `yaml:"encryptionProvider,omitempty" protobuf:"12"` EncryptionFailedSyncs []string `yaml:"encryptionFailedSyncs,omitempty" protobuf:"14"` ErrorMessage string `yaml:"errorMessage,omitempty" protobuf:"3"` }
VolumeStatusSpec is the spec for VolumeStatus resource.
func (VolumeStatusSpec) DeepCopy ¶ added in v1.8.0
func (o VolumeStatusSpec) DeepCopy() VolumeStatusSpec
DeepCopy generates a deep copy of VolumeStatusSpec.
func (*VolumeStatusSpec) SetSize ¶ added in v1.8.0
func (s *VolumeStatusSpec) SetSize(size uint64)
SetSize sets the size of the volume status, including the pretty size.
type VolumeType ¶ added in v1.8.0
type VolumeType int
VolumeType describes volume type.
const ( VolumeTypePartition VolumeType = iota // partition VolumeTypeDisk // disk VolumeTypeTmpfs // tmpfs )
Volume types.
func VolumeTypeString ¶ added in v1.8.0
func VolumeTypeString(s string) (VolumeType, error)
VolumeTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func VolumeTypeValues ¶ added in v1.8.0
func VolumeTypeValues() []VolumeType
VolumeTypeValues returns all values of the enum
func (VolumeType) IsAVolumeType ¶ added in v1.8.0
func (i VolumeType) IsAVolumeType() bool
IsAVolumeType returns "true" if the value is listed in the enum definition. "false" otherwise
func (VolumeType) MarshalText ¶ added in v1.8.0
func (i VolumeType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for VolumeType
func (VolumeType) String ¶ added in v1.8.0
func (i VolumeType) String() string
func (*VolumeType) UnmarshalText ¶ added in v1.8.0
func (i *VolumeType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for VolumeType
Source Files ¶
- block.go
- deep_copy.generated.go
- device.go
- discovered_volume.go
- discovery_refresh_request.go
- discovery_refresh_status.go
- disk.go
- encryptionkeytype.go
- encryptionprovidertype.go
- filesystemtype.go
- system_disk.go
- user_disk_config_status.go
- volume_config.go
- volume_lifecycle.go
- volume_status.go
- volumephase.go
- volumetype.go
- volumetype_enumer.go