v1alpha1

package
v1.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

v1alpha1 版本的api包

Index

Constants

View Source
const (
	WorkloadEndpointPhasePodRuning  = "podRunning"
	WorkloadEndpointPhasePodDeleted = "podDeleted"
)
View Source
const (
	EniStatusPending   = "pending"
	EniStatusCreated   = "created"
	EniStatusAttaching = "attaching"
	EniStatusInuse     = "inuse"
	EniStatusDetaching = "detaching"
	EniStatusDetached  = "detached"
	EniStatusDeleted   = "deleted"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
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}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: networking.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CrossVPCEni

type CrossVPCEni struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CrossVPCEniSpec   `json:"spec,omitempty"`
	Status CrossVPCEniStatus `json:"status,omitempty"`
}

+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*CrossVPCEni) DeepCopy

func (in *CrossVPCEni) DeepCopy() *CrossVPCEni

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossVPCEni.

func (*CrossVPCEni) DeepCopyInto

func (in *CrossVPCEni) DeepCopyInto(out *CrossVPCEni)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CrossVPCEni) DeepCopyObject

func (in *CrossVPCEni) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CrossVPCEniCondition

type CrossVPCEniCondition struct {
	EniStatus          EniStatus   `json:"eniStatus,omitempty"`
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

func (*CrossVPCEniCondition) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossVPCEniCondition.

func (*CrossVPCEniCondition) DeepCopyInto

func (in *CrossVPCEniCondition) DeepCopyInto(out *CrossVPCEniCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CrossVPCEniList

type CrossVPCEniList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []CrossVPCEni `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*CrossVPCEniList) DeepCopy

func (in *CrossVPCEniList) DeepCopy() *CrossVPCEniList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossVPCEniList.

func (*CrossVPCEniList) DeepCopyInto

func (in *CrossVPCEniList) DeepCopyInto(out *CrossVPCEniList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CrossVPCEniList) DeepCopyObject

func (in *CrossVPCEniList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CrossVPCEniSpec

type CrossVPCEniSpec struct {
	// UserID is the id of the user which this eni belongs to
	UserID string `json:"userID,omitempty"`

	// SubnetID is id of the subnet where this eni is created
	SubnetID string `json:"subnetID,omitempty"`

	// SecurityGroupIDs is the list of security groups that are bound to eni
	SecurityGroupIDs []string `json:"securityGroupIDs,omitempty"`

	// VPCCIDR is cidr of the vpc where this eni is created
	VPCCIDR string `json:"vpcCidr,omitempty"`

	// PrivateIPAddress is the private ip address to create an eni
	PrivateIPAddress string `json:"privateIPAddress,omitempty"`

	// BoundInstanceID is instance id of the node where this eni will be attached
	BoundInstanceID string `json:"boundInstanceID,omitempty"`

	// DefaultRouteInterfaceDelegation specifies the default route interface type
	//
	// +kubebuilder:validation:Enum=eni
	// +kubebuilder:validation:Optional
	DefaultRouteInterfaceDelegation string `json:"defaultRouteInterfaceDelegation,omitempty"`

	// DefaultRouteExcludedCidrs is the cidrs excluded from default route
	//
	// +kubebuilder:validation:Optional
	DefaultRouteExcludedCidrs []string `json:"defaultRouteExcludedCidrs,omitempty"`
}

func (*CrossVPCEniSpec) DeepCopy

func (in *CrossVPCEniSpec) DeepCopy() *CrossVPCEniSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossVPCEniSpec.

func (*CrossVPCEniSpec) DeepCopyInto

func (in *CrossVPCEniSpec) DeepCopyInto(out *CrossVPCEniSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CrossVPCEniStatus

type CrossVPCEniStatus struct {
	// EniID is id of this eni
	EniID string `json:"eniID,omitempty"`

	// EniStatus is the status of this eni
	EniStatus EniStatus `json:"eniStatus,omitempty"`

	// PrimaryIPAddress is the primary ip address of this eni
	PrimaryIPAddress string `json:"primaryIPAddress,omitempty"`

	// MacAddress is the hardware address of this eni
	MacAddress string `json:"macAddress,omitempty"`

	// VPCID is the vpc id of this eni
	VPCID string `json:"vpcID,omitempty"`

	//  InvolvedContainerID is the infra container id of this eni
	InvolvedContainerID string `json:"involvedContainerID,omitempty"`

	// Conditions is the conditions of this eni
	//
	// +kubebuilder:validation:MaxItems=10
	Conditions []CrossVPCEniCondition `json:"conditions,omitempty"`
}

CrossVPCEniStatus defines the observed state of CrossVPCEni

func (*CrossVPCEniStatus) DeepCopy

func (in *CrossVPCEniStatus) DeepCopy() *CrossVPCEniStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossVPCEniStatus.

func (*CrossVPCEniStatus) DeepCopyInto

func (in *CrossVPCEniStatus) DeepCopyInto(out *CrossVPCEniStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomAllocation added in v1.6.12

type CustomAllocation struct {
	// +kubebuilder:default:=4
	// Family of IP Address. 4 or 6
	Family k8sutilnet.IPFamily `json:"family,omitempty"`
	// CustomIPRange 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
	CustomIPRange []CustomIPRange `json:"customIPRange,omitempty"`
}

CustomAllocation User defined IP address management policy

func (*CustomAllocation) DeepCopy added in v1.6.12

func (in *CustomAllocation) DeepCopy() *CustomAllocation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomAllocation.

func (*CustomAllocation) DeepCopyInto added in v1.6.12

func (in *CustomAllocation) DeepCopyInto(out *CustomAllocation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomIPRange added in v1.6.12

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 added in v1.6.12

func (in *CustomIPRange) DeepCopy() *CustomIPRange

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomIPRange.

func (*CustomIPRange) DeepCopyInto added in v1.6.12

func (in *CustomIPRange) DeepCopyInto(out *CustomIPRange)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ENI

type ENI struct {
	ID               string      `json:"id,omitempty"`
	MAC              string      `json:"mac,omitempty"`
	AvailabilityZone string      `json:"availabilityZone,omitempty"`
	Description      string      `json:"description,omitempty"`
	InterfaceIndex   int         `json:"interfaceIndex,omitempty"`
	Subnet           string      `json:"subnet,omitempty"`
	VPC              string      `json:"vpc,omitempty"`
	PrivateIPSet     []PrivateIP `json:"addresses,omitempty"`
	SecurityGroups   []string    `json:"securityGroups,omitempty"`
}

func (*ENI) DeepCopy

func (in *ENI) DeepCopy() *ENI

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENI.

func (*ENI) DeepCopyInto

func (in *ENI) DeepCopyInto(out *ENI)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ENISpec

type ENISpec struct {
	VPCID                    string   `json:"vpcID"`
	AvailabilityZone         string   `json:"availabilityZone"`
	Subnets                  []string `json:"subnets"`
	SecurityGroups           []string `json:"securityGroups"`
	EnterpriseSecurityGroups []string `json:"enterpriseSecurityGroups"`
}

func (*ENISpec) DeepCopy

func (in *ENISpec) DeepCopy() *ENISpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENISpec.

func (*ENISpec) DeepCopyInto

func (in *ENISpec) DeepCopyInto(out *ENISpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ENIStatus

type ENIStatus struct {
	ENIs map[string]ENI `json:"enis,omitempty"`
}

func (*ENIStatus) DeepCopy

func (in *ENIStatus) DeepCopy() *ENIStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENIStatus.

func (*ENIStatus) DeepCopyInto

func (in *ENIStatus) DeepCopyInto(out *ENIStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EndpointRelease added in v1.6.12

type EndpointRelease struct {
	// delete wep after pod deleted for TTL
	TTL metav1.Duration `json:"TTL,omitempty"`

	PodDeletedTime *metav1.Time `json:"podDeletedTime,omitempty"`
}

EndpointRelease status of ip reuse mode

func (*EndpointRelease) DeepCopy added in v1.6.12

func (in *EndpointRelease) DeepCopy() *EndpointRelease

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointRelease.

func (*EndpointRelease) DeepCopyInto added in v1.6.12

func (in *EndpointRelease) DeepCopyInto(out *EndpointRelease)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EniStatus

type EniStatus string

type IPAllocType

type IPAllocType string

IPAllocType is the type for ip alloc strategy

const (
	IPAllocTypeNil     IPAllocType = ""
	IPAllocTypeElastic IPAllocType = "Elastic"
	IPAllocTypeFixed   IPAllocType = "Fixed"
	IPAllocTypeManual  IPAllocType = "Manual"
	IPAllocTypeCustom  IPAllocType = "Custom"
)

IPAllocType

type IPAllocationStrategy added in v1.6.12

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
	ReleaseStrategy ReleaseStrategy `json:"releaseStrategy,omitempty"`

	// ReuseIPAddress Whether to enable address reuse with the same pod name
	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 added in v1.6.12

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAllocationStrategy.

func (*IPAllocationStrategy) DeepCopyInto added in v1.6.12

func (in *IPAllocationStrategy) DeepCopyInto(out *IPAllocationStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IPPool

type IPPool struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   IPPoolSpec   `json:"spec,omitempty"`
	Status IPPoolStatus `json:"status,omitempty"`
}

func (*IPPool) DeepCopy

func (in *IPPool) DeepCopy() *IPPool

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPool.

func (*IPPool) DeepCopyInto

func (in *IPPool) DeepCopyInto(out *IPPool)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IPPool) DeepCopyObject

func (in *IPPool) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IPPoolList

type IPPoolList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []IPPool `json:"items"`
}

func (*IPPoolList) DeepCopy

func (in *IPPoolList) DeepCopy() *IPPoolList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolList.

func (*IPPoolList) DeepCopyInto

func (in *IPPoolList) DeepCopyInto(out *IPPoolList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IPPoolList) DeepCopyObject

func (in *IPPoolList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IPPoolSpec

type IPPoolSpec struct {
	// NodeSelector allows IPPool to allocate for a specific node by label selector
	NodeSelector string `json:"nodeSelector"`

	// CreateSource indicates pool creation source
	CreationSource string `json:"creationSource"`

	// Priority is the priority value of IPPool
	Priority int32 `json:"priority,omitempty"`

	// Range spec for host-local allocator
	IPv4Ranges []Range `json:"ipv4Ranges,omitempty"`
	IPv6Ranges []Range `json:"ipv6Ranges,omitempty"`

	// ENI spec for ENI allocator
	ENI ENISpec `json:"eni,omitempty"`

	// PodSubnets spec for primary eni secondary ip modes
	PodSubnets []string `json:"podSubnets,omitempty"`
}

func (*IPPoolSpec) DeepCopy

func (in *IPPoolSpec) DeepCopy() *IPPoolSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolSpec.

func (*IPPoolSpec) DeepCopyInto

func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IPPoolStatus

type IPPoolStatus struct {
	ENI ENIStatus `json:"eni,omitempty"`
}

func (*IPPoolStatus) DeepCopy

func (in *IPPoolStatus) DeepCopy() *IPPoolStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolStatus.

func (*IPPoolStatus) DeepCopyInto

func (in *IPPoolStatus) DeepCopyInto(out *IPPoolStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MultiIPWorkloadEndpoint added in v1.5.4

type MultiIPWorkloadEndpoint struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	NodeName          string                        `json:"nodeName"`
	InstanceID        string                        `json:"instanceID"`
	ContainerID       string                        `json:"containerID"`
	Type              string                        `json:"type"` //类型,取值:roce, eri
	Spec              []MultiIPWorkloadEndpointSpec `json:"spec,omitempty"`
}

func (*MultiIPWorkloadEndpoint) DeepCopy added in v1.5.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiIPWorkloadEndpoint.

func (*MultiIPWorkloadEndpoint) DeepCopyInto added in v1.5.4

func (in *MultiIPWorkloadEndpoint) DeepCopyInto(out *MultiIPWorkloadEndpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MultiIPWorkloadEndpoint) DeepCopyObject added in v1.5.4

func (in *MultiIPWorkloadEndpoint) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MultiIPWorkloadEndpointList added in v1.5.4

type MultiIPWorkloadEndpointList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []MultiIPWorkloadEndpoint `json:"items"`
}

func (*MultiIPWorkloadEndpointList) DeepCopy added in v1.5.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiIPWorkloadEndpointList.

func (*MultiIPWorkloadEndpointList) DeepCopyInto added in v1.5.4

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MultiIPWorkloadEndpointList) DeepCopyObject added in v1.5.4

func (in *MultiIPWorkloadEndpointList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MultiIPWorkloadEndpointSpec added in v1.5.4

type MultiIPWorkloadEndpointSpec struct {
	EniID       string      `json:"eniID"`
	ContainerID string      `json:"containerID"`
	IP          string      `json:"ip,omitempty"`
	Mac         string      `json:"mac,omitempty"`
	UpdateAt    metav1.Time `json:"updateAt"`
	Type        string      `json:"type"` //类型,取值:roce, eri
}

func (*MultiIPWorkloadEndpointSpec) DeepCopy added in v1.5.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiIPWorkloadEndpointSpec.

func (*MultiIPWorkloadEndpointSpec) DeepCopyInto added in v1.5.4

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

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpreadList.

func (*PodSubnetTopologySpreadList) DeepCopyInto

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]SubnetAllocation `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"`

	// Whether the IP address allocation details under each subnet are displayed
	// in the status. When this attribute is enabled, the pod to which each IP
	// address under the current subnet is historically assigned will be recorded.
	// Note: recording IP address allocation status may produce large objects,
	// which may affect etcd performance
	EnableIPAllocationStatus bool `json:"nableIPAllocationStatus,omitempty"`

	EnablePodTopologySpread bool `json:"enablePodTopologySpread,omitempty"`
}

func (*PodSubnetTopologySpreadSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpreadSpec.

func (*PodSubnetTopologySpreadSpec) DeepCopyInto

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 match label selector
	PodMatchedCount int32 `json:"podMatchedCount,omitempty"`
	// Total pod expected to be affected
	PodAffectedCount   int32                      `json:"podAffectedCount,omitempty"`
	UnavailableSubnets map[string]SubnetPodStatus `json:"unavailableSubnets,omitempty"`
}

func (*PodSubnetTopologySpreadStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpreadStatus.

func (*PodSubnetTopologySpreadStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSubnetTopologySpreadTable

type PodSubnetTopologySpreadTable struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   []PodSubnetTopologySpreadSpec   `json:"spec,omitempty"`
	Status []PodSubnetTopologySpreadStatus `json:"status,omitempty"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=pstt

PodSubnetTopologySpreadTable describes organizational relationships among multiple psts

func (*PodSubnetTopologySpreadTable) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpreadTable.

func (*PodSubnetTopologySpreadTable) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodSubnetTopologySpreadTable) DeepCopyObject

func (in *PodSubnetTopologySpreadTable) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodSubnetTopologySpreadTableList

type PodSubnetTopologySpreadTableList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PodSubnetTopologySpreadTable `json:"items"`
}

PodSubnetTopologySpreadTableList contains a list of PodSubnetTopologySpreadTable

func (*PodSubnetTopologySpreadTableList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSubnetTopologySpreadTableList.

func (*PodSubnetTopologySpreadTableList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodSubnetTopologySpreadTableList) DeepCopyObject

func (in *PodSubnetTopologySpreadTableList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PrivateIP

type PrivateIP struct {
	IsPrimary        bool   `json:"isPrimary"`
	PublicIPAddress  string `json:"publicIPAddress,omitempty"`
	PrivateIPAddress string `json:"privateIPAddress"`
}

func (*PrivateIP) DeepCopy

func (in *PrivateIP) DeepCopy() *PrivateIP

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateIP.

func (*PrivateIP) DeepCopyInto

func (in *PrivateIP) DeepCopyInto(out *PrivateIP)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Range

type Range struct {
	// Version is ip version: 4 or 6
	Version    int      `json:"version"`
	CIDR       string   `json:"cidr"`
	RangeStart string   `json:"rangeStart"`
	RangeEnd   string   `json:"rangeEnd"`
	Excludes   []string `json:"excludes"`
	Gateway    string   `json:"gateway"`
	Routes     []Route  `json:"routes"`
	VlanID     int      `json:"vlanID"`
}

func (*Range) DeepCopy

func (in *Range) DeepCopy() *Range

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Range.

func (*Range) DeepCopyInto

func (in *Range) DeepCopyInto(out *Range)

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 Route

type Route struct {
	Dst string `json:"dst"`
	Gw  string `json:"gw"`
}

func (*Route) DeepCopy

func (in *Route) DeepCopy() *Route

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.

func (*Route) DeepCopyInto

func (in *Route) DeepCopyInto(out *Route)

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"`
}

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 Subnet

type Subnet struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   SubnetSpec   `json:"spec,omitempty"`
	Status SubnetStatus `json:"status,omitempty"`
}

func (*Subnet) DeepCopy

func (in *Subnet) DeepCopy() *Subnet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet.

func (*Subnet) DeepCopyInto

func (in *Subnet) DeepCopyInto(out *Subnet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Subnet) DeepCopyObject

func (in *Subnet) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubnetAllocation

type SubnetAllocation struct {
	IPAllocationStrategy `json:",inline"`

	IPv4 []string `json:"ipv4,omitempty"`
	IPv6 []string `json:"ipv6,omitempty"`
	// IPv4Range CIDR list for IPv4 address to allocated to pod
	IPv4Range []string `json:"ipv4Range,omitempty"`
	// IPv6Range CIDR list for IPv6 address to allocated to pod
	IPv6Range []string `json:"ipv6Range,omitempty"`

	// Custom When the Type field is `custom`, other sub attributes (such as `IPv4“, `IPv4Range“, etc.)
	// of SubnetAllocation will be ignored. At this time, the management policy
	// of IP address is taken over by Custom
	//
	// If the Type is Elastic, Fixed or Manual, the internal part of the Custom field will not be resolved
	// The Custom type is not universal, because it may cause IP address disclosure
	Custom []CustomAllocation `json:"custom,omitempty"`
}

SubnetAllocation describe how the IP address under the subnet should be allocated

func (*SubnetAllocation) DeepCopy

func (in *SubnetAllocation) DeepCopy() *SubnetAllocation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetAllocation.

func (*SubnetAllocation) DeepCopyInto

func (in *SubnetAllocation) DeepCopyInto(out *SubnetAllocation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubnetList

type SubnetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Subnet `json:"items"`
}

func (*SubnetList) DeepCopy

func (in *SubnetList) DeepCopy() *SubnetList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetList.

func (*SubnetList) DeepCopyInto

func (in *SubnetList) DeepCopyInto(out *SubnetList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubnetList) DeepCopyObject

func (in *SubnetList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

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 SubnetSpec

type SubnetSpec struct {
	ID               string `json:"id,omitempty"`
	Name             string `json:"name,omitempty"`
	AvailabilityZone string `json:"availabilityZone,omitempty"`
	CIDR             string `json:"cidr,omitempty"`

	// Exclusive subnet flag
	// Exclusive subnet only allows manual IP assignment
	// If a subnet is marked as a Exclusive subnet, it can no longer be
	// used as a subnet for automatic IP allocation
	//
	// WARN: Marking as an exclusive subnet only allows you to manually
	// allocate IP. If the default subnet for IPAM is marked as an exclusive
	// subnet, it may cause all pods to fail to allocate IP
	Exclusive bool `json:"exclusive,omitempty"`
}

func (*SubnetSpec) DeepCopy

func (in *SubnetSpec) DeepCopy() *SubnetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSpec.

func (*SubnetSpec) DeepCopyInto

func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubnetStatus

type SubnetStatus struct {
	AvailableIPNum int    `json:"availableIPNum,omitempty"`
	Enable         bool   `json:"enable,omitempty"`
	HasNoMoreIP    bool   `json:"hasNoMoreIP,omitempty"`
	Reason         string `json:"reason,omitempty"`
}

func (*SubnetStatus) DeepCopy

func (in *SubnetStatus) DeepCopy() *SubnetStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetStatus.

func (*SubnetStatus) DeepCopyInto

func (in *SubnetStatus) DeepCopyInto(out *SubnetStatus)

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 WorkloadEndpoint

type WorkloadEndpoint struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec WorkloadEndpointSpec `json:"spec,omitempty"`
}

func (*WorkloadEndpoint) DeepCopy

func (in *WorkloadEndpoint) DeepCopy() *WorkloadEndpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpoint.

func (*WorkloadEndpoint) DeepCopyInto

func (in *WorkloadEndpoint) DeepCopyInto(out *WorkloadEndpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkloadEndpoint) DeepCopyObject

func (in *WorkloadEndpoint) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkloadEndpointList

type WorkloadEndpointList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []WorkloadEndpoint `json:"items"`
}

