v1alpha1

package
v1.8.11 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the acn v1alpha1 API group +kubebuilder:object:generate=true +groupName=multitenancy.acn.azure.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "multitenancy.acn.azure.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type DeviceInfo

type DeviceInfo struct {
	DeviceType DeviceType `json:"deviceType,omitempty"`
	MacAddress string     `json:"macAddress"`
}

func (*DeviceInfo) DeepCopy

func (in *DeviceInfo) DeepCopy() *DeviceInfo

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

func (*DeviceInfo) DeepCopyInto

func (in *DeviceInfo) DeepCopyInto(out *DeviceInfo)

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

type DeviceType

type DeviceType string

+kubebuilder:validation:Enum=acn.azure.com/vnet-nic;acn.azure.com/infiniband-nic

const (
	DeviceTypeVnetNIC       DeviceType = "acn.azure.com/vnet-nic"
	DeviceTypeInfiniBandNIC DeviceType = "acn.azure.com/infiniband-nic"
)

type InfinibandStatus

type InfinibandStatus string

+kubebuilder:validation:Enum=Unprogrammed;Programming;Programmed;Unprogramming;Failed

const (
	Unprogrammed  InfinibandStatus = "Unprogrammed"
	Programming   InfinibandStatus = "Programming"
	Programmed    InfinibandStatus = "Programmed"
	Unprogramming InfinibandStatus = "Unprogramming"
	Failed        InfinibandStatus = "Failed"
)

type InterfaceInfo

type InterfaceInfo struct {
	// NCID is the network container id
	NCID string `json:"ncID,omitempty"`
	// PrimaryIP is the ip allocated to the network container
	// +kubebuilder:validation:Optional
	PrimaryIP string `json:"primaryIP,omitempty"`
	// MacAddress is the MAC Address of the VM's NIC which this network container was created for
	MacAddress string `json:"macAddress,omitempty"`
	// GatewayIP is the gateway ip of the injected subnet
	// +kubebuilder:validation:Optional
	GatewayIP string `json:"gatewayIP,omitempty"`
	// SubnetAddressSpace is the subnet address space of the injected subnet
	// +kubebuilder:validation:Optional
	SubnetAddressSpace string `json:"subnetAddressSpace,omitempty"`
	// DeviceType is the device type that this NC was created for
	DeviceType DeviceType `json:"deviceType,omitempty"`
	// AccelnetEnabled determines if the CNI will provision the NIC with accelerated networking enabled
	// +kubebuilder:validation:Optional
	AccelnetEnabled bool `json:"accelnetEnabled,omitempty"`
	// IBStatus is the programming status of the infiniband device
	// +kubebuilder:validation:Optional
	IBStatus InfinibandStatus `json:"ibStatus,omitempty"`
	// SharedNIC is a field for prefixblock mode,
	// it determines if CNI will need to keep this NIC in the pod / node namespace
	// +kubebuilder:validation:Optional
	SharedNIC bool `json:"sharedNic,omitempty"`
}

func (*InterfaceInfo) DeepCopy

func (in *InterfaceInfo) DeepCopy() *InterfaceInfo

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

func (*InterfaceInfo) DeepCopyInto

func (in *InterfaceInfo) DeepCopyInto(out *InterfaceInfo)

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

type MTPNCStatus

type MTPNCStatus string

MTPNCStatus indicates the high-level status of MultitenantPodNetworkConfig +kubebuilder:validation:Enum=Ready;Pending;InternalError;PNINotFound;PNINotReady;NodeCapacityExceeded;IPsExhausted;Deleting

