v1beta1

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1beta1 Package is the v1beta1 version of the API.

Index

Constants

View Source
const (
	// ENIPhaseInitial the status when pod first created
	ENIPhaseInitial = ""
	// ENIPhaseBind the status ENI is bind to ECS
	ENIPhaseBind = "Bind"
	// ENIPhaseBinding the status ENI need to bind to ECS, usually when sts pod require the previous ENI
	ENIPhaseBinding = "Binding"
	// ENIPhaseUnbind the status ENI is not bind to ECS
	ENIPhaseUnbind = "Unbind"
	// ENIPhaseDetaching the status when need to detach ENI from ECS
	ENIPhaseDetaching = "Detaching"
	// ENIPhaseDeleting the status when CR is removing
	ENIPhaseDeleting = "Deleting"
)
pod create
    |
    |   podENI create
    |

ENIPhaseInitial

      |
      |   bind eni
ENIPhaseBind        <-----   ENIPhaseBinding  <----- sts pod recreate
      |                               |
      |                               |
      |                               |              gc reserved resource for sts pods
      |                         ENIPhaseUnbind    ---------------
      |                               |                     |    |
      |   sts pod delete              |                     |    |
      |-----------------------> ENIPhaseDetaching           |    |
      |                                                     |    |
      |   stateless pod delete                              |    |
      |        <---------------------------------------------    |
      |                                                          |

ENIPhaseDeleting <------------------------------------------------|

      |
del podENI
View Source
const (
	IPAllocTypeElastic = "Elastic"
	IPAllocTypeFixed   = "Fixed"
)

IPAllocType

View Source
const (
	ReleaseStrategyTTL   = "TTL"
	ReleaseStrategyNever = "Never"
)

ReleaseStrategy

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: network.GroupName, Version: "v1beta1"}

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 Allocation

type Allocation struct {
	AllocationType AllocationType    `json:"allocationType,omitempty"`
	ENI            ENI               `json:"eni,omitempty"`
	IPv4           string            `json:"ipv4,omitempty"`
	IPv6           string            `json:"ipv6,omitempty"`
	IPv4CIDR       string            `json:"ipv4CIDR,omitempty"`
	IPv6CIDR       string            `json:"ipv6CIDR,omitempty"`
	Interface      string            `json:"interface,omitempty"`
	DefaultRoute   bool              `json:"defaultRoute,omitempty"`
	ExtraRoutes    []Route           `json:"extraRoutes,omitempty"`
	ExtraConfig    map[string]string `json:"extraConfig,omitempty"`
}

Allocation for eni record

func (*Allocation) DeepCopy

func (in *Allocation) DeepCopy() *Allocation

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

func (*Allocation) DeepCopyInto

func (in *Allocation) DeepCopyInto(out *Allocation)

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

type AllocationType added in v1.1.1

type AllocationType struct {
	// +kubebuilder:default:=Elastic
	Type            IPAllocType     `json:"type,omitempty"`
	ReleaseStrategy ReleaseStrategy `json:"releaseStrategy,omitempty"`
	ReleaseAfter    string          `json:"releaseAfter,omitempty"` // go type 5m0s
}

AllocationType ip type and release strategy

func (*AllocationType) DeepCopy added in v1.1.1

func (in *AllocationType) DeepCopy() *AllocationType

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

func (*AllocationType) DeepCopyInto added in v1.1.1

func (in *AllocationType) DeepCopyInto(out *AllocationType)

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"`
	Zone             string   `json:"zone,omitempty"`
	VSwitchID        string   `json:"vSwitchID,omitempty"`
	ResourceGroupID  string   `json:"resourceGroupID,omitempty"`
	SecurityGroupIDs []string `json:"securityGroupIDs,omitempty"`
}

ENI eni info

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

type ENIBindStatus string

ENIBindStatus is the current status for the eni

const (
	// ENIStatusBind eni is bind
	ENIStatusBind ENIBindStatus = "Bind"
	// ENIStatusUnBind eni is not attached
	ENIStatusUnBind ENIBindStatus = "Unbind"
	// ENIStatusDeleted eni is already deleted
	ENIStatusDeleted ENIBindStatus = "Deleted"
)

type ENIInfo added in v1.1.1

type ENIInfo struct {
	ID     string        `json:"id,omitempty"`
	Type   ENIType       `json:"type,omitempty"`
	Vid    int           `json:"vid,omitempty"`    // vlan id for trunk
	Status ENIBindStatus `json:"status,omitempty"` // the status for operate the eni
}

func (*ENIInfo) DeepCopy added in v1.1.1

func (in *ENIInfo) DeepCopy() *ENIInfo

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

func (*ENIInfo) DeepCopyInto added in v1.1.1

func (in *ENIInfo) DeepCopyInto(out *ENIInfo)

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

type ENIType added in v1.1.1

type ENIType string

ENIType for this eni, only Secondary and Member is supported

const (
	ENITypePrimary   ENIType = "Primary"
	ENITypeSecondary ENIType = "Secondary"
	ENITypeTrunk     ENIType = "Trunk"
	ENITypeMember    ENIType = "Member"
)

status for ENIType

type IPAllocType

type IPAllocType string

IPAllocType is the type for ip alloc strategy

type NetworkingStatus

type NetworkingStatus string

NetworkingStatus the status for the resource

const (
	NetworkingStatusReady NetworkingStatus = "Ready"
	NetworkingStatusFail  NetworkingStatus = "Fail"
)

NetworkingStatus

type Phase added in v1.1.1

type Phase string

type PodENI

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

	Spec   PodENISpec   `json:"spec,omitempty"`
	Status PodENIStatus `json:"status,omitempty"`
}

PodENI is the Schema for the podenis API