func (*WorkloadEndpointList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointList.

func (*WorkloadEndpointList) DeepCopyInto

func (in *WorkloadEndpointList) DeepCopyInto(out *WorkloadEndpointList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkloadEndpointList) DeepCopyObject

func (in *WorkloadEndpointList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkloadEndpointSpec

type WorkloadEndpointSpec struct {
	ContainerID       string      `json:"containerID,omitempty"`
	IP                string      `json:"ip,omitempty"`
	IPv6              string      `json:"ipv6,omitempty"`
	Type              string      `json:"type,omitempty"`
	Mac               string      `json:"mac,omitempty"`
	Gw                string      `json:"gw,omitempty"`
	ENIID             string      `json:"eniID,omitempty"`
	Node              string      `json:"node,omitempty"`
	InstanceID        string      `json:"instanceID,omitempty"`
	SubnetID          string      `json:"subnetID,omitempty"`
	EnableFixIP       string      `json:"enableFixIP,omitempty"`
	FixIPDeletePolicy string      `json:"fixIPDeletePolicy,omitempty"`
	UpdateAt          metav1.Time `json:"updateAt,omitempty"`
	// subnet id of eni primary IP
	// This field is valid only when Eni applies for IP across subnets
	ENISubnetID string `json:"eniSubnetID,omitempty"`
	// PodSubnetTopologySpread object name referenced by pod
	SubnetTopologyReference string `json:"subnetTopologyReference,omitempty"`

	Phase string `json:"phase,omitempty"`
	// Release
	Release *EndpointRelease `json:"release,omitempty"`
}

func (*WorkloadEndpointSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointSpec.

func (*WorkloadEndpointSpec) DeepCopyInto

func (in *WorkloadEndpointSpec) DeepCopyInto(out *WorkloadEndpointSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL