v1alpha1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the zfs v1alpha1 API group +kubebuilder:object:generate=true +groupName=zfs.unstable.cloud +kubebuilder:validation:Optional

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "zfs.unstable.cloud", Version: "v1alpha1"}

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

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Volume

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

	Spec   VolumeSpec   `json:"spec,omitempty"`
	Status VolumeStatus `json:"status,omitempty"`
}

Volume is the Schema for the volumes API +kubebuilder:resource:shortName=vol,scope=Cluster +kubebuilder:subresource:status

func (*Volume) DeepCopy

func (in *Volume) DeepCopy() *Volume

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

func (*Volume) DeepCopyInto

func (in *Volume) DeepCopyInto(out *Volume)

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

func (*Volume) DeepCopyObject

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

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

func (*Volume) GetCondition

func (volume *Volume) GetCondition(condType VolumeConditionType) *VolumeCondition

GetCondition returns condition of type condType if it exists. Otherwise returns nil.

func (*Volume) Ready

func (volume *Volume) Ready() bool

func (*Volume) SetCondition

func (volume *Volume) SetCondition(condType VolumeConditionType, status corev1.ConditionStatus, t metav1.Time)

SetCondition sets condition of type condType with empty reason and message.

func (*Volume) SetConditionReason

func (volume *Volume) SetConditionReason(condType VolumeConditionType, status corev1.ConditionStatus, reason, msg string, t metav1.Time)

SetConditionReason is similar to setCondition, but it takes reason and message.

type VolumeCondition

type VolumeCondition struct {
	// Type is the type of this condition.
	Type VolumeConditionType `json:"type,omitempty"`
	// Status is the status of this condition.
	Status corev1.ConditionStatus `json:"status,omitempty"`
	// LastTransitionTime is the last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// Reason is the one-word, CamelCase reason about the last transition.
	Reason string `json:"reason,omitempty"`
	// Message is human readable message about the last transition.
	Message string `json:"message,omitempty"`
}

func (*VolumeCondition) DeepCopy

func (in *VolumeCondition) DeepCopy() *VolumeCondition

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

func (*VolumeCondition) DeepCopyInto

func (in *VolumeCondition) DeepCopyInto(out *VolumeCondition)

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

type VolumeConditionType

type VolumeConditionType string

VolumeConditionType is a valid value for VolumeCondition.Type

const (
	// VolumeConditionTypeReady means that API server on the Volume is ready for service.
	VolumeConditionReady VolumeConditionType = "Ready"
)

type VolumeList

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

VolumeList contains a list of Volume

func (*VolumeList) DeepCopy

func (in *VolumeList) DeepCopy() *VolumeList

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

func (*VolumeList) DeepCopyInto

func (in *VolumeList) DeepCopyInto(out *VolumeList)

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

func (*VolumeList) DeepCopyObject

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

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

type VolumeSpec

type VolumeSpec struct {
	// NodeName is a node name where the volume will be placed.
	// +kubebuilder:validation:Required
	NodeName string `json:"nodeName,omitempty"`

	// VolumeName is a ZVOL name
	// +kubebuilder:validation:Pattern=^[-A-Za-z0-9]+(\/[-A-Za-z0-9]+)+$
	// +kubebuilder:validation:Required
	VolumeName string `json:"volumeName,omitempty"`

	// Capacity represents the desired resources of the volume
	// +kubebuilder:validation:Required
	Capacity corev1.ResourceList `json:"capacity,omitempty"`

	// Properties represents the desired zfs properties
	Properties map[string]string `json:"properties,omitempty"`
}

VolumeSpec defines the desired state of Volume

func (*VolumeSpec) DeepCopy

func (in *VolumeSpec) DeepCopy() *VolumeSpec

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

func (*VolumeSpec) DeepCopyInto

func (in *VolumeSpec) DeepCopyInto(out *VolumeSpec)

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

type VolumeStatus

type VolumeStatus struct {
	// Conditions are the current state of Volume
	Conditions []VolumeCondition `json:"conditions,omitempty"`
}

VolumeStatus defines the observed state of Volume

func (*VolumeStatus) DeepCopy

func (in *VolumeStatus) DeepCopy() *VolumeStatus

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

func (*VolumeStatus) DeepCopyInto

func (in *VolumeStatus) DeepCopyInto(out *VolumeStatus)

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