v1alpha1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: GPL-2.0-or-later Imports: 13 Imported by: 5

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the localstorage v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=localstorage.k8s.pgc.umn.edu

Package v1alpha1 contains API Schema definitions for the localstorage v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=localstorage.k8s.pgc.umn.edu

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "localstorage.k8s.pgc.umn.edu", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

Functions

This section is empty.

Types

type Disk

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

	Spec   DiskSpec   `json:"spec,omitempty"`
	Status DiskStatus `json:"status,omitempty"`
}

Disk is the Schema for the disks API +k8s:openapi-gen=true

func (*Disk) AsPv

func (d *Disk) AsPv() *corev1.PersistentVolume

func (Disk) CapacityTB

func (d Disk) CapacityTB() int

CapacityTB returns capacity rounded to the nearest TB

func (*Disk) DeepCopy

func (in *Disk) DeepCopy() *Disk

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

func (*Disk) DeepCopyInto

func (in *Disk) DeepCopyInto(out *Disk)

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

func (*Disk) DeepCopyObject

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

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

func (*Disk) Equals

func (d *Disk) Equals(d2 *Disk) bool

Equals checks if a disk is equal to another disk.

func (*Disk) GetEnabled

func (d *Disk) GetEnabled() bool

func (*Disk) GetEnv

func (d *Disk) GetEnv(prefix string) []corev1.EnvVar

func (*Disk) GetPreparePhase

func (d *Disk) GetPreparePhase() StoragePreparePhase

func (*Disk) GetPvLabelSelector

func (d *Disk) GetPvLabelSelector() *metav1.LabelSelector

func (*Disk) GetStorageClass

func (d *Disk) GetStorageClass() string

func (*Disk) Init

func (d *Disk) Init(name string)

Init initializes a disk.

func (Disk) Name

func (d Disk) Name() string

Name computes the name of a disk.

func (Disk) Populated

func (d Disk) Populated() bool

Populated checks if the disk is populated.

func (*Disk) SetPreparePhase

func (d *Disk) SetPreparePhase(phase StoragePreparePhase)

func (*Disk) SetStorageClass

func (d *Disk) SetStorageClass(storageClass string)

func (Disk) String

func (d Disk) String() string

String returns a human readable string of the disk struct.

func (*Disk) UpdateLabels

func (d *Disk) UpdateLabels()

UpdateLabels sets convenience labels from disk data.

func (Disk) Valid

func (d Disk) Valid() bool

Valid checks if disk struct is valid.

type DiskInfo

type DiskInfo struct {
	Wwn            string            `json:"wwn"`
	Model          string            `json:"model"`
	SerialNumber   string            `json:"serialNumber"`
	Capacity       resource.Quantity `json:"capacity"`
	UdevProperties map[string]string `json:"udevProperties"`
	UdevAttributes map[string]string `json:"udevAttributes"`
}

func (*DiskInfo) UpdateInfo

func (d *DiskInfo) UpdateInfo(wwn, model, sn, capacity string) error

UpdateInfo updates the Info of a disk.

type DiskList

type DiskList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Disk `json:"items"`
}

DiskList contains a list of Disk

func (*DiskList) DeepCopy

func (in *DiskList) DeepCopy() *DiskList

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

func (*DiskList) DeepCopyInto

func (in *DiskList) DeepCopyInto(out *DiskList)

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

func (*DiskList) DeepCopyObject

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

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

type DiskLocation

type DiskLocation struct {
	NodeName      string `json:"node"`
	Backplane     string `json:"backplane"`
	Slot          string `json:"slot"`
	AdapterDriver string `json:"adapterDriver,omitempty"`
}

func (*DiskLocation) UpdateLocation

func (d *DiskLocation) UpdateLocation(nodeName, backPlane, slot, adapterDriver string) error

UpdateLocation updates the location of a disk.

type DiskSpec

type DiskSpec struct {
	Info         DiskInfo     `json:"diskInfo"`
	Location     DiskLocation `json:"location"`
	StorageClass string       `json:"storageClass"`
	Enabled      bool         `json:"enabled"`
}

DiskSpec defines the desired state of Disk

func (*DiskSpec) DeepCopy

func (in *DiskSpec) DeepCopy() *DiskSpec

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

func (*DiskSpec) DeepCopyInto

func (in *DiskSpec) DeepCopyInto(out *DiskSpec)

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

type DiskStatus

type DiskStatus struct {
	PreparePhase StoragePreparePhase `json:"preparePhase"`
}

DiskStatus defines the observed state of Disk

func (*DiskStatus) DeepCopy

func (in *DiskStatus) DeepCopy() *DiskStatus

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

func (*DiskStatus) DeepCopyInto

func (in *DiskStatus) DeepCopyInto(out *DiskStatus)

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

type Filesystem

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

	Spec   FilesystemSpec   `json:"spec,omitempty"`
	Status FilesystemStatus `json:"status,omitempty"`
}