const (
	// MTPNCStatusReady indicates the MTPNC has been successfully programmed and is ready for use
	MTPNCStatusReady MTPNCStatus = "Ready"
	// MTPNCStatusPending indicates the MTPNC is awaiting processing
	MTPNCStatusPending MTPNCStatus = "Pending"
	// MTPNCStatusInternalError indicates an internal error occurred while processing the MTPNC
	MTPNCStatusInternalError MTPNCStatus = "InternalError"
	// MTPNCStatusPNINotFound indicates the referenced PodNetworkInstance was not found
	MTPNCStatusPNINotFound MTPNCStatus = "PNINotFound"
	// MTPNCStatusPNINotReady indicates the referenced PodNetworkInstance is not yet ready
	MTPNCStatusPNINotReady MTPNCStatus = "PNINotReady"
	// MTPNCStatusNodeCapacityExceeded indicates the node has exceeded its capacity for network resources
	MTPNCStatusNodeCapacityExceeded MTPNCStatus = "NodeCapacityExceeded"
	// MTPNCStatusIPsExhausted indicates no IP addresses are available for allocation
	MTPNCStatusIPsExhausted MTPNCStatus = "IPsExhausted"
	// MTPNCStatusDeleting indicates MTPNC is being deleted, status may not be set at the same time as deletionTimestamp.
	MTPNCStatusDeleting MTPNCStatus = "Deleting"
)

type MultitenantPodNetworkConfig

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

	Spec   MultitenantPodNetworkConfigSpec   `json:"spec,omitempty"`
	Status MultitenantPodNetworkConfigStatus `json:"status,omitempty"`
}

