Documentation ¶
Overview ¶
v2 版本的api包
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: networking.GroupName, Version: "v1beta1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type CceENI ¶
type CceENI struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ENISpec `json:"spec,omitempty"` Status ENIStatus `json:"status,omitempty"` }
func (*CceENI) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CceENI.
func (*CceENI) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CceENI) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CceENIList ¶
type CceENIList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []CceENI `json:"items"` }
func (*CceENIList) DeepCopy ¶
func (in *CceENIList) DeepCopy() *CceENIList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CceENIList.
func (*CceENIList) DeepCopyInto ¶
func (in *CceENIList) DeepCopyInto(out *CceENIList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CceENIList) DeepCopyObject ¶
func (in *CceENIList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CceENIStatus ¶
type CceENIStatus string
const ( CceENIStatusPending CceENIStatus = "Pending" CceENIStatusCreated CceENIStatus = "Created" CceENIStatusReadyInVPC CceENIStatus = "ReadyInVPC" CceENIStatusReadyOnNode CceENIStatus = "ReadyOnNode" CceENIStatusUsingInPod CceENIStatus = "UsingInPod" CceENIStatusDeletedInVPC CceENIStatus = "DeletedInVPC" )
cce 中 ENI 状态: * Pending: 创建 crd 之后的初始状态 * Created: 向 VPC 发起创建 ENI 请求成功之后 * ReadyInVPC: attach 成功,VPC 中进入 inuse 状态 * ReadyOnNode: ReadyInVPC 之后单机对 ENI check ok * UsingInPod: ENI 被 pod 独占使用中 * DeletedInVPC: ENI 被从 VPC 中强删后的最终状态 * * 独占 ENI 状态机流转: * * 创建请求成功(ipam写) attach后进入inuse状态(ipam写) * Pending ----------------------> Created ---------------------------> ReadyInVPC * ^ | * VPC中强制detach后(ipam写) | |单机check ok(agent写) * | | * --------------------------------- | * | | | * VPC中强删后(ipam写) | pod创建后(agent写) | v * DeletedInVPC <--------------------- UsingInPod <-------------------- ReadyOnNode -- * | | ^ | * | | | | * | | pod删除后(agent写) | | * | ---------------------------------- | * | | * -------------------------------------------------------
type ENI ¶
type ENI struct { ENIID string `json:"eniID"` Name string `json:"name,omitempty"` ZoneName string `json:"zoneName"` Description string `json:"description,omitempty"` InstanceID string `json:"instanceID,omitempty"` MacAddress string `json:"macAddress"` VPCID string `json:"vpcID"` SubnetID string `json:"subnetID"` // no use, just to keep up with iaas Status string `json:"status,omitempty"` PrivateIPSet []PrivateIP `json:"privateIPSet,omitempty"` SecurityGroupIds []string `json:"securityGroupIds,omitempty"` EnterpriseSecurityGroupIds []string `json:"enterpriseSecurityGroupIds,omitempty"` CreatedTime metav1.Time `json:"createdTime"` }
和 VPC ENI spec 定义保持一致 https://github.com/baidubce/bce-sdk-go/blob/master/services/eni/model.go#L61
func (*ENI) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENI.
func (*ENI) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ENISpec ¶
type ENISpec struct { ENI ENI `json:"eni,omitempty"` // ENI 要绑定的节点 id InstanceID string `json:"instanceID,omitempty"` }
func (*ENISpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENISpec.
func (*ENISpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ENIStatus ¶
type ENIStatus struct { StatusInfo StatusInfo `json:"statusInfo,omitempty"` NodeName string `json:"nodeName,omitempty"` PodInfo PodInfo `json:"podInfo,omitempty"` }
func (*ENIStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENIStatus.
func (*ENIStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodInfo ¶
type PodInfo struct { PodNs string `json:"podNs"` PodName string `json:"podName"` ContainerID string `json:"containerID"` NetNs string `json:"netNs"` }
func (*PodInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodInfo.
func (*PodInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrivateIP ¶
type PrivateIP struct { PublicIPAddress string `json:"publicIPAddress,omitempty"` Primary bool `json:"primary"` PrivateIPAddress string `json:"privateIPAddress"` }
func (*PrivateIP) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateIP.
func (*PrivateIP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusInfo ¶
type StatusInfo struct { CurrentStatus CceENIStatus `json:"currentStatus"` LastStatus CceENIStatus `json:"lastStatus,omitempty"` VPCStatus VPCENIStatus `json:"vpcStatus,omitempty"` UpdateTime metav1.Time `json:"updateTime,omitempty"` }
func (*StatusInfo) DeepCopy ¶
func (in *StatusInfo) DeepCopy() *StatusInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusInfo.
func (*StatusInfo) DeepCopyInto ¶
func (in *StatusInfo) DeepCopyInto(out *StatusInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VPCENIStatus ¶
type VPCENIStatus string
const ( VPCENIStatusAvailable VPCENIStatus = "available" VPCENIStatusAttaching VPCENIStatus = "attaching" VPCENIStatusInuse VPCENIStatus = "inuse" VPCENIStatusDetaching VPCENIStatus = "detaching" )
vpc 中 ENI 共 4 种状态(https://cloud.baidu.com/doc/VPC/s/6kknfn5m8): * available:创建完成,未挂载 * attaching:挂载中 * inuse: 已挂载到单机,vpc 认为的可用状态 * detaching:卸载中