func (*PodENI) DeepCopy

func (in *PodENI) DeepCopy() *PodENI

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

func (*PodENI) DeepCopyInto

func (in *PodENI) DeepCopyInto(out *PodENI)

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

func (*PodENI) DeepCopyObject

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

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

type PodENIList

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

PodENIList contains a list of PodENI

func (*PodENIList) DeepCopy

func (in *PodENIList) DeepCopy() *PodENIList

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

func (*PodENIList) DeepCopyInto

func (in *PodENIList) DeepCopyInto(out *PodENIList)

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

func (*PodENIList) DeepCopyObject

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

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

type PodENISpec

type PodENISpec struct {
	// Allocation store the state for eni
	Allocations []Allocation `json:"allocations,omitempty"`
	// Zone zone
	Zone string `json:"zone,omitempty"`
}

PodENISpec defines the desired state of PodENI

func (*PodENISpec) DeepCopy

func (in *PodENISpec) DeepCopy() *PodENISpec

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

func (*PodENISpec) DeepCopyInto

func (in *PodENISpec) DeepCopyInto(out *PodENISpec)

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

func (*PodENISpec) HaveFixedIP added in v1.2.1

func (p *PodENISpec) HaveFixedIP() bool

type PodENIStatus

type PodENIStatus struct {
	// Phase is the status for the eni binding
	Phase Phase `json:"phase,omitempty"`
	// InstanceID for ecs
	InstanceID string `json:"instanceID,omitempty"`
	// TrunkENIID is the trunk eni id
	TrunkENIID string `json:"trunkENIID,omitempty"`
	// Msg additional info
	Msg string `json:"msg,omitempty"`
	// PodLastSeen is the timestamp when pod resource last seen
	PodLastSeen metav1.Time `json:"podLastSeen,omitempty"`
	// ENIInfos is the status after eni is attached, it is indexed by eni id
	ENIInfos map[string]ENIInfo `json:"eniInfos,omitempty"`
}

PodENIStatus defines the observed state of PodENI

func (*PodENIStatus) DeepCopy

func (in *PodENIStatus) DeepCopy() *PodENIStatus

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

func (*PodENIStatus) DeepCopyInto

func (in *PodENIStatus) DeepCopyInto(out *PodENIStatus)

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

type PodNetworking

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

	Spec   PodNetworkingSpec   `json:"spec,omitempty"`
	Status PodNetworkingStatus `json:"status,omitempty"`
}

PodNetworking is the Schema for the PodNetworking API

func (*PodNetworking) DeepCopy

func (in *PodNetworking) DeepCopy() *PodNetworking

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

func (*PodNetworking) DeepCopyInto

func (in *PodNetworking) DeepCopyInto(out *PodNetworking)

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

func (*PodNetworking) DeepCopyObject

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

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

type PodNetworkingList

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

PodNetworkingList contains a list of PodNetworking

func (*PodNetworkingList) DeepCopy

func (in *PodNetworkingList) DeepCopy() *PodNetworkingList

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

func (*PodNetworkingList) DeepCopyInto

func (in *PodNetworkingList) DeepCopyInto(out *PodNetworkingList)

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

func (*PodNetworkingList) DeepCopyObject

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

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

type PodNetworkingSpec

type PodNetworkingSpec struct {
	AllocationType AllocationType `json:"allocationType,omitempty"`

	Selector Selector `json:"selector,omitempty"`

	SecurityGroupIDs []string `json:"securityGroupIDs,omitempty"`
	VSwitchOptions   []string `json:"vSwitchOptions,omitempty"`
}

PodNetworkingSpec defines the desired state of PodNetworking

func (*PodNetworkingSpec) DeepCopy

func (in *PodNetworkingSpec) DeepCopy() *PodNetworkingSpec

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

func (*PodNetworkingSpec) DeepCopyInto

func (in *PodNetworkingSpec) DeepCopyInto(out *PodNetworkingSpec)

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

type PodNetworkingStatus

type PodNetworkingStatus struct {
	// Status is the status for crd
	Status NetworkingStatus `json:"status,omitempty"`
	// vSwitches list for vSwitches
	VSwitches []VSwitch `json:"vSwitches,omitempty"`
	// UpdateAt the time status updated
	UpdateAt metav1.Time `json:"updateAt,omitempty"`
	// Message for the status
	Message string `json:"message,omitempty"`
}

PodNetworkingStatus defines the observed state of PodNetworking

func (*PodNetworkingStatus) DeepCopy

func (in *PodNetworkingStatus) DeepCopy() *PodNetworkingStatus

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

func (*PodNetworkingStatus) DeepCopyInto

func (in *PodNetworkingStatus) DeepCopyInto(out *PodNetworkingStatus)

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

type Route added in v1.1.1

type Route struct {
	Dst string `json:"dst,omitempty"`
}

func (*Route) DeepCopy added in v1.1.1

func (in *Route) DeepCopy() *Route

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

func (*Route) DeepCopyInto added in v1.1.1

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

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

type Selector

type Selector struct {
	PodSelector       *metav1.LabelSelector `json:"podSelector,omitempty"`
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
}

Selector is for pod or namespace

func (*Selector) DeepCopy

func (in *Selector) DeepCopy() *Selector

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

func (*Selector) DeepCopyInto

func (in *Selector) DeepCopyInto(out *Selector)

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

type VSwitch

type VSwitch struct {
	ID   string `json:"id,omitempty"`
	Zone string `json:"zone,omitempty"`
}

VSwitch VSwitch info

func (*VSwitch) DeepCopy

func (in *VSwitch) DeepCopy() *VSwitch

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

func (*VSwitch) DeepCopyInto

func (in *VSwitch) DeepCopyInto(out *VSwitch)

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