Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the infra v1 API group +kubebuilder:object:generate=true +groupName=infra.sealos.io
Index ¶
Constants ¶
const (
InfraResourcePricePrefix = "sealos-infra-controller"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "infra.sealos.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 )
var DefaultInfraResourceGVK = []meteringcommonv1.GroupVersionKind{{
Group: "infra.sealos.io",
Version: "v1",
Kind: "infra",
},
}
Functions ¶
This section is empty.
Types ¶
type DeviceDisks ¶
type DeviceDisks []Disk
func (DeviceDisks) DeepCopy ¶
func (in DeviceDisks) DeepCopy() DeviceDisks
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceDisks.
func (DeviceDisks) DeepCopyInto ¶
func (in DeviceDisks) DeepCopyInto(out *DeviceDisks)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (DeviceDisks) Len ¶
func (disks DeviceDisks) Len() int
func (DeviceDisks) Less ¶
func (disks DeviceDisks) Less(i, j int) bool
func (DeviceDisks) Swap ¶
func (disks DeviceDisks) Swap(i, j int)
type Disk ¶
type Disk struct { Capacity int `json:"capacity,omitempty"` // ENUM: standard/io1/io2/gp2/gp3/sc1/st1 // +kubebuilder:validation:Enum=standard;io1;io2;gp2;gp3;sc1;st1;cloud_efficiency;cloud_ssd;cloud_essd;cloud_auto;cloud VolumeType string `json:"volumeType,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Enum=root;data // +kubebuilder:default:=data // Disk Type , default is data disk. allowed value is `root|data` Type string `json:"type,omitempty"` Device string `json:"device,omitempty"` ID []string `json:"id,omitempty"` }
func (*Disk) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Disk.
func (*Disk) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Hosts ¶
type Hosts struct { // +kubebuilder:validation:Required Roles []string `json:"roles,omitempty"` // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum:=0 Count int `json:"count,omitempty"` // key values resources. // cpu: 2 // memory: 4 // other resources like GPU Resources map[string]resource.Quantity `json:"resources,omitempty"` // ecs.t5-lc1m2.large Flavor string `json:"flavor,omitempty"` // ENUM: amd64/arm64 (NOTE: the default value is amd64) // +kubebuilder:default:=amd64 // +kubebuilder:validation:Enum=amd64;arm64 Arch string `json:"arch,omitempty"` // ENUM: ubuntu:20.04, centos:7.2 and so on. Image string `json:"image,omitempty"` // max support 10 disks . // +kubebuilder:validation:MaxItems:=10 // +kubebuilder:validation:Optional Disks []Disk `json:"disks,omitempty"` Metadata []Metadata `json:"metadata,omitempty"` // Find the mapping between expected hosts and actual hosts Index int `json:"index,omitempty"` }
func (*Hosts) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hosts.
func (*Hosts) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPAddress ¶
type IPAddress struct { IPType string `json:"ipType,omitempty"` IPValue string `json:"ipValue,omitempty"` }
func (*IPAddress) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddress.
func (*IPAddress) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IndexHosts ¶
type IndexHosts []Hosts
func (IndexHosts) DeepCopy ¶
func (in IndexHosts) DeepCopy() IndexHosts
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndexHosts.
func (IndexHosts) DeepCopyInto ¶
func (in IndexHosts) DeepCopyInto(out *IndexHosts)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (IndexHosts) Len ¶
func (hosts IndexHosts) Len() int
func (IndexHosts) Less ¶
func (hosts IndexHosts) Less(i, j int) bool
func (IndexHosts) Swap ¶
func (hosts IndexHosts) Swap(i, j int)
type Infra ¶
type Infra struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InfraSpec `json:"spec,omitempty"` Status InfraStatus `json:"status,omitempty"` }
Infra is the Schema for the infras API
func (*Infra) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Infra.
func (*Infra) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Infra) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Infra) GetInstancesAndVolumesTag ¶
func (*Infra) QueryPrice ¶
QueryPrice query infra price/hour, unit: CNY cents/hour may be error is not nil,but the price should calculate
type InfraList ¶
type InfraList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Infra `json:"items"` }
InfraList contains a list of Infra
func (*InfraList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfraList.
func (*InfraList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InfraList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InfraResource ¶
type InfraResource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InfraResourceSpec `json:"spec,omitempty"` Status InfraResourceStatus `json:"status,omitempty"` }
InfraResource is the Schema for the Infraresources API
func (*InfraResource) DeepCopy ¶
func (in *InfraResource) DeepCopy() *InfraResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfraResource.
func (*InfraResource) DeepCopyInto ¶
func (in *InfraResource) DeepCopyInto(out *InfraResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InfraResource) DeepCopyObject ¶
func (in *InfraResource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InfraResourceList ¶
type InfraResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []InfraResource `json:"items"` }
InfraResourceList contains a list of InfraResource
func (*InfraResourceList) DeepCopy ¶
func (in *InfraResourceList) DeepCopy() *InfraResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfraResourceList.
func (*InfraResourceList) DeepCopyInto ¶
func (in *InfraResourceList) DeepCopyInto(out *InfraResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InfraResourceList) DeepCopyObject ¶
func (in *InfraResourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InfraResourceSpec ¶
type InfraResourceSpec struct { ResourceName string `json:"resourceName,omitempty"` Resources map[v1.ResourceName]meteringcommonv1.ResourcePrice `json:"resources,omitempty"` // update used resources every Interval minutes //+kubebuilder:validation:Minimum=1 Interval int `json:"interval,omitempty"` }
InfraResourceSpec defines the desired state of InfraResource
func (*InfraResourceSpec) DeepCopy ¶
func (in *InfraResourceSpec) DeepCopy() *InfraResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfraResourceSpec.
func (*InfraResourceSpec) DeepCopyInto ¶
func (in *InfraResourceSpec) DeepCopyInto(out *InfraResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InfraResourceStatus ¶
type InfraResourceStatus struct { LatestUpdateTime int64 `json:"latestUpdateTime,omitempty"` SeqID int64 `json:"seqID,omitempty"` }
InfraResourceStatus defines the observed state of InfraResource
func (*InfraResourceStatus) DeepCopy ¶
func (in *InfraResourceStatus) DeepCopy() *InfraResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfraResourceStatus.
func (*InfraResourceStatus) DeepCopyInto ¶
func (in *InfraResourceStatus) DeepCopyInto(out *InfraResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InfraSpec ¶
type InfraSpec struct { // ENUM: aws/aliyun // +kubebuilder:validation:Enum=aws;aliyun // +kubebuilder:default:=aws Platform string `json:"platform,omitempty"` // RegionIDs is cloud provider regionID list RegionIDs []string `json:"regionIDs,omitempty"` ZoneIDs []string `json:"zoneIDs,omitempty"` SSH v1bata1.SSH `json:"ssh,omitempty"` // +kubebuilder:validation:Required Hosts []Hosts `json:"hosts,omitempty"` // Availability Zone AvailabilityZone string `json:"availabilityZone,omitempty"` }
InfraSpec defines the desired state of Infra
func (*InfraSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfraSpec.
func (*InfraSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InfraStatus ¶
type InfraStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file Status string `json:"status,omitempty"` }
InfraStatus defines the observed state of Infra
func (*InfraStatus) DeepCopy ¶
func (in *InfraStatus) DeepCopy() *InfraStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfraStatus.
func (*InfraStatus) DeepCopyInto ¶
func (in *InfraStatus) DeepCopyInto(out *InfraStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Metadata ¶
type Metadata struct { // 0 private , 1 public IP []IPAddress `json:"ipaddress,omitempty"` ID string `json:"id,omitempty"` DiskID []string `json:"diskId,omitempty"` Status string `json:"status,omitempty"` Labels map[string]string `json:"labels,omitempty"` }
func (*Metadata) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.
func (*Metadata) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.