MultitenantPodNetworkConfig is the Schema for the multitenantpodnetworkconfigs API +kubebuilder:resource:shortName=mtpnc,scope=Namespaced +kubebuilder:subresource:status +kubebuilder:metadata:labels=managed= +kubebuilder:metadata:labels=owner= +kubebuilder:printcolumn:name="PodNetworkInstance",type=string,JSONPath=`.spec.podNetworkInstance` +kubebuilder:printcolumn:name="PodName",type=string,JSONPath=`.spec.podName` +kubebuilder:printcolumn:name="PodUID",type=string,JSONPath=`.spec.podUID` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`

func (*MultitenantPodNetworkConfig) DeepCopy

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

func (*MultitenantPodNetworkConfig) DeepCopyInto

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

func (*MultitenantPodNetworkConfig) DeepCopyObject

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

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

func (*MultitenantPodNetworkConfig) IsDeleting

func (m *MultitenantPodNetworkConfig) IsDeleting() bool

IsDeleting returns true if the MultitenantPodNetworkConfig resource has been marked for deletion. A resource is considered to be deleting when its DeletionTimestamp field is set.

func (*MultitenantPodNetworkConfig) IsReady

func (m *MultitenantPodNetworkConfig) IsReady() bool

IsReady checks if all the required fields in the MTPNC status are populated

func (*MultitenantPodNetworkConfig) IsScheduledWithDRA added in v1.8.10

func (m *MultitenantPodNetworkConfig) IsScheduledWithDRA() bool

IsScheduledWithDRA reports whether the pod was scheduled with Dynamic Resource Allocation for the multitenancy DRA driver. ResourceClaims is populated by the MTPNC writer with only the claims created for the multitenancy DRA driver, so a non-empty slice means DRA scheduling.

type MultitenantPodNetworkConfigList

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

MultitenantPodNetworkConfigList contains a list of PodNetworkConfig

func (*MultitenantPodNetworkConfigList) DeepCopy

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

func (*MultitenantPodNetworkConfigList) DeepCopyInto

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

func (*MultitenantPodNetworkConfigList) DeepCopyObject

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

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

type MultitenantPodNetworkConfigSpec

type MultitenantPodNetworkConfigSpec struct {
	// name of PNI object from requesting cx pod
	// +kubebuilder:validation:Optional
	PodNetworkInstance string `json:"podNetworkInstance,omitempty"`
	// name of PN object from requesting cx pod
	PodNetwork string `json:"podNetwork"`
	// name of the requesting cx pod
	PodName string `json:"podName,omitempty"`
	// MAC addresses of the IB devices to use for a pod
	// +kubebuilder:validation:Optional
	IBMACAddresses []string `json:"IBMACAddresses,omitempty"`
	// PodUID is the UID of the pod
	PodUID types.UID `json:"podUID,omitempty"`
	// NetworkID identifies the network (e.g. VNet GUID) this pod belongs to.
	// Denormalized from PodNetwork.Spec.NetworkID.
	// +kubebuilder:validation:Optional
	NetworkID string `json:"networkID,omitempty"`
	// SubnetGUID is the GUID of the subnet this pod belongs to.
	// Denormalized from PodNetwork.Spec.SubnetGUID.
	// +kubebuilder:validation:Optional
	SubnetGUID string `json:"subnetGUID,omitempty"`
	// SubnetResourceID is the ARM resource ID of the subnet this pod belongs to.
	// Denormalized from PodNetwork.Spec.SubnetResourceID.
	// +kubebuilder:validation:Optional
	SubnetResourceID string `json:"subnetResourceID,omitempty"`
	// ResourceClaims lists the names of ResourceClaims allocated to the pod that
	// were created for the multitenancy DRA driver.
	// +kubebuilder:validation:Optional
	// +listType=set
	ResourceClaims []string `json:"resourceClaims,omitempty"`
}

MultitenantPodNetworkConfigSpec defines the desired state of PodNetworkConfig

func (*MultitenantPodNetworkConfigSpec) DeepCopy

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

func (*MultitenantPodNetworkConfigSpec) DeepCopyInto

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

type MultitenantPodNetworkConfigStatus

type MultitenantPodNetworkConfigStatus struct {
	// Deprecated - use InterfaceInfos
	// +kubebuilder:validation:Optional
	NCID string `json:"ncID,omitempty"`
	// Deprecated - use InterfaceInfos
	// +kubebuilder:validation:Optional
	PrimaryIP string `json:"primaryIP,omitempty"`
	// Deprecated - use InterfaceInfos
	// +kubebuilder:validation:Optional
	MacAddress string `json:"macAddress,omitempty"`
	// Deprecated - use InterfaceInfos
	// +kubebuilder:validation:Optional
	GatewayIP string `json:"gatewayIP,omitempty"`
	// InterfaceInfos describes all of the network container goal state for this Pod
	// +kubebuilder:validation:Optional
	InterfaceInfos []InterfaceInfo `json:"interfaceInfos,omitempty"`
	// DefaultDenyACL bool indicates whether default deny policy will be present on the pods upon pod creation
	// +kubebuilder:validation:Optional
	DefaultDenyACL bool `json:"defaultDenyACL"`
	// NodeName is the name of the node where the pod is scheduled
	// +kubebuilder:validation:Optional
	NodeName string `json:"nodeName,omitempty"`
	// Status represents the overall status of the MTPNC
	// +kubebuilder:validation:Optional
	Status MTPNCStatus `json:"status,omitempty"`
}

MultitenantPodNetworkConfigStatus defines the observed state of PodNetworkConfig

func (*MultitenantPodNetworkConfigStatus) DeepCopy

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

func (*MultitenantPodNetworkConfigStatus) DeepCopyInto

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

type NICNCStatus added in v1.8.10

type NICNCStatus string

NICNCStatus indicates the status of NIC Network Config

const (
	// NICNCReady indicates the NIC's network container has been successfully created and is ready for use.
	NICNCReady NICNCStatus = "Ready"
	// NICNCPending indicates the NIC's network container is awaiting processing.
	NICNCPending NICNCStatus = "Pending"
	// NICNCDeleting indicates the NIC's network container is being cleaned up.
	NICNCDeleting NICNCStatus = "Deleting"
	// NICNCInternalError indicates an internal error occurred while processing the NIC Network Config.
	NICNCInternalError NICNCStatus = "InternalError"
	// NICNCNCCreateError indicates the network container creation for the NIC failed.
	NICNCNCCreateError NICNCStatus = "NCCreateError"
)

type NICNetworkConfig added in v1.8.10

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

	Spec   NICNetworkConfigSpec   `json:"spec,omitempty"`
	Status NICNetworkConfigStatus `json:"status,omitempty"`
}

NICNetworkConfig is the Schema for the nicnetworkconfigs API +kubebuilder:resource:shortName=nicnc,scope=Namespaced +kubebuilder:subresource:status +kubebuilder:metadata:labels=managed= +kubebuilder:metadata:labels=owner= +kubebuilder:printcolumn:name="Node",type=string,JSONPath=`.spec.nodeName` +kubebuilder:printcolumn:name="MACAddress",type=string,JSONPath=`.spec.macAddress` +kubebuilder:printcolumn:name="PodNetwork",type=string,JSONPath=`.spec.podNetwork` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`

