v1alpha1

package
v0.0.0-...-1f6a80c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IPPoolKind is the kind of the NVIPAM IPPool CR
	IPPoolKind = "IPPool"
	// IPPoolListKind is the kind of the list related to the NVIPAM IPPool CR
	IPPoolListKind = "IPPoolList"
	// CIDRPoolKind is the kind of the NVIPAM CIDRPool CR
	CIDRPoolKind = "CIDRPool"
	// CIDRPoolListKind is the kind of the list related to the NVIPAM CIDRPool CR
	CIDRPoolListKind = "CIDRPoolList"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "nv-ipam.nvidia.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 Allocation

type Allocation struct {
	NodeName string `json:"nodeName"`
	StartIP  string `json:"startIP"`
	EndIP    string `json:"endIP"`
}

Allocation contains IP Allocation for a specific Node

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 CIDRPool

type CIDRPool struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              CIDRPoolSpec   `json:"spec"`
	Status            CIDRPoolStatus `json:"status,omitempty"`
}

CIDRPool contains configuration for CIDR pool

func (*CIDRPool) DeepCopy

func (in *CIDRPool) DeepCopy() *CIDRPool

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

func (*CIDRPool) DeepCopyInto

func (in *CIDRPool) DeepCopyInto(out *CIDRPool)

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

func (*CIDRPool) DeepCopyObject

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

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

type CIDRPoolAllocation

type CIDRPoolAllocation struct {
	// name of the node which owns this allocation
	NodeName string `json:"nodeName"`
	// gateway for the node
	Gateway string `json:"gateway,omitempty"`
	// allocated prefix
	Prefix string `json:"prefix"`
}

CIDRPoolAllocation contains prefix allocated for a specific Node

func (*CIDRPoolAllocation) DeepCopy

func (in *CIDRPoolAllocation) DeepCopy() *CIDRPoolAllocation

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

func (*CIDRPoolAllocation) DeepCopyInto

func (in *CIDRPoolAllocation) DeepCopyInto(out *CIDRPoolAllocation)

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

type CIDRPoolList

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

CIDRPoolList contains a list of CIDRPool

func (*CIDRPoolList) DeepCopy

func (in *CIDRPoolList) DeepCopy() *CIDRPoolList

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

func (*CIDRPoolList) DeepCopyInto

func (in *CIDRPoolList) DeepCopyInto(out *CIDRPoolList)

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

func (*CIDRPoolList) DeepCopyObject

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

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

type CIDRPoolSpec

type CIDRPoolSpec struct {
	// pool CIDR block which will be split to smaller prefixes(size is define in perNodeNetworkPrefix)
	// and distributed between matching nodes
	CIDR string `json:"cidr"`
	// use IP with this index from the host prefix as a gateway, skip gateway configuration if the value not set
	GatewayIndex *int32 `json:"gatewayIndex,omitempty"`
	// size of the network prefix for each host, the network defined in "cidr" field will be split to multiple networks
	// with this size.
	PerNodeNetworkPrefix int32 `json:"perNodeNetworkPrefix"`
	// contains reserved IP addresses that should not be allocated by nv-ipam
	Exclusions []ExcludeRange `json:"exclusions,omitempty"`
	// static allocations for the pool
	StaticAllocations []CIDRPoolStaticAllocation `json:"staticAllocations,omitempty"`
	// selector for nodes, if empty match all nodes
	NodeSelector *corev1.NodeSelector `json:"nodeSelector,omitempty"`
	// if true, add gateway as default gateway in the routes list
	DefaultGateway bool `json:"defaultGateway,omitempty"`
	// static routes list. The gateway used will according to the node allocation.
	Routes []Route `json:"routes,omitempty"`
}

CIDRPoolSpec contains configuration for CIDR pool

func (*CIDRPoolSpec) DeepCopy

func (in *CIDRPoolSpec) DeepCopy() *CIDRPoolSpec

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

func (*CIDRPoolSpec) DeepCopyInto

func (in *CIDRPoolSpec) DeepCopyInto(out *CIDRPoolSpec)

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

type CIDRPoolStaticAllocation

type CIDRPoolStaticAllocation struct {
	// name of the node for static allocation, can be empty in case if the prefix
	// should be preallocated without assigning it for a specific node
	NodeName string `json:"nodeName,omitempty"`
	// gateway for the node
	Gateway string `json:"gateway,omitempty"`
	// statically allocated prefix
	Prefix string `json:"prefix"`
}

CIDRPoolStaticAllocation contains static allocation for a CIDR pool

func (*CIDRPoolStaticAllocation) DeepCopy

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

func (*CIDRPoolStaticAllocation) DeepCopyInto

func (in *CIDRPoolStaticAllocation) DeepCopyInto(out *CIDRPoolStaticAllocation)

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

type CIDRPoolStatus

type CIDRPoolStatus struct {
	// prefixes allocations for Nodes
	Allocations []CIDRPoolAllocation `json:"allocations"`
}

CIDRPoolStatus contains the IP prefixes allocated to nodes

func (*CIDRPoolStatus) DeepCopy

func (in *CIDRPoolStatus) DeepCopy() *CIDRPoolStatus

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

func (*CIDRPoolStatus) DeepCopyInto

func (in *CIDRPoolStatus) DeepCopyInto(out *CIDRPoolStatus)

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

type ExcludeRange

type ExcludeRange struct {
	StartIP string `json:"startIP"`
	EndIP   string `json:"endIP"`
}

ExcludeRange contains range of IP addresses to exclude from allocation startIP and endIP are part of the ExcludeRange

func (*ExcludeRange) DeepCopy

func (in *ExcludeRange) DeepCopy() *ExcludeRange

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

func (*ExcludeRange) DeepCopyInto

func (in *ExcludeRange) DeepCopyInto(out *ExcludeRange)

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"`
	Status            IPPoolStatus `json:"status,omitempty"`
}

IPPool contains configuration for IPAM controller

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,omitempty"`
	Items           []IPPool `json:"items"`
}

IPPoolList contains a list of IPPool

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 {
	// subnet of the pool
	Subnet string `json:"subnet"`
	// amount of IPs to allocate for each node,
	// must be less than amount of available IPs in the subnet
	PerNodeBlockSize int `json:"perNodeBlockSize"`
	// contains reserved IP addresses that should not be allocated by nv-ipam
	Exclusions []ExcludeRange `json:"exclusions,omitempty"`
	// gateway for the pool
	Gateway string `json:"gateway,omitempty"`
	// selector for nodes, if empty match all nodes
	NodeSelector *corev1.NodeSelector `json:"nodeSelector,omitempty"`
	// if true, add gateway as default gateway in the routes list
	DefaultGateway bool `json:"defaultGateway,omitempty"`
	// static routes list using the gateway specified in the spec.
	Routes []Route `json:"routes,omitempty"`
}

IPPoolSpec contains configuration for IP pool

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 {
	// IP allocations for Nodes
	Allocations []Allocation `json:"allocations"`
}

IPPoolStatus contains the IP ranges allocated to nodes

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 Route

type Route struct {
	// The destination of the route, in CIDR notation
	Dst string `json:"dst"`
}

Route contains static route parameters

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.

Jump to

Keyboard shortcuts

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