Filesystem is the Schema for the filesystems API +k8s:openapi-gen=true

func (*Filesystem) AsPv

func (f *Filesystem) AsPv() *corev1.PersistentVolume

func (*Filesystem) DeepCopy

func (in *Filesystem) DeepCopy() *Filesystem

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

func (*Filesystem) DeepCopyInto

func (in *Filesystem) DeepCopyInto(out *Filesystem)

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

func (*Filesystem) DeepCopyObject

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

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

func (*Filesystem) GetEnabled

func (f *Filesystem) GetEnabled() bool

func (*Filesystem) GetEnv

func (f *Filesystem) GetEnv(prefix string) []corev1.EnvVar

func (*Filesystem) GetPreparePhase

func (f *Filesystem) GetPreparePhase() StoragePreparePhase

func (*Filesystem) GetPvLabelSelector

func (f *Filesystem) GetPvLabelSelector() *metav1.LabelSelector

func (*Filesystem) GetStorageClass

func (f *Filesystem) GetStorageClass() string

func (*Filesystem) IsMountable

func (f *Filesystem) IsMountable() bool

func (*Filesystem) SetPreparePhase

func (f *Filesystem) SetPreparePhase(phase StoragePreparePhase)

func (*Filesystem) SetStorageClass

func (f *Filesystem) SetStorageClass(storageClass string)

type FilesystemList

type FilesystemList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Filesystem `json:"items"`
}

FilesystemList contains a list of Filesystem

func (*FilesystemList) DeepCopy

func (in *FilesystemList) DeepCopy() *FilesystemList

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

func (*FilesystemList) DeepCopyInto

func (in *FilesystemList) DeepCopyInto(out *FilesystemList)

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

func (*FilesystemList) DeepCopyObject

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

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

type FilesystemSpec

type FilesystemSpec struct {
	NodeName     string            `json:"nodeName"`
	DevicePath   string            `json:"device"`
	Type         string            `json:"type"`
	MountPath    string            `json:"mountPath"`
	MountOptions string            `json:"mountOptions"`
	MountEnabled bool              `json:"mountEnabled"`
	StorageClass string            `json:"storageClass"`
	Capacity     resource.Quantity `json:"capacity"`
}

FilesystemSpec defines the desired state of Filesystem

func (*FilesystemSpec) DeepCopy

func (in *FilesystemSpec) DeepCopy() *FilesystemSpec

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

func (*FilesystemSpec) DeepCopyInto

func (in *FilesystemSpec) DeepCopyInto(out *FilesystemSpec)

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

type FilesystemStatus

type FilesystemStatus struct {
	PreparePhase StoragePreparePhase `json:"preparePhase"`
	Mounted      bool                `json:"mounted"`
}

FilesystemStatus defines the observed state of Filesystem

func (*FilesystemStatus) DeepCopy

func (in *FilesystemStatus) DeepCopy() *FilesystemStatus

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

func (*FilesystemStatus) DeepCopyInto

func (in *FilesystemStatus) DeepCopyInto(out *FilesystemStatus)

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

type PreparableStorageObject

type PreparableStorageObject interface {
	metav1.Object
	AsPv() *corev1.PersistentVolume
	GetStorageClass() string
	GetEnv(string) []corev1.EnvVar
	GetPvLabelSelector() *metav1.LabelSelector
}

type StoragePrepareJob

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

	Spec   StoragePrepareJobSpec   `json:"spec,omitempty"`
	Status StoragePrepareJobStatus `json:"status,omitempty"`
}

StoragePrepareJob is the Schema for the storagepreparejobs API +k8s:openapi-gen=true

func NewStoragePrepareJob

func NewStoragePrepareJob(template *StoragePrepareJobTemplate, d PreparableStorageObject, namespace string) *StoragePrepareJob

func (*StoragePrepareJob) DeepCopy

func (in *StoragePrepareJob) DeepCopy() *StoragePrepareJob

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

func (*StoragePrepareJob) DeepCopyInto

func (in *StoragePrepareJob) DeepCopyInto(out *StoragePrepareJob)

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

func (*StoragePrepareJob) DeepCopyObject

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

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

func (*StoragePrepareJob) GetObjects

func (s *StoragePrepareJob) GetObjects() []StoragePrepareObject

type StoragePrepareJobList

type StoragePrepareJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StoragePrepareJob `json:"items"`
}

StoragePrepareJobList contains a list of StoragePrepareJob

func (*StoragePrepareJobList) DeepCopy

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

func (*StoragePrepareJobList) DeepCopyInto

func (in *StoragePrepareJobList) DeepCopyInto(out *StoragePrepareJobList)

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

func (*StoragePrepareJobList) DeepCopyObject

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

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

type StoragePrepareJobPhase

