Documentation
¶
Overview ¶
- Copyright (c) 2023 Baidu, Inc. All Rights Reserved. *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific language governing permissions
- and limitations under the License. *
Package v2 is the v2 version of the API. +groupName=cce.baidubce.com
Index ¶
- Constants
- Variables
- func FiltePrimaryAddress(IPs []*models.PrivateIP) []*models.PrivateIP
- func GetPrimaryIPs(ips []*models.PrivateIP) *models.PrivateIP
- func Resource(resource string) schema.GroupResource
- type AddressPair
- type AddressPairList
- type BindwidthMode
- type BindwidthOption
- type CCEENIStatus
- type CCEEndpoint
- type CCEEndpointList
- type CodeError
- type CodeErrorList
- type ControllerList
- type ControllerStatus
- type ControllerStatusStatus
- type CustomAllocation
- type CustomAllocationList
- type CustomIPRange
- type DirectIPAllocation
- type ENI
- type ENIList
- type ENISpec
- type ENIStatus
- type ENIStatusChange
- type ENIType
- type ENIUseMode
- type EgressDSCP
- type EgressPriority
- type EgressPriorityOpt
- type EncryptionSpec
- type EndpointNetworkSpec
- type EndpointNetworking
- type EndpointSpec
- type EndpointStatus
- type ExtFeatureStatus
- type HealthAddressingSpec
- type IPAllocType
- type IPAllocation
- type IPAllocationStrategy
- type IPFamily
- type NetResourceSet
- func (in *NetResourceSet) DeepCopy() *NetResourceSet
- func (in *NetResourceSet) DeepCopyInto(out *NetResourceSet)
- func (in *NetResourceSet) DeepCopyObject() runtime.Object
- func (n *NetResourceSet) GetEffectiveInstanceID(HPASStanderd bool) (string, error)
- func (n *NetResourceSet) InstanceID() (instanceID string)
- func (n *NetResourceSet) SpeculationNoMoreIPReson(crossSubnet bool) error
- type NetResourceSetList
- type NetResourceSpec
- type NetResourceStatus
- type NodeAddress
- type ObjectReference
- type PodSubnetTopologySpread
- type PodSubnetTopologySpreadList
- type PodSubnetTopologySpreadSpec
- type PodSubnetTopologySpreadStatus
- type ReleaseStrategy
- type SimpleENIStatus
- type StatusChange
- type SubenetDetail
- type SubnetPodStatus
- type UnsatisfiableConstraintAction
- type VPCENIStatus
Constants ¶
const ( BindwidthModeEDT = "edt" BindwidthModeTC = "tc" BindwidthModeNone = "" )
const ( // errors for eni ErrorCodeENIIPCapacityExceed = "ENIIPCapacityExceed" ErrorCodeENISubnetNoMoreIP = "SubnetNoMoreIP" ErrorCodeWaitNewENIInuse = "WaitCreateMoreENI" ErrorCodeENICapacityExceed = "ENICapacityExceed" ErrorCodeIPPoolExhausted = "IPPoolExhausted" ErrorCodeNoMoreIP = "NoMoreIP" ErrorCodeNoAvailableSubnet = "NoAvailableSubnet" ErrorCodeNoAvailableSubnetCreateENI = "NoAvailableSubnetToBorrowIP" // errors for open api ErrorCodeOpenAPIError = "OpenAPIError" ErrorCodeSuccess = "Success" )
const ( IPv4Family IPFamily = "4" IPv6Family IPFamily = "6" NetResourceSetEventHandlerTypeEth = "ethernet" NetResourceSetEventHandlerTypeRDMA = "rdma" )
const ( // StatusOK represents the ok status StatusOK = "ok" // StatusFailed represents the failed status StatusFailed = "failed" )
const ( // CustomResourceDefinitionGroup is the name of the third party resource group CustomResourceDefinitionGroup = k8sconst.CustomResourceDefinitionGroup // CustomResourceDefinitionVersion is the current version of the resource CustomResourceDefinitionVersion = "v2" // CustomResourceDefinitionSchemaVersion is semver-conformant version of CRD schema // Used to determine if CRD needs to be updated in cluster // // Maintainers: Run ./Documentation/check-crd-compat-table.sh for each release // Developers: Bump patch for each change in the CRD schema. CustomResourceDefinitionSchemaVersion = "1.25.4" // CustomResourceDefinitionSchemaVersionKey is key to label which holds the CRD schema version CustomResourceDefinitionSchemaVersionKey = "cce.baidubce.com.k8s.crd.schema.version" // CESingularName is the singular name of CCE Endpoint CEPSingularName = "cceendpoint" // CEPluralName is the plural name of CCE Endpoint CEPPluralName = "cceendpoints" // CEKindDefinition is the kind name for CCE Endpoint CEPKindDefinition = "CCEEndpoint" // CEPName is the full name of CCE Endpoint CEPName = CEPPluralName + "." + CustomResourceDefinitionGroup // NRSSingularName is the singular name of CCE Node NRSSingularName = "netresourceset" // NRSPluralName is the plural name of CCE Node NRSPluralName = "netresourcesets" // NRSKindDefinition is the kind name for CCE Node NRSKindDefinition = "NetResourceSet" // NRSName is the full name of CCE Node NRSName = NRSPluralName + "." + CustomResourceDefinitionGroup // ENISingularName is the singular name of ENI ENISingularName = "eni" // CNPluralName is the plural name of CCE Node ENIPluralName = "enis" // ENIKindDefinition is the kind name for CCE Node ENIKindDefinition = "ENI" // ENIName is the full name of CCE Node ENIName = ENIPluralName + "." + CustomResourceDefinitionGroup PSTSName = "podsubnettopologyspreads" + "." + CustomResourceDefinitionGroup )
const ( // DefaultPodIPTTLSeconds If the fixed IP is stuck for a long time when the pod fails, IP recycling will be triggered DefaultPodIPTTLSeconds int64 = 7 * 24 * 3600 )
ReleaseStrategy
Variables ¶
var ( EgressPriorityGuaranteed EgressPriority = 1 EgressPriorityBestEffort EgressPriority = 2 EgressPriorityBurstable EgressPriority = 3 EgressDSCPGuaranteed EgressDSCP = 17 EgressDSCPBurstable EgressDSCP = 1 EgressDSCPBestEffort EgressDSCP = 9 )
var ( // SchemeBuilder is needed by DeepCopy generator. SchemeBuilder runtime.SchemeBuilder // AddToScheme adds all types of this clientset into the given scheme. // This allows composition of clientsets, like in: // // import ( // "k8s.io/client-go/kubernetes" // clientsetscheme "k8s.io/client-go/kubernetes/scheme" // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" // ) // // kclientset, _ := kubernetes.NewForConfig(c) // aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) AddToScheme = localSchemeBuilder.AddToScheme )
var ( // DefaultReuseIPTTL default timeout for reusing IP addresses. // If this time is not set, the default value is 7 days DefaultReuseIPTTL = &metav1.Duration{Duration: time.Hour * 24 * 7} )
var SchemeGroupVersion = schema.GroupVersion{ Group: CustomResourceDefinitionGroup, Version: CustomResourceDefinitionVersion, }
SchemeGroupVersion is group version used to register these objects
Functions ¶
func GetPrimaryIPs ¶
GetPrimaryIP get the primary IP of ENI from the IP list
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AddressPair ¶
type AddressPair struct {
// Family is the kind of address. E.g. "4" or "6".
Family IPFamily `json:"family"`
IP string `json:"ip,omitempty"`
Interface string `json:"interface,omitempty"`
VPCID string `json:"vpcID,omitempty"`
Subnet string `json:"subnet,omitempty"`
// CIDRs is a list of all CIDRs to which the IP has direct access to.
// This is primarily useful if the IP has been allocated out of a VPC
// subnet range and the VPC provides routing to a set of CIDRs in which
// the IP is routable.
CIDRs []string `json:"cidr,omitempty"`
Gateway string `json:"gateway,omitempty"`
}
AddressPair is is a par of IPv4 and/or IPv6 address.
func (*AddressPair) DeepCopy ¶
func (in *AddressPair) DeepCopy() *AddressPair
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressPair.
func (*AddressPair) DeepCopyInto ¶
func (in *AddressPair) DeepCopyInto(out *AddressPair)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AddressPairList ¶
type AddressPairList []*AddressPair
AddressPairList is a list of address pairs.
func (AddressPairList) DeepCopy ¶
func (in AddressPairList) DeepCopy() AddressPairList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressPairList.
func (AddressPairList) DeepCopyInto ¶
func (in AddressPairList) DeepCopyInto(out *AddressPairList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (AddressPairList) ToIPsString ¶
func (list AddressPairList) ToIPsString() string
type BindwidthMode ¶
type BindwidthMode string
type BindwidthOption ¶
type BindwidthOption struct {
Mode BindwidthMode `json:"mode,omitempty"`
Ingress int64 `json:"ingress,omitempty"`
Egress int64 `json:"egress,omitempty"`
}
BindwidthOption is the option of bindwidth
func (*BindwidthOption) DeepCopy ¶
func (in *BindwidthOption) DeepCopy() *BindwidthOption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindwidthOption.
func (*BindwidthOption) DeepCopyInto ¶
func (in *BindwidthOption) DeepCopyInto(out *BindwidthOption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BindwidthOption) IsValid ¶
func (opt *BindwidthOption) IsValid() bool
type CCEENIStatus ¶
type CCEENIStatus string
const ( ENIStatusNone CCEENIStatus = "" ENIStatusPending CCEENIStatus = "Pending" ENIStatusReadyOnNode CCEENIStatus = "ReadyOnNode" ENIStatusErrorOnNode CCEENIStatus = "ErrorOnNode" ENIStatusUsingInPod CCEENIStatus = "UsingInPod" ENIMSGMissingInumber CCEENIStatus = "MissingInumberOnNode" ENIMSGMissingMac CCEENIStatus = "MissingMacOnNode" ENIMSGPCIERROR CCEENIStatus = "PCIError" ENIMSGReNameFailed CCEENIStatus = "ReNameFailed" ENIMSGInstallRuleFailed CCEENIStatus = "InstallRuleFailed" ENIMSGInstallNeighborFailed CCEENIStatus = "InstallNeighborFailed" ENIMSGNoMacAddress CCEENIStatus = "NoMacAddress" )
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写) | | * | ---------------------------------- | * | | * -------------------------------------------------------
func (CCEENIStatus) IsReadyOnNode ¶
func (s CCEENIStatus) IsReadyOnNode() bool
type CCEEndpoint ¶
type CCEEndpoint struct {
// +deepequal-gen=false
metav1.TypeMeta `json:",inline"`
// +deepequal-gen=false
metav1.ObjectMeta `json:"metadata"`
Spec EndpointSpec `json:"spec"`
// +kubebuilder:validation:Optional
Status EndpointStatus `json:"status"`
}
CCEEndpoint is the status of pod
func (*CCEEndpoint) AsObjectReference ¶
func (ep *CCEEndpoint) AsObjectReference() *ObjectReference
func (*CCEEndpoint) DeepCopy ¶
func (in *CCEEndpoint) DeepCopy() *CCEEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CCEEndpoint.
func (*CCEEndpoint) DeepCopyInto ¶
func (in *CCEEndpoint) DeepCopyInto(out *CCEEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CCEEndpoint) DeepCopyObject ¶
func (in *CCEEndpoint) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CCEEndpointList ¶
type CCEEndpointList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items is a list of CCEEndpoint
Items []CCEEndpoint `json:"items"`
}
CCEEndpointList is a list of CCEEndpoint objects.
func (*CCEEndpointList) DeepCopy ¶
func (in *CCEEndpointList) DeepCopy() *CCEEndpointList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CCEEndpointList.
func (*CCEEndpointList) DeepCopyInto ¶
func (in *CCEEndpointList) DeepCopyInto(out *CCEEndpointList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CCEEndpointList) DeepCopyObject ¶
func (in *CCEEndpointList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CodeError ¶
func NewCodeError ¶
func (*CodeError) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodeError.
func (*CodeError) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodeErrorList ¶
type CodeErrorList []*CodeError
ErrorList holds a set of Errors. It is plausible that we might one day have non-field errors in this same umbrella package, but for now we don't, so we can keep it simple and leave ErrorList here.
func (CodeErrorList) DeepCopy ¶
func (in CodeErrorList) DeepCopy() CodeErrorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodeErrorList.
func (CodeErrorList) DeepCopyInto ¶
func (in CodeErrorList) DeepCopyInto(out *CodeErrorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CodeErrorList) Filter ¶
func (list CodeErrorList) Filter(fns ...utilerrors.Matcher) CodeErrorList
Filter removes items from the ErrorList that match the provided fns.
func (CodeErrorList) ToAggregate ¶
func (list CodeErrorList) ToAggregate() utilerrors.Aggregate
ToAggregate converts the ErrorList into an errors.Aggregate.
type ControllerList ¶
type ControllerList []ControllerStatus
ControllerList is a list of ControllerStatus.
func (ControllerList) DeepCopy ¶
func (in ControllerList) DeepCopy() ControllerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerList.
func (ControllerList) DeepCopyInto ¶
func (in ControllerList) DeepCopyInto(out *ControllerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ControllerList) Sort ¶
func (c ControllerList) Sort()
Sort sorts the ControllerList by controller name
type ControllerStatus ¶
type ControllerStatus struct {
// Name is the name of the controller
Name string `json:"name,omitempty"`
// Configuration is the controller configuration
Configuration *models.ControllerStatusConfiguration `json:"configuration,omitempty"`
// Status is the status of the controller
Status ControllerStatusStatus `json:"status,omitempty"`
// UUID is the UUID of the controller
UUID string `json:"uuid,omitempty"`
}
ControllerStatus is the status of a failing controller.
func (*ControllerStatus) DeepCopy ¶
func (in *ControllerStatus) DeepCopy() *ControllerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerStatus.
func (*ControllerStatus) DeepCopyInto ¶
func (in *ControllerStatus) DeepCopyInto(out *ControllerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerStatusStatus ¶
type ControllerStatusStatus struct {
ConsecutiveFailureCount int64 `json:"consecutive-failure-count,omitempty"`
FailureCount int64 `json:"failure-count,omitempty"`
LastFailureMsg string `json:"last-failure-msg,omitempty"`
LastFailureTimestamp string `json:"last-failure-timestamp,omitempty"`
LastSuccessTimestamp string `json:"last-success-timestamp,omitempty"`
SuccessCount int64 `json:"success-count,omitempty"`
}
ControllerStatusStatus is the detailed status section of a controller.
func (*ControllerStatusStatus) DeepCopy ¶
func (in *ControllerStatusStatus) DeepCopy() *ControllerStatusStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerStatusStatus.
func (*ControllerStatusStatus) DeepCopyInto ¶
func (in *ControllerStatusStatus) DeepCopyInto(out *ControllerStatusStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomAllocation ¶
type CustomAllocation struct {
// +kubebuilder:default:=4
// Family of IP Address. 4 or 6
Family IPFamily `json:"family,omitempty"`
// Range User defined IP address range. Note that this range must be smaller than the subnet range
// Note that the definitions of multiple ranges cannot be duplicate
Range []CustomIPRange `json:"range,omitempty"`
// CIDRs User defined CIDR blocks. Note that these CIDRs must be within the subnet range
// Note that CIDRs cannot overlap with Range definitions
CIDRs []string `json:"cidrs,omitempty"`
}
CustomAllocation User defined IP address management policy
func (*CustomAllocation) DeepCopy ¶
func (in *CustomAllocation) DeepCopy() *CustomAllocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomAllocation.
func (*CustomAllocation) DeepCopyInto ¶
func (in *CustomAllocation) DeepCopyInto(out *CustomAllocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomAllocationList ¶
type CustomAllocationList []CustomAllocation
func (CustomAllocationList) DeepCopy ¶
func (in CustomAllocationList) DeepCopy() CustomAllocationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomAllocationList.
func (CustomAllocationList) DeepCopyInto ¶
func (in CustomAllocationList) DeepCopyInto(out *CustomAllocationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CustomAllocationList) HasRangeOrCIDRs ¶
func (l CustomAllocationList) HasRangeOrCIDRs() bool
HasRangeOrCIDRs returns true if any allocation in the list has Range or CIDRs specified. A list with only family (e.g. [{family:4}]) is considered as no range — subnet-level random allocation.
type CustomIPRange ¶
type CustomIPRange struct {
Start string `json:"start"`
// End end address must be greater than or equal to the start address
End string `json:"end"`
}
CustomIPRange User defined IP address range. Note that this range must be smaller than the subnet range
func (*CustomIPRange) DeepCopy ¶
func (in *CustomIPRange) DeepCopy() *CustomIPRange
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomIPRange.
func (*CustomIPRange) DeepCopyInto ¶
func (in *CustomIPRange) DeepCopyInto(out *CustomIPRange)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DirectIPAllocation ¶
type DirectIPAllocation struct {
// +kubebuilder:default:=Elastic
// this filed is only valid then the pstsName is empty
Type IPAllocType `json:"type,omitempty"`
// +kubebuilder:default:=TTL
// IP address recycling policy
// TTL: represents the default dynamic IP address recycling policy,default.
// Never: this policy can only be used in fixed IP scenarios
// this filed is only valid when the pstsName is empty
ReleaseStrategy ReleaseStrategy `json:"releaseStrategy,omitempty"`
// TTLSecondsAfterFinished is the TTL duration after this pod has been deleted when using fixed IP mode.
// This field is only valid in the Fixed mode and the ReleaseStrategy is TTL
// default is 7d
// this filed is only valid when the pstsName is empty
TTLSecondsAfterDeleted *int64 `json:"ttlSecondsAfterDeleted,omitempty"`
}
DirectIPAllocation is the addressing information of an endpoint.
func (*DirectIPAllocation) DeepCopy ¶
func (in *DirectIPAllocation) DeepCopy() *DirectIPAllocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectIPAllocation.
func (*DirectIPAllocation) DeepCopyInto ¶
func (in *DirectIPAllocation) DeepCopyInto(out *DirectIPAllocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ENI ¶
type ENI struct {
// +deepequal-gen=false
metav1.TypeMeta `json:",inline"`
// +deepequal-gen=false
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ENISpec `json:"spec,omitempty"`
// +kubebuilder:validation:Optional
Status ENIStatus `json:"status,omitempty"`
}
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +deepequal-gen=false +genclient:nonNamespaced +kubebuilder:resource:categories={cce},singular="eni",path="enis",scope="Cluster" +kubebuilder:storageversion +kubebuilder:subresource:status
This columns will be printed by exec `kubectl get enis` +kubebuilder:printcolumn:JSONPath=".spec.nodeName",description="eni attached to node",name="Node",type=string +kubebuilder:printcolumn:JSONPath=".spec.useMode",description="mode of eni",name="Mode",type=string +kubebuilder:printcolumn:JSONPath=".status.CCEStatus",description="status of eni",name="CStatus",type=string +kubebuilder:printcolumn:JSONPath=".status.VPCStatus",description="eni status of vpc",name="VStatus",type=string +kubebuilder:printcolumn:JSONPath=".status.interfaceIndex",description="interface number on node",name="INumber",type=integer
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.
func (*ENI) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ENIList ¶
type ENIList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []ENI `json:"items"`
}
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=false +deepequal-gen=false
func (*ENIList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENIList.
func (*ENIList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ENIList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ENISpec ¶
type ENISpec struct {
models.ENI `json:",inline"`
// ENI 要绑定的节点名
NodeName string `json:"nodeName"`
// By default, the secondary IP mode is ENI, and pod IP is
// the secondary IP of ENI The use scenario of this mode
// is to use the virtual network device via the veth
// pair or IPVLAN
UseMode ENIUseMode `json:"useMode"`
// RouteTableOffset route policy offset, default 127
// +kubebuilder:validation:Minimum=0
// +kubebuilder:default:=127
RouteTableOffset int `json:"routeTableOffset"`
// InstallSourceBasedRouting install source based routing, default false
InstallSourceBasedRouting bool `json:"installSourceBasedRouting,omitempty"`
// VPCVersion vpc version, default 0
// data version of vpc, used to determine whether the object needs to be updated
VPCVersion int64 `json:"vpcVersion,omitempty"`
// Type eni type, default bcc
// +kubebuilder:default:=bcc
Type ENIType `json:"type,omitempty"`
// BorrowIPCount
BorrowIPCount int `json:"borrowIPCount,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 {
// GatewayIP is the interface's subnet's default route
//
// +optional
GatewayIPv4 string `json:"gatewayIPv4,omitempty"`
GatewayIPv6 string `json:"gatewayIPv6,omitempty"`
// InterfaceIndex is the interface index, it used in combination with
// FirstInterfaceIndex
//
// +optional
InterfaceIndex int `json:"interfaceIndex,omitempty"`
// InterfaceName is the interface name, it is generated by the agent
//
// +optional
InterfaceName string `json:"interfaceName,omitempty"`
// Number is the ENI index, it is generated by the agent
//
// +optional
ENIIndex int `json:"index,omitempty"`
// Endpoint of eni associated In Primary use mode, Pod will directly use the
// primary IP of ENI, so it needs to move the ENI device directly to the
// network namespace of Pod.
// In order to avoid possible failures during the creation of Pod, we need
// to record the endpoint currently associated with ENI to further find
// ENI devices
EndpointReference *ObjectReference `json:"endpointReference,omitempty"`
// +kubebuilder:default:=Pending
CCEStatus CCEENIStatus `json:"CCEStatus"`
// +kubebuilder:validation:MaxItems=20
CCEStatusChangeLog []ENIStatusChange `json:"CCEStatusChangeLog,omitempty"`
// +kubebuilder:default:=none
VPCStatus VPCENIStatus `json:"VPCStatus"`
// +kubebuilder:validation:MaxItems=20
VPCStatusChangeLog []ENIStatusChange `json:"VPCStatusChangeLog,omitempty"`
// VPCVersion vpc version, default 0
// data version of vpc, used to determine whether the object needs to be updated
VPCVersion int64 `json:"vpcVersion,omitempty"`
LendBorrowedIPCount int `json:"lendBorrowedIPCount,omitempty"`
}
func (*ENIStatus) AppendCCEENIStatus ¶
func (s *ENIStatus) AppendCCEENIStatus(status CCEENIStatus)
func (*ENIStatus) AppendVPCStatus ¶
func (s *ENIStatus) AppendVPCStatus(vpcStatus VPCENIStatus)
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 ENIStatusChange ¶
type ENIStatusChange struct {
StatusChange `json:",inline"`
// state
CCEENIStatus CCEENIStatus `json:"CCEStatus,omitempty"`
VPCStatus VPCENIStatus `json:"VPCStatus,omitempty"`
}
ENIStatusChange history of ENIStatus. This is used to track changes
func (*ENIStatusChange) DeepCopy ¶
func (in *ENIStatusChange) DeepCopy() *ENIStatusChange
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENIStatusChange.
func (*ENIStatusChange) DeepCopyInto ¶
func (in *ENIStatusChange) DeepCopyInto(out *ENIStatusChange)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ENIUseMode ¶
type ENIUseMode string
const ( // ENIUseModeSecondaryIP Pod IP is the secondary IP of ENI ENIUseModeSecondaryIP ENIUseMode = "Secondary" // ENIUseModePrimaryIP Pod IP is the primamry IP of ENI ENIUseModePrimaryIP ENIUseMode = "Primary" // ENIUseModePrimaryWithSecondaryIP Pod IP is the primary interface with secondary IP // this mode is only used for ebc ENIUseModePrimaryWithSecondaryIP ENIUseMode = "PrimaryWithSecondaryIP" )
type EgressDSCP ¶
type EgressDSCP uint32
type EgressPriority ¶
type EgressPriority uint32
type EgressPriorityOpt ¶
type EgressPriorityOpt struct {
Bands EgressPriority `json:"bands,omitempty"`
DSCP EgressDSCP `json:"dscp,omitempty"`
Priority string `json:"priority,omitempty"`
}
func NewEngressPriorityOpt ¶
func NewEngressPriorityOpt(priority string) *EgressPriorityOpt
func (*EgressPriorityOpt) DeepCopy ¶
func (in *EgressPriorityOpt) DeepCopy() *EgressPriorityOpt
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressPriorityOpt.
func (*EgressPriorityOpt) DeepCopyInto ¶
func (in *EgressPriorityOpt) DeepCopyInto(out *EgressPriorityOpt)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EncryptionSpec ¶
type EncryptionSpec struct {
// Key is the index to the key to use for encryption or 0 if encryption is
// disabled.
//
// +kubebuilder:validation:Optional
Key int `json:"key,omitempty"`
}
EncryptionSpec defines the encryption relevant configuration of a node.
func (*EncryptionSpec) DeepCopy ¶
func (in *EncryptionSpec) DeepCopy() *EncryptionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSpec.
func (*EncryptionSpec) DeepCopyInto ¶
func (in *EncryptionSpec) DeepCopyInto(out *EncryptionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointNetworkSpec ¶
type EndpointNetworkSpec struct {
IPAllocation *IPAllocation `json:"ipAllocation,omitempty"`
Bindwidth *BindwidthOption `json:"bindwidth,omitempty"`
EgressPriority *EgressPriorityOpt `json:"egressPriority,omitempty"`
}
EndpointNetworkSpec Network config for CCE Endpoint
func (*EndpointNetworkSpec) DeepCopy ¶
func (in *EndpointNetworkSpec) DeepCopy() *EndpointNetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointNetworkSpec.
func (*EndpointNetworkSpec) DeepCopyInto ¶
func (in *EndpointNetworkSpec) DeepCopyInto(out *EndpointNetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointNetworking ¶
type EndpointNetworking struct {
// IP4/6 addresses assigned to this Endpoint
Addressing AddressPairList `json:"addressing,omitempty"`
// NodeIP is the IP of the node the endpoint is running on. The IP must
// be reachable between nodes.
NodeIP string `json:"node,omitempty"`
// IPs is the list of IP addresses assigned to this Endpoint
IPs string `json:"ips,omitempty"`
}
EndpointNetworking is the addressing information of an endpoint.
func (*EndpointNetworking) DeepCopy ¶
func (in *EndpointNetworking) DeepCopy() *EndpointNetworking
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointNetworking.
func (*EndpointNetworking) DeepCopyInto ¶
func (in *EndpointNetworking) DeepCopyInto(out *EndpointNetworking)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointSpec ¶
type EndpointSpec struct {
// ExternalIdentifiers is a set of identifiers to identify the endpoint
// apart from the pod name. This includes container runtime IDs.
ExternalIdentifiers *models.EndpointIdentifiers `json:"external-identifiers,omitempty"`
Network EndpointNetworkSpec `json:"network,omitempty"`
// ExtFeatureGates is a set of feature gates to enable or disable specific features like publicIP
// every feature gate will have its own .status.extFeatureStatus
ExtFeatureGates []string `json:"extFeatureGates,omitempty"`
}
func (*EndpointSpec) DeepCopy ¶
func (in *EndpointSpec) DeepCopy() *EndpointSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSpec.
func (*EndpointSpec) DeepCopyInto ¶
func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointStatus ¶
type EndpointStatus struct {
// Controllers is the list of failing controllers for this endpoint.
Controllers ControllerList `json:"controllers,omitempty"`
// ExternalIdentifiers is a set of identifiers to identify the endpoint
// apart from the pod name. This includes container runtime IDs.
ExternalIdentifiers *models.EndpointIdentifiers `json:"external-identifiers,omitempty"`
// Log is the list of the last few warning and error log entries
Log []*models.EndpointStatusChange `json:"log,omitempty"`
// Networking is the networking properties of the endpoint.
//
// +kubebuilder:validation:Optional
Networking *EndpointNetworking `json:"networking,omitempty"`
// A list of node selector requirements by node's labels.
// +optional
NodeSelectorRequirement []corev1.NodeSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"`
// State is the state of the endpoint.
State string `json:"state,omitempty"`
// ExtFeatureStatus is a set of feature status to indicate the status of specific features like publicIP
ExtFeatureStatus map[string]*ExtFeatureStatus `json:"extFeatureStatus,omitempty"`
}
EndpointStatus is the status of a CCE endpoint.
func (*EndpointStatus) DeepCopy ¶
func (in *EndpointStatus) DeepCopy() *EndpointStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointStatus.
func (*EndpointStatus) DeepCopyInto ¶
func (in *EndpointStatus) DeepCopyInto(out *EndpointStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExtFeatureStatus ¶
type ExtFeatureStatus struct {
// Ready the external feature is ready to use
// External features are only considered ready when both `container-id“ and `ready` are in place
// ready is only valid when the container-id is equals to `.spec.external-identifiers.container-id`
Ready bool `json:"ready"`
// ID assigned by container runtime
ContainerID string `json:"container-id"`
Msg string `json:"msg,omitempty"`
// UpdateTime is the time when the status was last updated
UpdateTime *metav1.Time `json:"updateTime,omitempty"`
// Data is a set of key-value pairs that can be used to store additional information
Data map[string]string `json:"data,omitempty"`
}
ExtFeatureStatus is the status of external feature
func (*ExtFeatureStatus) DeepCopy ¶
func (in *ExtFeatureStatus) DeepCopy() *ExtFeatureStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtFeatureStatus.
func (*ExtFeatureStatus) DeepCopyInto ¶
func (in *ExtFeatureStatus) DeepCopyInto(out *ExtFeatureStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HealthAddressingSpec ¶
type HealthAddressingSpec struct {
// IPv4 is the IPv4 address of the IPv4 health endpoint.
//
// +kubebuilder:validation:Optional
IPv4 string `json:"ipv4,omitempty"`
// IPv6 is the IPv6 address of the IPv4 health endpoint.
//
// +kubebuilder:validation:Optional
IPv6 string `json:"ipv6,omitempty"`
}
HealthAddressingSpec is the addressing information required to do connectivity health checking.
func (*HealthAddressingSpec) DeepCopy ¶
func (in *HealthAddressingSpec) DeepCopy() *HealthAddressingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthAddressingSpec.
func (*HealthAddressingSpec) DeepCopyInto ¶
func (in *HealthAddressingSpec) DeepCopyInto(out *HealthAddressingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPAllocType ¶
type IPAllocType string
IPAllocType is the type for ip alloc strategy
const ( IPAllocTypeNil IPAllocType = "" IPAllocTypeRDMA IPAllocType = "RDMA" IPAllocTypeElastic IPAllocType = "Elastic" IPAllocTypeFixed IPAllocType = "Fixed" IPAllocTypeENIPrimary IPAllocType = "PrimaryENI" )
IPAllocType
type IPAllocation ¶
type IPAllocation struct {
DirectIPAllocation `json:",inline"`
// PSTSName is the name of the PSTS
// This field is only valid in the PSTS mode
PSTSName string `json:"pstsName,omitempty"`
// NodeName is the IP of the node the endpoint is running on. The IP must
// be reachable between nodes.
NodeName string `json:"node,omitempty"`
UseIPV4 bool `json:"useIPV4,omitempty"`
UseIPV6 bool `json:"useIPV6,omitempty"`
}
func (*IPAllocation) DeepCopy ¶
func (in *IPAllocation) DeepCopy() *IPAllocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAllocation.
func (*IPAllocation) DeepCopyInto ¶
func (in *IPAllocation) DeepCopyInto(out *IPAllocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPAllocationStrategy ¶
type IPAllocationStrategy struct {
// If the type is empty, the subnet type is used
Type IPAllocType `json:"type,omitempty"`
// IP address recycling policy
// TTL: represents the default dynamic IP address recycling policy,default.
// Never: this policy can only be used in fixed IP scenarios
// !!! abandoned since 2.13.9
ReleaseStrategy ReleaseStrategy `json:"releaseStrategy,omitempty"`
// ReuseIPAddress Whether to enable address reuse with the same pod name
// !!! abandoned since 2.13.9
EnableReuseIPAddress bool `json:"enableReuseIPAddress,omitempty"`
// TTL How long after the pod is deleted, the IP will be deleted, regardless of whether the IP reuse mode is enabled
TTL *metav1.Duration `json:"ttl,omitempty"`
}
IPAllocationStrategy The policy determines whether to use fixed IP, Elastic IP or custom mode
func (*IPAllocationStrategy) DeepCopy ¶
func (in *IPAllocationStrategy) DeepCopy() *IPAllocationStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAllocationStrategy.
func (*IPAllocationStrategy) DeepCopyInto ¶
func (in *IPAllocationStrategy) DeepCopyInto(out *IPAllocationStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetResourceSet ¶
type NetResourceSet struct {
// +deepequal-gen=false
metav1.TypeMeta `json:",inline"`
// +deepequal-gen=false
metav1.ObjectMeta `json:"metadata"`
// Spec defines the desired specification/configuration of the node.
Spec NetResourceSpec `json:"spec"`
// Status defines the realized specification/configuration and status
// of the node.
//
// +kubebuilder:validation:Optional
Status NetResourceStatus `json:"status,omitempty"`
}
+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:categories={cce},singular="netresourceset",path="netresourcesets",scope="Cluster",shortName={nrs,nr} +kubebuilder:storageversion +kubebuilder:subresource:status
+kubebuilder:printcolumn:JSONPath=".spec.instance-id",description="",name="ID",type=string +kubebuilder:printcolumn:JSONPath=".spec.hpas-id",description="",name="HPASID",type=string +kubebuilder:printcolumn:JSONPath=".spec.eni.useMode",description="",name="MODE",type=string,priority=0 +kubebuilder:printcolumn:JSONPath=".spec.eni.instance-type",description="",name="TYPE",type=string,priority=0 NetResourceSet represents a node managed by CCE. It contains a specification to control various node specific configuration aspects and a status section to represent the status of the node.
func (*NetResourceSet) DeepCopy ¶
func (in *NetResourceSet) DeepCopy() *NetResourceSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetResourceSet.
func (*NetResourceSet) DeepCopyInto ¶
func (in *NetResourceSet) DeepCopyInto(out *NetResourceSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetResourceSet) DeepCopyObject ¶
func (in *NetResourceSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NetResourceSet) GetEffectiveInstanceID ¶
func (n *NetResourceSet) GetEffectiveInstanceID(HPASStanderd bool) (string, error)
GetEffectiveInstanceID returns the effective instance ID based on the instance type. For HPAS instance type and HPASStanderd is true, it returns HPASID if available, otherwise returns an error. For other instance types, it returns the regular InstanceID.
func (*NetResourceSet) InstanceID ¶
func (n *NetResourceSet) InstanceID() (instanceID string)
InstanceID returns the InstanceID of a NetResourceSet.
func (*NetResourceSet) SpeculationNoMoreIPReson ¶
func (n *NetResourceSet) SpeculationNoMoreIPReson(crossSubnet bool) error
SpeculationNoMoreIPReson speculation on the reason for IP application failure in ENI mode when failed to allocate IP, it will return a list of error codes
type NetResourceSetList ¶
type NetResourceSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items is a list of NetResourceSet
Items []NetResourceSet `json:"items"`
}
NetResourceSetList is a list of NetResourceSet objects.
func (*NetResourceSetList) DeepCopy ¶
func (in *NetResourceSetList) DeepCopy() *NetResourceSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetResourceSetList.
func (*NetResourceSetList) DeepCopyInto ¶
func (in *NetResourceSetList) DeepCopyInto(out *NetResourceSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetResourceSetList) DeepCopyObject ¶
func (in *NetResourceSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetResourceSpec ¶
type NetResourceSpec struct {
// InstanceID is the identifier of the node. This is different from the
// node name which is typically the FQDN of the node. The InstanceID
// typically refers to the identifier used by the cloud provider or
// some other means of identification.
InstanceID string `json:"instance-id,omitempty"`
// hpasID is the identifier of the HPAS. This is different
// from the HPAS name which is typically the FQDN of the node. The
// hpasID typically refers to the identifier used by the cloud
// provider or some other means of identification. If the instance type
// is not hpas, the hpasID will be none.
HPASID string `json:"hpas-id,omitempty"`
// InstanceType is the type of the instance.
InstanceType string `json:"instance-type,omitempty"`
// Addresses is the list of all node addresses.
//
// +kubebuilder:validation:Optional
Addresses []NodeAddress `json:"addresses,omitempty"`
// IPAM is the address management specification. This section can be
// populated by a user or it can be automatically populated by an IPAM
// operator.
//
// +kubebuilder:validation:Optional
IPAM ipamTypes.IPAMSpec `json:"ipam,omitempty"`
// ENI declaration expectation is used to describe what kind of ENI you want on a node
// This field is applicable to eni mode
//
// +kubebuilder:validation:Optional
ENI *api.ENISpec `json:"eni,omitempty"`
}
NetResourceSpec is the configuration specific to a node.
func (*NetResourceSpec) DeepCopy ¶
func (in *NetResourceSpec) DeepCopy() *NetResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetResourceSpec.
func (*NetResourceSpec) DeepCopyInto ¶
func (in *NetResourceSpec) DeepCopyInto(out *NetResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetResourceStatus ¶
type NetResourceStatus struct {
// IPAM is the IPAM status of the node.
//
// +kubebuilder:validation:Optional
IPAM ipamTypes.IPAMStatus `json:"ipam,omitempty"`
// ENIs The details of the ENI that has been bound on the node, including all the
// IP lists of the ENI
//
// +kubebuilder:validation:Optional
ENIs map[string]SimpleENIStatus `json:"enis,omitempty"`
// PrivateCloudSubnet is the baidu private cloud base specific status of the node.
//
// +kubebuilder:validation:Optional
PrivateCloudSubnet *pcbapi.Subnet `json:"privateCloudSubnet,omitempty"`
}
NetResourceStatus is the status of a node.
func (*NetResourceStatus) DeepCopy ¶
func (in *NetResourceStatus) DeepCopy() *NetResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetResourceStatus.
func (*NetResourceStatus) DeepCopyInto ¶
func (in *NetResourceStatus) DeepCopyInto(out *NetResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeAddress ¶
type NodeAddress struct {
// Type is the type of the node address
Type addressing.AddressType `json:"type,omitempty"`
// IP is an IP of a node
IP string `json:"ip,omitempty"`
}
NodeAddress is a node address.
func (*NodeAddress) DeepCopy ¶
func (in *NodeAddress) DeepCopy() *NodeAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAddress.
func (*NodeAddress) DeepCopyInto ¶
func (in *NodeAddress) DeepCopyInto(out *NodeAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectReference ¶
type ObjectReference struct {
Namespace string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
UID string `json:"uid,omitempty"`
}
func (*ObjectReference) DeepCopy ¶
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSubnetTopologySpread ¶
type PodSubnetTopologySpread struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec PodSubnetTopologySpreadSpec `json:"spec,omitempty"`
Status PodSubnetTopologySpreadStatus `json:"status,omitempty"`
}
PodSubnetTopologySpread describes how to distribute pods in the scenario of sub customized subnets
func (*PodSubnetTopologySpread) DeepCopy ¶
func (in *PodSubnetTopologySpread) DeepCopy() *PodSubnetTopologySpread
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpread.
func (*PodSubnetTopologySpread) DeepCopyInto ¶
func (in *PodSubnetTopologySpread) DeepCopyInto(out *PodSubnetTopologySpread)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodSubnetTopologySpread) DeepCopyObject ¶
func (in *PodSubnetTopologySpread) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodSubnetTopologySpreadList ¶
type PodSubnetTopologySpreadList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []PodSubnetTopologySpread `json:"items"`
}
PodSubnetTopologySpreadList contains a list of PodSubnetTopologySpread
func (*PodSubnetTopologySpreadList) DeepCopy ¶
func (in *PodSubnetTopologySpreadList) DeepCopy() *PodSubnetTopologySpreadList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpreadList.
func (*PodSubnetTopologySpreadList) DeepCopyInto ¶
func (in *PodSubnetTopologySpreadList) DeepCopyInto(out *PodSubnetTopologySpreadList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodSubnetTopologySpreadList) DeepCopyObject ¶
func (in *PodSubnetTopologySpreadList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodSubnetTopologySpreadSpec ¶
type PodSubnetTopologySpreadSpec struct {
Name string `json:"name,omitempty"`
// Subnets for the subnet used by the object, each subnet topology constraint
// object must specify at least one available subnet.
// The subnet must be the subnet ID of the same VPC as the current cluster.
// The format is `sbn-*` for example, sbn-ccfud13pwcqf
// If a dedicated subnet is used, the user should confirm that the subnet
// is only used by the current CCE cluster
Subnets map[string]CustomAllocationList `json:"subnets"`
// Strategy IP allocate strategy, which is a global ip application strategy.
// If the subnet also sets these fields, the subnet will override the global configuration
// If no global policy is defined, the policy of the first subnet is the global policy by default
Strategy *IPAllocationStrategy `json:"strategy,omitempty"`
// A label query over pods that are managed by the daemon set.
// Must match in order to be controlled.
// 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,omitempty"`
// Priority describes which object the target pod should use when multiple
// objects affect a pod at the same time. The higher the priority value,
// the earlier the object is configured. When multiple objects have the same
// priority value, only the configuration of the first object is taken.
Priority int32 `json:"priority,omitempty"`
// MaxSkew describes the degree to which pods may be unevenly distributed.
// It's the maximum permitted difference between the number of matching pods in
// any two topology domains of a given topology type.
// For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same
// labelSelector spread as 1/1/0:
// +-------+-------+-------+
// | zone1 | zone2 | zone3 |
// +-------+-------+-------+
// | P | P | |
// +-------+-------+-------+
// - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1;
// scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2)
// violate MaxSkew(1).
// - if MaxSkew is 2, incoming pod can be scheduled onto any zone.
// It's a required field. Default value is 1 and 0 is not allowed.
MaxSkew int32 `json:"maxSkew,omitempty"`
// WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy
// the spread constraint.
// - DoNotSchedule (default) tells the scheduler not to schedule it
// - ScheduleAnyway tells the scheduler to still schedule it
// It's considered as "Unsatisfiable" if and only if placing incoming pod on any
// topology violates "MaxSkew".
// For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same
// labelSelector spread as 3/1/1:
// +-------+-------+-------+
// | zone1 | zone2 | zone3 |
// +-------+-------+-------+
// | P P P | P | P |
// +-------+-------+-------+
// If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled
// to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies
// MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler
// won't make it *more* imbalanced.
// It's a required field.
WhenUnsatisfiable UnsatisfiableConstraintAction `json:"whenUnsatisfiable,omitempty"`
}
func (*PodSubnetTopologySpreadSpec) DeepCopy ¶
func (in *PodSubnetTopologySpreadSpec) DeepCopy() *PodSubnetTopologySpreadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpreadSpec.
func (*PodSubnetTopologySpreadSpec) DeepCopyInto ¶
func (in *PodSubnetTopologySpreadSpec) DeepCopyInto(out *PodSubnetTopologySpreadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSubnetTopologySpreadStatus ¶
type PodSubnetTopologySpreadStatus struct {
Name string `json:"name,omitempty"`
SchedulableSubnetsNum int32 `json:"availableSubnetsNum,omitempty"`
UnSchedulableSubnetsNum int32 `json:"unavailableSubnetsNum,omitempty"`
AvailableSubnets map[string]SubnetPodStatus `json:"availableSubnets,omitempty"`
// total number of pods bound to this PSTS (counted by CEPs where Spec.Network.IPAllocation.PSTSName == this PSTS name)
PodMatchedCount int32 `json:"podMatchedCount,omitempty"`
}
func (*PodSubnetTopologySpreadStatus) DeepCopy ¶
func (in *PodSubnetTopologySpreadStatus) DeepCopy() *PodSubnetTopologySpreadStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpreadStatus.
func (*PodSubnetTopologySpreadStatus) DeepCopyInto ¶
func (in *PodSubnetTopologySpreadStatus) DeepCopyInto(out *PodSubnetTopologySpreadStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReleaseStrategy ¶
type ReleaseStrategy string
ReleaseStrategy is the type for ip release strategy
const ( ReleaseStrategyTTL ReleaseStrategy = "TTL" ReleaseStrategyNever ReleaseStrategy = "Never" )
ReleaseStrategy
type SimpleENIStatus ¶
type SimpleENIStatus struct {
ID string `json:"id"`
VPCStatus string `json:"vpcStatus"`
CCEStatus string `json:"cceStatus"`
// AvailableIPNum how many more IPs can be applied for on eni
// This field only considers the ip quota of eni
AvailableIPNum int `json:"availableIPNum,omitempty"`
// AllocatedIPNum Number of IPs assigned to eni
AllocatedIPNum int `json:"allocatedIPNum,omitempty"`
// AllocatedCrossSubnetIPNum number of IPs assigned to eni across subnet (deprecated)
AllocatedCrossSubnetIPNum int `json:"allocatedCrossSubnetIPNum,omitempty"`
// SubnetID the subnet id of eni primary ip
SubnetID string `json:"subnetId,omitempty"`
// IsMoreAvailableIPInSubnet Are there more available IPs in the subnet
IsMoreAvailableIPInSubnet bool `json:"isMoreAvailableIPInSubnet,omitempty"`
LastAllocatedIPError *StatusChange `json:"lastAllocatedIPError,omitempty"`
}
SimpleENIStatus is the simple status of a ENI.
func (*SimpleENIStatus) DeepCopy ¶
func (in *SimpleENIStatus) DeepCopy() *SimpleENIStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleENIStatus.
func (*SimpleENIStatus) DeepCopyInto ¶
func (in *SimpleENIStatus) DeepCopyInto(out *SimpleENIStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusChange ¶
type StatusChange struct {
// Code indicate type of status change
// Enum: [ok failed]
Code string `json:"code"`
// Status message
Message string `json:"message,omitempty"`
Time metav1.Time `json:"time,omitempty"`
}
func NewCustomerErrorStatusChange ¶
func NewCustomerErrorStatusChange(code, msg string) *StatusChange
func NewErrorStatusChange ¶
func NewErrorStatusChange(msg string) *StatusChange
func NewOKStatusChange ¶
func NewOKStatusChange(msg string) *StatusChange
func (*StatusChange) DeepCopy ¶
func (in *StatusChange) DeepCopy() *StatusChange
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusChange.
func (*StatusChange) DeepCopyInto ¶
func (in *StatusChange) DeepCopyInto(out *StatusChange)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubenetDetail ¶
type SubenetDetail struct {
AvailableIPNum int `json:"availableIPNum,omitempty"`
Enable bool `json:"enable,omitempty"`
HasNoMoreIP bool `json:"hasNoMoreIP,omitempty"`
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
AvailabilityZone string `json:"availabilityZone,omitempty"`
CIDR string `json:"cidr,omitempty"`
IPv6CIDR string `json:"ipv6Cidr,omitempty"`
}
func (*SubenetDetail) DeepCopy ¶
func (in *SubenetDetail) DeepCopy() *SubenetDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubenetDetail.
func (*SubenetDetail) DeepCopyInto ¶
func (in *SubenetDetail) DeepCopyInto(out *SubenetDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubnetPodStatus ¶
type SubnetPodStatus struct {
SubenetDetail `json:",inline"`
// total number of pods under this subnet
PodCount int32 `json:"podCount,omitempty"`
// error message for subnets
Message string `json:"message,omitempty"`
// IP address allocation details under the subnet
// KEY: ip address
// VALUE: pod name
// Only when the `PodSubnetTopologySpread.spec.enableIPAllocationStatus` spec value is true,
// the IP address allocation information will be recorded
IPAllocations map[string]string `json:"ipAllocations,omitempty"`
}
func (*SubnetPodStatus) DeepCopy ¶
func (in *SubnetPodStatus) DeepCopy() *SubnetPodStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPodStatus.
func (*SubnetPodStatus) DeepCopyInto ¶
func (in *SubnetPodStatus) DeepCopyInto(out *SubnetPodStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnsatisfiableConstraintAction ¶
type UnsatisfiableConstraintAction string
const ( // DoNotSchedule instructs the scheduler not to schedule the pod // when constraints are not satisfied. DoNotSchedule UnsatisfiableConstraintAction = "DoNotSchedule" // ScheduleAnyway instructs the scheduler to schedule the pod // even if constraints are not satisfied. ScheduleAnyway UnsatisfiableConstraintAction = "ScheduleAnyway" )
type VPCENIStatus ¶
type VPCENIStatus string
const ( // eni is not exist in vpc VPCENIStatusNone VPCENIStatus = "" // status provider by bce cloud VPCENIStatusAvailable VPCENIStatus = "available" VPCENIStatusAttaching VPCENIStatus = "attaching" VPCENIStatusInuse VPCENIStatus = "inuse" VPCENIStatusDetaching VPCENIStatus = "detaching" VPCENIStatusDeleted VPCENIStatus = "deleted" )
vpc 中 ENI 共 4 种状态(https://cloud.baidu.com/doc/VPC/s/6kknfn5m8): * available:创建完成,未挂载 * attaching:挂载中 * inuse: 已挂载到单机,vpc 认为的可用状态 * detaching:卸载中