func (*NICNetworkConfig) DeepCopy added in v1.8.10

func (in *NICNetworkConfig) DeepCopy() *NICNetworkConfig

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

func (*NICNetworkConfig) DeepCopyInto added in v1.8.10

func (in *NICNetworkConfig) DeepCopyInto(out *NICNetworkConfig)

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

func (*NICNetworkConfig) DeepCopyObject added in v1.8.10

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

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

type NICNetworkConfigList added in v1.8.10

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

NICNetworkConfigList contains a list of NICNetworkConfig

func (*NICNetworkConfigList) DeepCopy added in v1.8.10

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

func (*NICNetworkConfigList) DeepCopyInto added in v1.8.10

func (in *NICNetworkConfigList) DeepCopyInto(out *NICNetworkConfigList)

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

func (*NICNetworkConfigList) DeepCopyObject added in v1.8.10

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

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

type NICNetworkConfigSpec added in v1.8.10

type NICNetworkConfigSpec struct {
	// PodNetwork is the name of the PodNetwork
	PodNetwork string `json:"podNetwork"`
	// NodeName is the name of the node this NIC belongs to
	NodeName string `json:"nodeName"`
	// MACAddress is the MAC address of the NIC, used to create the network container
	MACAddress string `json:"macAddress"`
	// customer subnet id
	SubnetResourceID string `json:"subnetResourceID"`
	// customer subnet guid
	// +kubebuilder:validation:Optional
	SubnetGUID string `json:"subnetGUID,omitempty"`
	// NetworkID is the VNET GUID or network identifier
	NetworkID string `json:"networkID"`
	// ScheduledByDRA indicates the pod was scheduled via Dynamic Resource Allocation (DRA).
	// +kubebuilder:validation:Optional
	ScheduledByDRA bool `json:"scheduledByDRA,omitempty"`
	// PodAllocationRequests tracks which pods are allocated on this NIC
	// +kubebuilder:validation:Optional
	PodAllocationRequests []PodAllocationRequest `json:"podAllocations,omitempty"`
}

NICNetworkConfigSpec defines the desired state of NICNetworkConfig

func (*NICNetworkConfigSpec) DeepCopy added in v1.8.10

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

func (*NICNetworkConfigSpec) DeepCopyInto added in v1.8.10

func (in *NICNetworkConfigSpec) DeepCopyInto(out *NICNetworkConfigSpec)

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

type NICNetworkConfigStatus added in v1.8.10

