Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the elastic v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=elastic.db.alcor.io
Package v1alpha1 contains API Schema definitions for the elastic v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=elastic.db.alcor.io
Index ¶
- Constants
- Variables
- func Contains(list []string, s string) bool
- func FullName(prefix string, shortname string) (name string)
- func GetAllocatedValue(namespace, name string) string
- func GetIPIndex(ip string) uint32
- func GetVgAllocatableLabel(name string) string
- func GetVgCapacityLabel(name string) string
- func NsUnit(unit *VolumePath) string
- func Ready(namespace, name, ip string, allocatedIPs map[uint32]string) bool
- func Remove(list []string, s string) []string
- func Resource(resource string) schema.GroupResource
- type NetworkType
- type NetworkingRequest
- type OwnReference
- type PVCRequest
- type Phase
- type Storage
- type Unit
- type UnitList
- type UnitSpec
- type UnitStatus
- type VolumePath
- type VolumePathList
- type VolumePathSpec
- type VolumePathStatus
- type VpStatus
Constants ¶
const ( StatusReady = "Ready" StatusNotReady = "NotReady" ClaimBound = "Bound" VpFinalizer = "finalizer.volumepath.alcor.io" NodeLocalVolumeAnnocation = "vg.localvolume.cability" VGsAnnotation = "alcor.host.vgs" VpBinding VpStatus = "binding" VpEmtpy VpStatus = "" VpDeleted VpStatus = "deleted" VpCreateing VpStatus = "creating" VpCreateFail VpStatus = "createfailed" VpExtending VpStatus = "vgExtending" VpExtendFail VpStatus = "VpExtendFailed" VpDeactivated VpStatus = "deactivated" VpDeactivating VpStatus = "deactivating" VpDeactivatFail VpStatus = "deactivaefailed" VpActivating VpStatus = "activating" VpActivatFail VpStatus = "activatefailed" VpRemoving VpStatus = "removing" VpRemovFail VpStatus = "removfailed" //删除 DeleteCode int64 = 943 //重置statu状态为binding且重新设置ResetStatusCode为0 //作用: 创建,扩展,activate/deactivate 失败后设置该值可触发重做 ResetStatusCode int64 = 111 //原目标主机清理 CleanCode int64 = 222 //强制把status同步为spec,且status为binding, //作用:异常情况下,人工介入解决。 CopySpecToStatusCode int64 = 609 )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "elastic.db.alcor.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
var DefaultVolumePathNameSpace = "default"
Functions ¶
func GetAllocatedValue ¶
func GetIPIndex ¶
func GetVgAllocatableLabel ¶
func GetVgCapacityLabel ¶
func NsUnit ¶
func NsUnit(unit *VolumePath) string
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type NetworkType ¶
type NetworkType string
type NetworkingRequest ¶
type NetworkingRequest struct { Name string `json:"name"` Bandwidth int32 `json:"bandwidth"` Network string `json:"network"` Type NetworkType `json:"type"` // default NetworkInternal }
func (*NetworkingRequest) DeepCopy ¶
func (in *NetworkingRequest) DeepCopy() *NetworkingRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkingRequest.
func (*NetworkingRequest) DeepCopyInto ¶
func (in *NetworkingRequest) DeepCopyInto(out *NetworkingRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OwnReference ¶
type OwnReference struct { Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` Status string `json:"status,omitempty"` }
func (*OwnReference) DeepCopy ¶
func (in *OwnReference) DeepCopy() *OwnReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnReference.
func (*OwnReference) DeepCopyInto ¶
func (in *OwnReference) DeepCopyInto(out *OwnReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PVCRequest ¶
type PVCRequest struct { Name string `json:"name"` VolumeName string `json:"volumeName"` StorageClassName string `json:"storageClassName"` // volumepath Storage Storage `json:"storage"` FsType string `json:"fsType"` AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes"` }
func (*PVCRequest) DeepCopy ¶
func (in *PVCRequest) DeepCopy() *PVCRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PVCRequest.
func (*PVCRequest) DeepCopyInto ¶
func (in *PVCRequest) DeepCopyInto(out *PVCRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Storage ¶
type Storage struct { Level string `json:"level"` // high / normal / low Request resource.Quantity `json:"request"` }
func (*Storage) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.
func (*Storage) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Unit ¶
type Unit struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec UnitSpec `json:"spec,omitempty"` Status UnitStatus `json:"status,omitempty"` }
Unit is the Schema for the units API +kubebuilder:subresource:status +kubebuilder:resource:path=units,scope=Namespaced
func (*Unit) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Unit.
func (*Unit) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Unit) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UnitList ¶
type UnitList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Unit `json:"items"` }
UnitList contains a list of Unit
func (*UnitList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitList.
func (*UnitList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UnitList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UnitSpec ¶
type UnitSpec struct { // selector is a label query over pods that should match the replica count. // It must match the pod template's labels. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` Replicas int `json:"replicas"` UpdatePod bool `json:"updatepod"` NodeName string `json:"nodename"` PodTemplate corev1.PodTemplateSpec `json:"podtemplate"` Network *NetworkingRequest `json:"networking,omitempty"` VolumeClaims []PVCRequest `json:"claims,omitempty"` }
UnitSpec defines the desired state of Unit
func (*UnitSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitSpec.
func (*UnitSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnitStatus ¶
type UnitStatus struct { Phase Phase `json:"phase"` // PodRef OwnReference `json:"podRef,omitempty"` IPClaimRef OwnReference `json:"ipRef,omitempty"` VolumePathRefs []OwnReference `json:"vpRefs,omitempty"` PVCRefs []OwnReference `json:"pvcRefs,omitempty"` PVRefs []OwnReference `json:"pvRefs,omitempty"` }
UnitStatus defines the observed state of Unit
func (*UnitStatus) DeepCopy ¶
func (in *UnitStatus) DeepCopy() *UnitStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitStatus.
func (*UnitStatus) DeepCopyInto ¶
func (in *UnitStatus) DeepCopyInto(out *UnitStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumePath ¶
type VolumePath struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VolumePathSpec `json:"spec,omitempty"` Status VolumePathStatus `json:"status,omitempty"` }
VolumePath is the Schema for the volumepaths API +kubebuilder:subresource:status +kubebuilder:resource:path=volumepaths,scope=Namespaced,shortName=vp
func (*VolumePath) DeepCopy ¶
func (in *VolumePath) DeepCopy() *VolumePath
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumePath.
func (*VolumePath) DeepCopyInto ¶
func (in *VolumePath) DeepCopyInto(out *VolumePath)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumePath) DeepCopyObject ¶
func (in *VolumePath) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VolumePathList ¶
type VolumePathList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []VolumePath `json:"items"` }
VolumePathList contains a list of VolumePath
func (*VolumePathList) DeepCopy ¶
func (in *VolumePathList) DeepCopy() *VolumePathList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumePathList.
func (*VolumePathList) DeepCopyInto ¶
func (in *VolumePathList) DeepCopyInto(out *VolumePathList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumePathList) DeepCopyObject ¶
func (in *VolumePathList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VolumePathSpec ¶
type VolumePathSpec struct { //本地:local, 远端存储:remote Type string `json:"type"` Size int64 `json:"size_MB"` FsType string `json:"fs_type"` VgName string `json:"vgName"` Node string `json:"node"` Vendor string `json:"vendor"` ActCode int64 `json:"actCode,omitempty"` //强制迁移开关 ForceMigarete bool `json:"forcemigrate"` }
VolumePathSpec defines the desired state of VolumePath
func (*VolumePathSpec) DeepCopy ¶
func (in *VolumePathSpec) DeepCopy() *VolumePathSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumePathSpec.
func (*VolumePathSpec) DeepCopyInto ¶
func (in *VolumePathSpec) DeepCopyInto(out *VolumePathSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumePathStatus ¶
type VolumePathStatus struct { Status VpStatus `json:"status"` CurSize int64 `json:"curSize_MB"` BindingNode string `json:"bindingNode"` Deivce string `json:"device"` MouterPath string `json:"mouter"` }
VolumePathStatus defines the observed state of VolumePath
func (*VolumePathStatus) DeepCopy ¶
func (in *VolumePathStatus) DeepCopy() *VolumePathStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumePathStatus.
func (*VolumePathStatus) DeepCopyInto ¶
func (in *VolumePathStatus) DeepCopyInto(out *VolumePathStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.