Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the discoblocks.ondat.io v1 API group +kubebuilder:object:generate=true +groupName=discoblocks.ondat.io
Index ¶
- Variables
- func InitDiskConfigWebhookDeps(kubeClient client.Client, provisioners []string)
- type AvailabilityMode
- type DiskConfig
- func (in *DiskConfig) DeepCopy() *DiskConfig
- func (in *DiskConfig) DeepCopyInto(out *DiskConfig)
- func (in *DiskConfig) DeepCopyObject() runtime.Object
- func (r *DiskConfig) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *DiskConfig) ValidateCreate() error
- func (r *DiskConfig) ValidateDelete() error
- func (r *DiskConfig) ValidateUpdate(old runtime.Object) error
- type DiskConfigList
- type DiskConfigSpec
- type DiskConfigStatus
- type Policy
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "discoblocks.ondat.io", Version: "v1"} // 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 ¶
func InitDiskConfigWebhookDeps ¶
InitDiskConfigWebhookDeps configures dependencies for webhook
Types ¶
type AvailabilityMode ¶ added in v0.0.2
type AvailabilityMode string
+kubebuilder:validation:Enum=ReadWriteSame;ReadWriteOnce;ReadWriteDaemon
const ( ReadWriteSame AvailabilityMode = "ReadWriteSame" ReadWriteOnce AvailabilityMode = "ReadWriteOnce" ReadWriteDaemon AvailabilityMode = "ReadWriteDaemon" )
type DiskConfig ¶
type DiskConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DiskConfigSpec `json:"spec,omitempty"` Status DiskConfigStatus `json:"status,omitempty"` }
DiskConfig is the Schema for the diskconfigs API
func (*DiskConfig) DeepCopy ¶
func (in *DiskConfig) DeepCopy() *DiskConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskConfig.
func (*DiskConfig) DeepCopyInto ¶
func (in *DiskConfig) DeepCopyInto(out *DiskConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DiskConfig) DeepCopyObject ¶
func (in *DiskConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DiskConfig) SetupWebhookWithManager ¶
func (r *DiskConfig) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager sets up the webhook with the Manager.
func (*DiskConfig) ValidateCreate ¶
func (r *DiskConfig) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*DiskConfig) ValidateDelete ¶
func (r *DiskConfig) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*DiskConfig) ValidateUpdate ¶
func (r *DiskConfig) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type DiskConfigList ¶
type DiskConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DiskConfig `json:"items"` }
DiskConfigList contains a list of DiskConfig
func (*DiskConfigList) DeepCopy ¶
func (in *DiskConfigList) DeepCopy() *DiskConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskConfigList.
func (*DiskConfigList) DeepCopyInto ¶
func (in *DiskConfigList) DeepCopyInto(out *DiskConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DiskConfigList) DeepCopyObject ¶
func (in *DiskConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DiskConfigSpec ¶
type DiskConfigSpec struct { // StorageClassName is the of the StorageClass required by the config. //+kubebuilder:validation:Optional StorageClassName string `json:"storageClassName,omitempty" yaml:"storageClassName,omitempty"` // Capacity represents the desired capacity of the underlying volume. //+kubebuilder:default:="1Gi" //+kubebuilder:validation:Optional Capacity resource.Quantity `json:"capacity,omitempty" yaml:"capacity,omitempty"` // MountPointPattern is the mount point of the disk. %d is optional and represents disk number in order. Will be automatically appended for second drive if missing. // Reserved characters: ><|:&.+*!?^$()[]{}, only 1 %d allowed. //+kubebuilder:default:="/media/discoblocks/<name>-%d" //+kubebuilder:validation:Pattern:="^/(.*)" //+kubebuilder:validation:Optional MountPointPattern string `json:"mountPointPattern,omitempty" yaml:"mountPointPattern,omitempty"` // AccessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 //+kubebuilder:default:={"ReadWriteOnce"} //+kubebuilder:validation:Optional AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty" yaml:"accessModes,omitempty"` // AvailabilityMode defines the desired number of instances. //+kubebuilder:default:="ReadWriteOnce" //+kubebuilder:validation:Optional AvailabilityMode AvailabilityMode `json:"availabilityMode,omitempty" yaml:"availabilityMode,omitempty"` // NodeSelector is a selector which must be true for the disk to fit on a node. Selector which must match a node’s labels for the disk to be provisioned on that node. //+kubebuilder:validation:Optional NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"` // PodSelector is a selector which must be true for the pod to attach disk. //+kubebuilder:validation:Required PodSelector map[string]string `json:"podSelector" yaml:"podSelector"` // Policy contains the disk scale policies. Policy Policy `json:"policy,omitempty" yaml:"policy,omitempty"` }
DiskConfigSpec defines the desired state of DiskConfig
func (*DiskConfigSpec) DeepCopy ¶
func (in *DiskConfigSpec) DeepCopy() *DiskConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskConfigSpec.
func (*DiskConfigSpec) DeepCopyInto ¶
func (in *DiskConfigSpec) DeepCopyInto(out *DiskConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiskConfigStatus ¶
type DiskConfigStatus struct { // Conditions is a list of status of all the disks. Conditions []metav1.Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` }
DiskConfigStatus defines the observed state of DiskConfig
func (*DiskConfigStatus) DeepCopy ¶
func (in *DiskConfigStatus) DeepCopy() *DiskConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskConfigStatus.
func (*DiskConfigStatus) DeepCopyInto ¶
func (in *DiskConfigStatus) DeepCopyInto(out *DiskConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Policy ¶
type Policy struct { // UpscaleTriggerPercentage defines the disk fullness percentage for disk expansion. //+kubebuilder:default:=80 //+kubebuilder:validation:Minimum:=50 //+kubebuilder:validation:Maximum:=100 //+kubebuilder:validation:Optional UpscaleTriggerPercentage uint8 `json:"upscaleTriggerPercentage,omitempty" yaml:"upscaleTriggerPercentage,omitempty"` // MaximumCapacityOfDisks defines maximum capacity of a disk. //+kubebuilder:default:="1000Gi" //+kubebuilder:validation:Optional MaximumCapacityOfDisk resource.Quantity `json:"maximumCapacityOfDisk,omitempty" yaml:"maximumCapacityOfDisk,omitempty"` // MaximumCapacityOfDisks defines maximum number of a disks. //+kubebuilder:default:=1 //+kubebuilder:validation:Minimum:=1 //+kubebuilder:validation:Maximum:=150 //+kubebuilder:validation:Optional MaximumNumberOfDisks uint8 `json:"maximumNumberOfDisks,omitempty" yaml:"maximumNumberOfDisks,omitempty"` // ExtendCapacity represents the capacity to extend with. //+kubebuilder:default:="1Gi" //+kubebuilder:validation:Optional ExtendCapacity resource.Quantity `json:"extendCapacity,omitempty" yaml:"extendCapacity,omitempty"` // CoolDown defines temporary pause of scaling. Minimum: 10s //+kubebuilder:default:="5m" //+kubebuilder:validation:Optional CoolDown metav1.Duration `json:"coolDown,omitempty" yaml:"coolDown,omitempty"` // Pause disables autoscaling of disks. //+kubebuilder:default:=false //+kubebuilder:validation:Optional Pause bool `json:"pause,omitempty" yaml:"pause,omitempty"` }
Policy defines disk resize policies.
func (*Policy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (*Policy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.