type NICNetworkConfigStatus struct {
	// Status indicates the current status of the NIC Network Config
	// +kubebuilder:validation:Enum=Ready;Pending;Deleting;InternalError;NCCreateError
	Status NICNCStatus `json:"status,omitempty"`
	// NCID is the network container id created for this NIC
	// +kubebuilder:validation:Optional
	NCID string `json:"ncID,omitempty"`
	// PrimaryIP is the primary IP allocated to the network container
	// +kubebuilder:validation:Optional
	PrimaryIP string `json:"primaryIP,omitempty"`
	// MACAddress is the MAC Address of the VM's NIC
	MACAddress string `json:"macAddress,omitempty"`
	// GatewayIP is the gateway ip of the injected subnet
	// +kubebuilder:validation:Optional
	GatewayIP string `json:"gatewayIP,omitempty"`
	// SubnetAddressSpace is the subnet address space of the injected subnet
	// +kubebuilder:validation:Optional
	SubnetAddressSpace string `json:"subnetAddressSpace,omitempty"`
	// AvailableIPs tracks the available IP addresses in this NC block
	// +kubebuilder:validation:Optional
	AvailableIPs []string `json:"availableIPs,omitempty"`
	// PodAllocations tracks the allocated IP addresses to pod mapping.
	// +kubebuilder:validation:Optional
	PodAllocations map[string]PodAllocation `json:"podAllocations,omitempty"`
	// CooldownPeriodInSeconds is the cooldown duration before retrying NIC NC operations.
	// +kubebuilder:default=30
	// +kubebuilder:validation:Minimum=0
	CooldownPeriodInSeconds int `json:"cooldownPeriodInSeconds,omitempty"`
	// DeviceType is the device type that this NC was created for
	DeviceType DeviceType `json:"deviceType,omitempty"`
	// AccelnetEnabled determines if the CNI will provision the NIC with accelerated networking enabled
	// +kubebuilder:validation:Optional
	AccelnetEnabled bool `json:"accelnetEnabled,omitempty"`
}

NICNetworkConfigStatus defines the observed state of NICNetworkConfig

func (*NICNetworkConfigStatus) DeepCopy added in v1.8.10

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

func (*NICNetworkConfigStatus) DeepCopyInto added in v1.8.10

func (in *NICNetworkConfigStatus) DeepCopyInto(out *NICNetworkConfigStatus)

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

type NodeInfo

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

	Spec   NodeInfoSpec   `json:"spec,omitempty"`
	Status NodeInfoStatus `json:"status,omitempty"`
}

NodeInfo is the Schema for the NodeInfo API +kubebuilder:subresource:status +kubebuilder:resource:shortName=ni,scope=Cluster,path=nodeinfo +kubebuilder:printcolumn:name="VMUniqueID",type=string,priority=0,JSONPath=`.spec.vmUniqueID`

func (*NodeInfo) DeepCopy

func (in *NodeInfo) DeepCopy() *NodeInfo

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

func (*NodeInfo) DeepCopyInto

func (in *NodeInfo) DeepCopyInto(out *NodeInfo)

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

func (*NodeInfo) DeepCopyObject

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

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

type NodeInfoList

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

NodeInfoList contains a list of NodeInfo

func (*NodeInfoList) DeepCopy

func (in *NodeInfoList) DeepCopy() *NodeInfoList

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

func (*NodeInfoList) DeepCopyInto

func (in *NodeInfoList) DeepCopyInto(out *NodeInfoList)

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

func (*NodeInfoList) DeepCopyObject

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

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

type NodeInfoSpec

type NodeInfoSpec struct {
	// +kubebuilder:validation:Optional
	VMUniqueID string `json:"vmUniqueID,omitempty"`

	// +kubebuilder:validation:optional
	// +kubebuilder:validation:Pattern=`^AZ\d{2}$`
	HomeAZ string `json:"homeAZ,omitempty"`
}

NodeInfoSpec defines the desired state of NodeInfo. This is information provided by CNS.

func (*NodeInfoSpec) DeepCopy

func (in *NodeInfoSpec) DeepCopy() *NodeInfoSpec

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

func (*NodeInfoSpec) DeepCopyInto

func (in *NodeInfoSpec) DeepCopyInto(out *NodeInfoSpec)

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

type NodeInfoStatus

type NodeInfoStatus struct {
	// +kubebuilder:validation:Optional
	DeviceInfos []DeviceInfo `json:"deviceInfos,omitempty"`
}

NodeInfoStatus defines the observed state of NodeInfo. This is information provided by DNC.