type StoragePrepareJobPhase string
const (
	StoragePrepareJobPhasePending   StoragePrepareJobPhase = "pending"
	StoragePrepareJobPhaseRunning   StoragePrepareJobPhase = "running"
	StoragePrepareJobPhaseFailed    StoragePrepareJobPhase = "failed"
	StoragePrepareJobPhaseSucceeded StoragePrepareJobPhase = "succeeded"
)

type StoragePrepareJobSpec

type StoragePrepareJobSpec struct {
	Pv  corev1.PersistentVolume      `json:"pv"`
	Pvc corev1.PersistentVolumeClaim `json:"pvc"`
	Job batchv1.Job                  `json:"job"`
}

StoragePrepareJobSpec defines the desired state of StoragePrepareJob

func (*StoragePrepareJobSpec) DeepCopy

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

func (*StoragePrepareJobSpec) DeepCopyInto

func (in *StoragePrepareJobSpec) DeepCopyInto(out *StoragePrepareJobSpec)

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

type StoragePrepareJobStatus

type StoragePrepareJobStatus struct {
	Phase StoragePrepareJobPhase `json:"phase"`
}

StoragePrepareJobStatus defines the observed state of StoragePrepareJob

func (*StoragePrepareJobStatus) DeepCopy

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

func (*StoragePrepareJobStatus) DeepCopyInto

func (in *StoragePrepareJobStatus) DeepCopyInto(out *StoragePrepareJobStatus)

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

type StoragePrepareJobTemplate

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

	Spec   StoragePrepareJobTemplateSpec   `json:"spec,omitempty"`
	Status StoragePrepareJobTemplateStatus `json:"status,omitempty"`
}

StoragePrepareJobTemplate is the Schema for the storagepreparejobtemplates API +k8s:openapi-gen=true

func (*StoragePrepareJobTemplate) CreatePrepareJob

func (s *StoragePrepareJobTemplate) CreatePrepareJob(pvc corev1.PersistentVolumeClaim, jobNameSuffix string) *batchv1.Job

CreatePrepareJob returns a Job from a PersistentVolumeClaim

func (*StoragePrepareJobTemplate) DeepCopy

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

func (*StoragePrepareJobTemplate) DeepCopyInto

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

func (*StoragePrepareJobTemplate) DeepCopyObject

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

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

func (*StoragePrepareJobTemplate) GetVolumeClaimTemplate

func (s *StoragePrepareJobTemplate) GetVolumeClaimTemplate() *corev1.PersistentVolumeClaim

func (*StoragePrepareJobTemplate) GetVolumeName

func (s *StoragePrepareJobTemplate) GetVolumeName() string

func (*StoragePrepareJobTemplate) Matches

func (s *StoragePrepareJobTemplate) Matches(o prepareObject) bool

func (*StoragePrepareJobTemplate) SetPvcMetadata

type StoragePrepareJobTemplateList

type StoragePrepareJobTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StoragePrepareJobTemplate `json:"items"`
}

StoragePrepareJobTemplateList contains a list of StoragePrepareJobTemplate

func (*StoragePrepareJobTemplateList) DeepCopy

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

func (*StoragePrepareJobTemplateList) DeepCopyInto

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

func (*StoragePrepareJobTemplateList) DeepCopyObject

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

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

func (*StoragePrepareJobTemplateList) FindMatchingJob

func (l *StoragePrepareJobTemplateList) FindMatchingJob(o prepareObject) (*StoragePrepareJobTemplate, error)

type StoragePrepareJobTemplateSpec

type StoragePrepareJobTemplateSpec struct {
	Selector   metav1.LabelSelector `json:"selector"`
	Type       metav1.TypeMeta      `json:"type"`
	Template   batchv1.JobSpec      `json:"template"`
	VolumeName string               `json:"volumeName"`
}

StoragePrepareJobTemplateSpec defines the desired state of StoragePrepareJobTemplate

func (*StoragePrepareJobTemplateSpec) DeepCopy

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

func (*StoragePrepareJobTemplateSpec) DeepCopyInto

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

type StoragePrepareJobTemplateStatus

type StoragePrepareJobTemplateStatus struct {
}

StoragePrepareJobTemplateStatus defines the observed state of StoragePrepareJobTemplate

func (*StoragePrepareJobTemplateStatus) DeepCopy

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

func (*StoragePrepareJobTemplateStatus) DeepCopyInto

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

type StoragePrepareObject

type StoragePrepareObject interface {
	runtime.Object
	metav1.Object
}

type StoragePreparePhase

type StoragePreparePhase string
const (
	StoragePreparePhaseDiscovered StoragePreparePhase = "discovered"
	StoragePreparePhasePreparing  StoragePreparePhase = "preparing"
	StoragePreparePhaseCleanup    StoragePreparePhase = "cleanup prep job"
	StoragePreparePhasePrepared   StoragePreparePhase = "prepared"
	StoragePreparePhaseFailed     StoragePreparePhase = "failed"
)

Jump to

Keyboard shortcuts

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