Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +deepequal-gen=package
- 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. *
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransAvailableZoneToZoneName ¶
TransAvailableZoneToZoneName - 将 availableZone 转成 zoneName
func TransZoneNameToAvailableZone ¶
TransZoneNameToAvailableZone - 将 zoneName 转成 availableZone
Types ¶
type AvailableZone ¶
type AvailableZone string
AvailableZone 可用区
const ( // ZoneA 可用区 A ZoneA AvailableZone = "zoneA" // ZoneB 可用区 B ZoneB AvailableZone = "zoneB" // ZoneC 可用区 C ZoneC AvailableZone = "zoneC" // ZoneD 可用区 D ZoneD AvailableZone = "zoneD" // ZoneE 可用区 E ZoneE AvailableZone = "zoneE" // ZoneF 可用区 F ZoneF AvailableZone = "zoneF" )
type ENISpec ¶
type ENISpec struct { // UseMode usage mode of eni currently includes `Primary` and `Secondary` // +kubebuilder:default:=Secondary // +kubebuilder:validation:Enum=Secondary;Primary UseMode string `json:"useMode,omitempty"` // MaxAllocateENI maximum number of ENIs that can be applied for a single machine // +kubebuilder:validation:Minimum=0 MaxAllocateENI int `json:"maxAllocateENI,omitempty"` // PreAllocateENI Number of ENIs pre-allocate // +kubebuilder:validation:Minimum=0 // +kubebuilder:default:=1 PreAllocateENI int `json:"preAllocateENI,omitempty"` // BurstableMehrfachENI is the number of idle IPs with the minimum reserved ENI // IP capacity multiple. If 0, it means that the Burstable ENI mode is not used. // If it is 1, it means always ensuring that an ENI's IP address is in a ready // idle state (ready+IP capacity is full) // default is 1 BurstableMehrfachENI int `json:"burstableMehrfachENI,omitempty"` // MaxIPsPerENI the maximum number of secondary IPs that can be // applied for per eni // +kubebuilder:validation:Minimum=0 // +kubebuilder:default:=1 MaxIPsPerENI int `json:"maxIPsPerENI,omitempty"` // InstanceType is the BCE Compute instance type, e.g. BCC BBC // // +kubebuilder:validation:Optional InstanceType string `json:"instance-type,omitempty"` // FirstInterfaceIndex is the index of the first ENI to use for IP // allocation, e.g. if the node has eth0, eth1, eth2 and // FirstInterfaceIndex is set to 1, then only eth1 and eth2 will be // used for IP allocation, eth0 will be ignored for PodIP allocation. // // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Optional FirstInterfaceIndex *int `json:"first-interface-index,omitempty"` // VpcID is the VPC ID to use when allocating ENIs. // // +kubebuilder:validation:Optional VpcID string `json:"vpc-id,omitempty"` // SecurityGroups is the list of security groups to attach to any ENI // that is created and attached to the instance. // // +kubebuilder:validation:Optional SecurityGroups []string `json:"security-groups,omitempty"` // EnterpriseSecurityGroupList are enterprise security groups that bound to ENIs // e.g. esg-twh19p9zcuqr, esg-5yhyct307p98 EnterpriseSecurityGroupList []string `json:"enterpriseSecurityGroupList,omitempty"` // SubnetIDs is the list of subnet ids to use when evaluating what BCE // subnets to use for ENI and IP allocation. // // +kubebuilder:validation:Optional SubnetIDs []string `json:"subnet-ids,omitempty"` // AvailabilityZone is the availability zone to use when allocating // ENIs. // // +kubebuilder:validation:Optional AvailabilityZone string `json:"availability-zone,omitempty"` // DeleteOnTermination defines that the ENI should be deleted when the // associated instance is terminated. If the parameter is not set the // default behavior is to delete the ENI on instance termination. // // +kubebuilder:validation:Optional DeleteOnTermination *bool `json:"delete-on-termination,omitempty"` // UsePrimaryAddress determines whether an ENI's primary address // should be available for allocations on the node // // +kubebuilder:validation:Optional UsePrimaryAddress *bool `json:"use-primary-address,omitempty"` // 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"` }
ENISpec ENI declaration expectation is used to describe what kind of ENI you want on a node
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.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
* Copyright (c) 2023 Baidu, Inc.
|
* Copyright (c) 2023 Baidu, Inc. |
testing
Package testing is a generated GoMock package.
|
Package testing is a generated GoMock package. |
testing
Package mock_metadata is a generated GoMock package.
|
Package mock_metadata is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.