func (*NodeInfoStatus) DeepCopy

func (in *NodeInfoStatus) DeepCopy() *NodeInfoStatus

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

func (*NodeInfoStatus) DeepCopyInto

func (in *NodeInfoStatus) DeepCopyInto(out *NodeInfoStatus)

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

type PNIStatus

type PNIStatus string

PNIStatus indicates the status of PNI +kubebuilder:validation:Enum=Ready;CreateReservationSetError;PodNetworkNotReady;InsufficientIPAddressesOnSubnet

const (
	PNIStatusReady                           PNIStatus = "Ready"
	PNIStatusCreateReservationSetError       PNIStatus = "CreateReservationSetError"
	PNIStatusPodNetworkNotReady              PNIStatus = "PodNetworkNotReady"
	PNIStatusInsufficientIPAddressesOnSubnet PNIStatus = "InsufficientIPAddressesOnSubnet"
)

type PodAllocation added in v1.8.10

type PodAllocation struct {
	// PodName is the name of the pod
	PodName string `json:"podName"`
	// PodNamespace is the namespace of the pod
	PodNamespace string `json:"podNamespace"`
	// AllocatedIP is the IP address allocated to the pod
	AllocatedIP string `json:"allocatedIP"`
	// MTPNC is the name of the MultitenantPodNetworkConfig
	MTPNC string `json:"mtpnc"`
}

PodAllocation represents a pod's IP allocation on this NIC

func (*PodAllocation) DeepCopy added in v1.8.10

func (in *PodAllocation) DeepCopy() *PodAllocation

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

func (*PodAllocation) DeepCopyInto added in v1.8.10

func (in *PodAllocation) DeepCopyInto(out *PodAllocation)

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

type PodAllocationRequest added in v1.8.10

type PodAllocationRequest struct {
	// PodName is the name of the pod
	PodName string `json:"podName"`
	// PodNamespace is the namespace of the pod
	PodNamespace string `json:"podNamespace"`
	// MTPNC is the name of the MultitenantPodNetworkConfig
	MTPNC string `json:"mtpnc"`
}

PodAllocationRequest represents a pod's IP allocation request on this NIC

func (*PodAllocationRequest) DeepCopy added in v1.8.10

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

func (*PodAllocationRequest) DeepCopyInto added in v1.8.10

func (in *PodAllocationRequest) DeepCopyInto(out *PodAllocationRequest)

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

type PodNetwork

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

	Spec   PodNetworkSpec   `json:"spec,omitempty"`
	Status PodNetworkStatus `json:"status,omitempty"`
}

PodNetwork is the Schema for the PodNetworks API +kubebuilder:resource:shortName=pn,scope=Cluster +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Status",type=string,priority=1,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Address Prefixes",type=string,priority=1,JSONPath=`.status.addressPrefixes` +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.networkID` +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.spec.subnetResourceID` +kubebuilder:printcolumn:name="SubnetGUID",type=string,priority=1,JSONPath=`.spec.subnetGUID` +kubebuilder:printcolumn:name="DeviceType",type=string,priority=1,JSONPath=`.spec.deviceType` +kubebuilder:validation:XValidation:rule="!has(self.status) || !has(self.status.prefixBlockCIDRLength) || self.status.prefixBlockCIDRLength == 0 || (has(self.spec) && self.spec.subnetAllocationMode == 'PrefixBlock')",message="prefixBlockCIDRLength can only be non-zero when subnetAllocationMode is PrefixBlock"

func (*PodNetwork) DeepCopy

func (in *PodNetwork) DeepCopy() *PodNetwork

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

func (*PodNetwork) DeepCopyInto

func (in *PodNetwork) DeepCopyInto(out *PodNetwork)

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

func (*PodNetwork) DeepCopyObject

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

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

type PodNetworkConfig

type PodNetworkConfig struct {
	// PodNetwork is the name of a PodNetwork resource
	PodNetwork string `json:"podNetwork"`
	// PodIPReservationSize is the number of IP address to statically reserve
	// +kubebuilder:default=0
	PodIPReservationSize int `json:"podIPReservationSize,omitempty"`
	// IPConstraint specifies criteria for selecting IP address from the PodNetwork's subnet.
	// Must be a valid IPv4 cidr with /32 prefix.
	// This is an optional field.
	// Example: 192.168.0.1/32
	// +kubebuilder:default=""
	// +kubebuilder:validation:MaxLength=18
	// +kubebuilder:validation:Pattern=`^$|^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.){3}(25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\/32$`
	IPConstraint string `json:"ipConstraint,omitempty"`
}

PodNetworkConfig describes a template for how to attach a PodNetwork to a Pod +kubebuilder:validation:XValidation:rule="size(self.ipConstraint) == 0 || self.podIPReservationSize == 1",message="ipConstraint can only be specified when podIPReservationSize is 1"

func (*PodNetworkConfig) DeepCopy

func (in *PodNetworkConfig) DeepCopy() *PodNetworkConfig

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

func (*PodNetworkConfig) DeepCopyInto

func (in *PodNetworkConfig) DeepCopyInto(out *PodNetworkConfig)

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

type PodNetworkInstance

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

	Spec   PodNetworkInstanceSpec   `json:"spec,omitempty"`
	Status PodNetworkInstanceStatus `json:"status,omitempty"`
}

PodNetworkInstance is the Schema for the PodNetworkInstances API +kubebuilder:resource:shortName=pni,scope=Namespaced +kubebuilder:subresource:status +kubebuilder:metadata:labels=managed= +kubebuilder:metadata:labels=owner= +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`

func (*PodNetworkInstance) DeepCopy

func (in *PodNetworkInstance) DeepCopy() *PodNetworkInstance

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

func (*PodNetworkInstance) DeepCopyInto

func (in *PodNetworkInstance) DeepCopyInto(out *PodNetworkInstance)

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

func (*PodNetworkInstance) DeepCopyObject

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

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

type PodNetworkInstanceList

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

PodNetworkInstanceList contains a list of PodNetworkInstance

func (*PodNetworkInstanceList) DeepCopy

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

func (*PodNetworkInstanceList) DeepCopyInto

func (in *PodNetworkInstanceList) DeepCopyInto(out *PodNetworkInstanceList)

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

func (*PodNetworkInstanceList) DeepCopyObject

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

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

type PodNetworkInstanceSpec

type PodNetworkInstanceSpec struct {
	// Deprecated - use PodNetworkConfigs
	// +kubebuilder:validation:Optional
	PodNetwork string `json:"podnetwork,omitempty"`
	// Deprecated - use PodNetworkConfigs
	// +kubebuilder:default=0
	PodIPReservationSize int `json:"podIPReservationSize,omitempty"`
	// PodNetworkConfigs describes each PodNetwork to attach to a single Pod
	// optional for now in case orchestrator uses the deprecated fields
	// +kubebuilder:validation:Optional
	PodNetworkConfigs []PodNetworkConfig `json:"podNetworkConfigs"`
	// DefaultDenyACL bool indicates whether default deny policy will be present on the pods upon pod creation
	// +kubebuilder:default=false
	// +kubebuilder:validation:Optional
	DefaultDenyACL bool `json:"defaultDenyACL"`
}

PodNetworkInstanceSpec defines the desired state of PodNetworkInstance

func (*PodNetworkInstanceSpec) DeepCopy

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

func (*PodNetworkInstanceSpec) DeepCopyInto

func (in *PodNetworkInstanceSpec) DeepCopyInto(out *PodNetworkInstanceSpec)

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

type PodNetworkInstanceStatus

type PodNetworkInstanceStatus struct {
	// +kubebuilder:validation:Optional
	PodIPAddresses     []string             `json:"podIPAddresses,omitempty"`
	Status             PNIStatus            `json:"status,omitempty"`
	PodNetworkStatuses map[string]PNIStatus `json:"podNetworkStatuses,omitempty"`
}

PodNetworkInstanceStatus defines the observed state of PodNetworkInstance

func (*PodNetworkInstanceStatus) DeepCopy

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

func (*PodNetworkInstanceStatus) DeepCopyInto

func (in *PodNetworkInstanceStatus) DeepCopyInto(out *PodNetworkInstanceStatus)

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

type PodNetworkList

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

PodNetworkList contains a list of PodNetwork

func (*PodNetworkList) DeepCopy

func (in *PodNetworkList) DeepCopy() *PodNetworkList

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

func (*PodNetworkList) DeepCopyInto

func (in *PodNetworkList) DeepCopyInto(out *PodNetworkList)

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

func (*PodNetworkList) DeepCopyObject

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

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

type PodNetworkSpec

type PodNetworkSpec struct {
	// NetworkID is the identifier for the network, e.g. vnet guid or IB network ID
	// +kubebuilder:validation:Optional
	NetworkID string `json:"networkID,omitempty"`
	// DeviceType is the device type that is required by this network
	// +kubebuilder:validation:Optional
	DeviceType DeviceType `json:"deviceType,omitempty"`
	// customer subnet id
	// +kubebuilder:validation:Optional
	SubnetResourceID string `json:"subnetResourceID,omitempty"`
	// customer subnet guid
	// +kubebuilder:validation:Optional
	SubnetGUID string `json:"subnetGUID,omitempty"`
	// Deprecated - Use NetworkID
	// +kubebuilder:validation:Optional
	VnetGUID string `json:"vnetGUID,omitempty"`
	// SubnetAllocationMode is the mode chosen by user for subnet allocation
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=Single
	SubnetAllocationMode SubnetAllocationMode `json:"subnetAllocationMode,omitempty"`
}

PodNetworkSpec defines the desired state of PodNetwork

func (*PodNetworkSpec) DeepCopy

func (in *PodNetworkSpec) DeepCopy() *PodNetworkSpec

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

func (*PodNetworkSpec) DeepCopyInto

func (in *PodNetworkSpec) DeepCopyInto(out *PodNetworkSpec)

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

type PodNetworkStatus

type PodNetworkStatus struct {
	// +kubebuilder:validation:Optional
	Status          Status   `json:"status,omitempty"`
	AddressPrefixes []string `json:"addressPrefixes,omitempty"`
	// PrefixBlockCIDRLength indicates the prefix length of IP block allocated to the subnet.
	// It must be 0 when SubnetAllocationMode is Single, and is set to 28 by the controller
	// when SubnetAllocationMode is PrefixBlock.
	// +kubebuilder:validation:Optional
	PrefixBlockCIDRLength int `json:"prefixBlockCIDRLength,omitempty"`
}

PodNetworkStatus defines the observed state of PodNetwork

func (*PodNetworkStatus) DeepCopy

func (in *PodNetworkStatus) DeepCopy() *PodNetworkStatus

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

func (*PodNetworkStatus) DeepCopyInto

func (in *PodNetworkStatus) DeepCopyInto(out *PodNetworkStatus)

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

type Status

type Status string

Status indicates the status of PN +kubebuilder:validation:Enum=Ready;InUse;SubnetNotDelegated;SubnetDelegatedToDifferentService

const (
	Ready                             Status = "Ready"
	InUse                             Status = "InUse"
	SubnetNotDelegated                Status = "SubnetNotDelegated"
	SubnetDelegatedToDifferentService Status = "SubnetDelegatedToDifferentService"
)

type SubnetAllocationMode

type SubnetAllocationMode string

+kubebuilder:validation:Enum=Single;PrefixBlock

const (
	Single      SubnetAllocationMode = "Single"
	PrefixBlock SubnetAllocationMode = "PrefixBlock"
)

Jump to

Keyboard shortcuts

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