ipam

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Overview

Package vlan is the internal version of the API.

Index

Constants

View Source
const (
	IPClaimPlural   = "ipclaims"
	IPClaimSingular = "ipclaim"
)
View Source
const (
	IPEntryPlural   = "ipentries"
	IPEntrySingular = "ipentry"
)
View Source
const (
	IPIndexPlural   = "ipindices"
	IPIndexSingular = "ipindex"
)
View Source
const (
	GroupName = "ipam.be.kuid.dev"
	Version   = runtime.APIVersionInternal
)

Variables

View Source
var (
	IPClaimShortNames = []string{}
	IPClaimCategories = []string{"kuid", "knet"}
)
View Source
var (
	IPClaimKind     = reflect.TypeOf(IPClaim{}).Name()
	IPClaimListKind = reflect.TypeOf(IPClaimList{}).Name()
)
View Source
var (
	IPEntryShortNames = []string{}
	IPEntryCategories = []string{"kuid", "knet"}
)
View Source
var (
	IPEntryKind     = reflect.TypeOf(IPEntry{}).Name()
	IPEntryListKind = reflect.TypeOf(IPEntryList{}).Name()
)
View Source
var (
	IPIndexShortNames = []string{}
	IPIndexCategories = []string{"kuid", "knet"}
)
View Source
var (
	IPIndexKind     = reflect.TypeOf(IPIndex{}).Name()
	IPIndexListKind = reflect.TypeOf(IPIndexList{}).Name()
)
View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

Functions

func Kind

func Kind(kind string) schema.GroupKind

func NewChoreoClaimInvoker

func NewChoreoClaimInvoker(be backend.Backend) options.BackendInvoker

func NewChoreoIndexInvoker

func NewChoreoIndexInvoker(be backend.Backend) options.BackendInvoker

func Resource

func Resource(resource string) schema.GroupResource

Types

type IPClaim

type IPClaim struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Spec   IPClaimSpec   `json:"spec,omitempty" yaml:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	Status IPClaimStatus `json:"status,omitempty" yaml:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:resource:categories={kuid} IPClaim is the Schema for the ipclaim API

func BuildIPClaim

func BuildIPClaim(meta metav1.ObjectMeta, spec *IPClaimSpec, status *IPClaimStatus) *IPClaim

BuildIPClaim returns a reource from a client Object a Spec/Status

func (*IPClaim) DeepCopy

func (in *IPClaim) DeepCopy() *IPClaim

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

func (*IPClaim) DeepCopyInto

func (in *IPClaim) DeepCopyInto(out *IPClaim)

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

func (*IPClaim) DeepCopyObject

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

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

func (*IPClaim) FieldLabelConversion

func (r *IPClaim) FieldLabelConversion() runtime.FieldLabelConversionFunc

FieldLabelConversion is the schema conversion function for normalizing the FieldSelector for the resource

func (*IPClaim) FieldSelector

func (r *IPClaim) FieldSelector() func(ctx context.Context, fieldSelector fields.Selector) (resource.Filter, error)

func (IPClaim) GetCategories

func (IPClaim) GetCategories() []string

GetCategories return the categories of the resource GetCategories implements resource.Object

func (*IPClaim) GetClaimLabels

func (r *IPClaim) GetClaimLabels() labels.Set

func (*IPClaim) GetClaimRequest

func (r *IPClaim) GetClaimRequest() string

func (*IPClaim) GetClaimResponse

func (r *IPClaim) GetClaimResponse() string

func (*IPClaim) GetCondition

func (r *IPClaim) GetCondition(t condition.ConditionType) condition.Condition

GetCondition returns the condition based on the condition kind

func (*IPClaim) GetDefaultGatewayLabelSelector

func (r *IPClaim) GetDefaultGatewayLabelSelector(subnetString string) (labels.Selector, error)

GetGatewayLabelSelector returns a label selector to select the gateway of the claim in the backend

func (IPClaim) GetGroupVersionResource

func (IPClaim) GetGroupVersionResource() schema.GroupVersionResource

func (*IPClaim) GetIPClaimSummaryType

func (r *IPClaim) GetIPClaimSummaryType() IPClaimSummaryType

func (*IPClaim) GetIPClaimType

func (r *IPClaim) GetIPClaimType() (IPClaimType, error)

func (*IPClaim) GetIPPrefixType

func (r *IPClaim) GetIPPrefixType() IPPrefixType

func (*IPClaim) GetIndex

func (r *IPClaim) GetIndex() string

func (*IPClaim) GetKey

func (r *IPClaim) GetKey() store.Key

func (*IPClaim) GetLabelSelector

func (r *IPClaim) GetLabelSelector() (labels.Selector, error)

func (*IPClaim) GetNamespacedName

func (r *IPClaim) GetNamespacedName() types.NamespacedName

func (*IPClaim) GetObjectMeta

func (r *IPClaim) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta implements resource.Object GetObjectMeta implements resource.Object

func (*IPClaim) GetOwnerSelector

func (r *IPClaim) GetOwnerSelector() (labels.Selector, error)

GetOwnerSelector selects the route based on the name of the claim

func (*IPClaim) GetSelector

func (r *IPClaim) GetSelector() *metav1.LabelSelector

func (IPClaim) GetShortNames

func (IPClaim) GetShortNames() []string

GetShortNames returns the shortnames for the resource GetShortNames implements resource.Object

func (IPClaim) GetSingularName

func (IPClaim) GetSingularName() string

GetSingularName returns the singular name of the resource GetSingularName implements resource.Object

func (*IPClaim) GetStatus

func (r *IPClaim) GetStatus() resource.StatusSubResource

GetStatus return the resource.StatusSubResource interface

func (*IPClaim) IsEqual

func (r *IPClaim) IsEqual(ctx context.Context, obj, old runtime.Object) bool

IsEqual returns a bool indicating if the desired state of both resources is equal or not

func (*IPClaim) IsOwnedByIPIndex

func (r *IPClaim) IsOwnedByIPIndex() bool

IsOwnedByIPIndex returns true if the owner is the IPIndex

func (*IPClaim) IsStatusEqual

func (r *IPClaim) IsStatusEqual(ctx context.Context, obj, old runtime.Object) bool

IsStatusEqual returns a bool indicating if the status of both resources is equal or not

func (IPClaim) IsStorageVersion

func (IPClaim) IsStorageVersion() bool

IsStorageVersion returns true -- Config is used VLAN the internal version. IsStorageVersion implements resource.Object

func (IPClaim) NamespaceScoped

func (IPClaim) NamespaceScoped() bool

NamespaceScoped returns true to indicate Fortune is a namespaced resource. NamespaceScoped implements resource.Object

func (IPClaim) New

func (IPClaim) New() runtime.Object

New return an empty resource New implements resource.Object

func (IPClaim) NewList

func (IPClaim) NewList() runtime.Object

NewList return an empty resourceList NewList implements resource.Object

func (*IPClaim) PrepareForCreate

func (r *IPClaim) PrepareForCreate(ctx context.Context, obj runtime.Object)

func (*IPClaim) PrepareForStatusUpdate

func (r *IPClaim) PrepareForStatusUpdate(ctx context.Context, obj, old runtime.Object)

PrepareForStatusUpdate prepares the status update

func (*IPClaim) PrepareForUpdate

func (r *IPClaim) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)

func (*IPClaim) SetConditions

func (r *IPClaim) SetConditions(c ...condition.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

func (*IPClaim) TableConvertor

func (r *IPClaim) TableConvertor() func(gr schema.GroupResource) rest.TableConvertor

TableConvertor return the table format of the resource

func (*IPClaim) ValidateCreate

func (r *IPClaim) ValidateCreate(ctx context.Context, obj runtime.Object) field.ErrorList

ValidateCreate statically validates

func (*IPClaim) ValidateOwner

func (r *IPClaim) ValidateOwner(labels labels.Set) error

func (*IPClaim) ValidateStatusUpdate

func (r *IPClaim) ValidateStatusUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList

ValidateStatusUpdate validates status updates

func (*IPClaim) ValidateSyntax

func (r *IPClaim) ValidateSyntax(s string) field.ErrorList

func (*IPClaim) ValidateUpdate

func (r *IPClaim) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList

type IPClaimFilter

type IPClaimFilter struct {
	// Name filters by the name of the objects
	Name string `protobuf:"bytes,1,opt,name=name"`

	// Namespace filters by the namespace of the objects
	Namespace string `protobuf:"bytes,2,opt,name=namespace"`
}

func (*IPClaimFilter) DeepCopy

func (in *IPClaimFilter) DeepCopy() *IPClaimFilter

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

func (*IPClaimFilter) DeepCopyInto

func (in *IPClaimFilter) DeepCopyInto(out *IPClaimFilter)

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

func (*IPClaimFilter) Filter

func (r *IPClaimFilter) Filter(ctx context.Context, obj runtime.Object) bool

type IPClaimList

type IPClaimList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Items           []IPClaim `json:"items" yaml:"items" protobuf:"bytes,2,rep,name=items"`
}

IPClaimList contains a list of IPClaims +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*IPClaimList) DeepCopy

func (in *IPClaimList) DeepCopy() *IPClaimList

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

func (*IPClaimList) DeepCopyInto

func (in *IPClaimList) DeepCopyInto(out *IPClaimList)

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

func (*IPClaimList) DeepCopyObject

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

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

func (*IPClaimList) GetListMeta

func (r *IPClaimList) GetListMeta() *metav1.ListMeta

GetListMeta returns the ListMeta GetListMeta implements the resource.ObjectList

type IPClaimSpec

type IPClaimSpec struct {
	// Index defines the index for the IP Entry
	Index string `json:"index" yaml:"index" protobuf:"bytes,1,opt,name=index"`
	// PrefixType defines the prefixtype of IPEntry; for address and range claims this is not relevant
	// - network kind is used for physical, virtual nics on a device
	// - pool kind is used for allocating dedicated IP addresses
	// - aggregate kind is used for claiming an aggregate prefix; only used for networkInstance prefixes
	// +kubebuilder:validation:Enum=`network`;`aggregate`;`pool`;
	// +optional
	PrefixType *IPPrefixType `json:"prefixType,omitempty" yaml:"prefixType,omitempty" protobuf:"bytes,2,opt,name=prefixType"`
	// Prefix defines the prefix for the IP claim
	// +optional
	Prefix *string `json:"prefix,omitempty" yaml:"prefix,omitempty" protobuf:"bytes,3,opt,name=prefix"`
	// Address defines the address for the IP claim
	// +optional
	Address *string `json:"address,omitempty" yaml:"address,omitempty" protobuf:"bytes,4,opt,name=address"`
	// Range defines the range for the IP claim
	// +optional
	Range *string `json:"range,omitempty" yaml:"range,omitempty" protobuf:"bytes,5,opt,name=range"`
	// DefaultGateway defines if the address acts as a default gateway
	// +optional
	DefaultGateway *bool `json:"defaultGateway,omitempty" yaml:"defaultGateway,omitempty" protobuf:"varint,6,opt,name=defaultGateway"`
	// CreatePrefix defines if this prefix must be created. Only used for dynamic prefixes
	// e.g. non /32 ipv4 and non /128 ipv6 prefixes
	// +optional
	CreatePrefix *bool `json:"createPrefix,omitempty" yaml:"createPrefix,omitempty" protobuf:"varint,7,opt,name=createPrefix"`
	// PrefixLength defines the prefix length for the IP Claim, Must be set when CreatePrefic is set
	// If not present we use assume /32 for ipv4 and /128 for ipv6
	// +optional
	PrefixLength *uint32 `json:"prefixLength,omitempty" yaml:"prefixLength,omitempty" protobuf:"varint,8,opt,name=prefixLength"`
	// AddressFamily defines the address family for the IP claim
	// +kubebuilder:validation:Enum=`ipv4`;`ipv6`
	// +kubebuilder:validation:Optional
	// +optional
	AddressFamily *iputil.AddressFamily `json:"addressFamily,omitempty" yaml:"addressFamily,omitempty" protobuf:"bytes,9,opt,name=addressFamily"`
	// Index defines the index of the IP Claim, used to get a deterministic IP from a prefix
	// If not present we claim a random prefix from a prefix
	// +kubebuilder:validation:Optional
	// +optional
	Idx *uint32 `json:"idx,omitempty" yaml:"idx,omitempty" protobuf:"varint,10,opt,name=idx"`
	// ClaimLabels define the user defined labels and selector labels used
	// in resource claim
	common.ClaimLabels `json:",inline" yaml:",inline" protobuf:"bytes,11,opt,name=claimLabels"`
}

IPClaimSpec defines the desired state of IPClaim

func (*IPClaimSpec) DeepCopy

func (in *IPClaimSpec) DeepCopy() *IPClaimSpec

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

func (*IPClaimSpec) DeepCopyInto

func (in *IPClaimSpec) DeepCopyInto(out *IPClaimSpec)

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

type IPClaimStatus

type IPClaimStatus struct {
	// ConditionedStatus provides the status of the IPClain using conditions
	// - a ready condition indicates the overall status of the resource
	condition.ConditionedStatus `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"`
	// Range defines the range, claimed through the IPAM backend
	// +optional
	Range *string `json:"range,omitempty" yaml:"range,omitempty" protobuf:"bytes,2,opt,name=range"`
	// Address defines the address, claimed through the IPAM backend
	// +optional
	Address *string `json:"address,omitempty" yaml:"address,omitempty" protobuf:"bytes,3,opt,name=address"`
	// Prefix defines the prefix, claimed through the IPAM backend
	// +optional
	Prefix *string `json:"prefix,omitempty" yaml:"prefix,omitempty" protobuf:"bytes,4,opt,name=prefix"`
	// DefaultGateway defines the default gateway IP for the claimed prefix
	// DefaultGateway is only relevant for prefix kind = network
	// +optional
	DefaultGateway *string `json:"defaultGateway,omitempty" yaml:"defaultGateway,omitempty" protobuf:"bytes,5,opt,name=defaultGateway"`
	// ExpiryTime defines when the claim expires
	// +kubebuilder:validation:Optional
	// +optional
	ExpiryTime *string `json:"expiryTime,omitempty" yaml:"expiryTime,omitempty" protobuf:"bytes,6,opt,name=expiryTime"`
}

IPClaimStatus defines the observed state of IPClaim

func (IPClaimStatus) CopyTo

CopyTo copies the content of the status subresource to a parent resource. CopyTo implements the resource.StatusSubResource

func (*IPClaimStatus) DeepCopy

func (in *IPClaimStatus) DeepCopy() *IPClaimStatus

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

func (*IPClaimStatus) DeepCopyInto

func (in *IPClaimStatus) DeepCopyInto(out *IPClaimStatus)

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

func (IPClaimStatus) SubResourceName

func (IPClaimStatus) SubResourceName() string

SubResourceName resturns the name of the subresource SubResourceName implements the resource.StatusSubResource

type IPClaimSummaryType

type IPClaimSummaryType string
const (
	IPClaimSummaryType_Prefix  IPClaimSummaryType = "prefix"
	IPClaimSummaryType_Address IPClaimSummaryType = "address"
	IPClaimSummaryType_Range   IPClaimSummaryType = "range"
	IPClaimSummaryType_Invalid IPClaimSummaryType = "invalid"
)

func GetIPClaimSummaryTypeFromString

func GetIPClaimSummaryTypeFromString(s string) IPClaimSummaryType

type IPClaimType

type IPClaimType string
const (
	IPClaimType_Invalid        IPClaimType = "invalid"
	IPClaimType_StaticAddress  IPClaimType = "staticAddress"
	IPClaimType_StaticPrefix   IPClaimType = "staticPrefix"
	IPClaimType_StaticRange    IPClaimType = "staticRange"
	IPClaimType_DynamicAddress IPClaimType = "dynamicAddress"
	IPClaimType_DynamicPrefix  IPClaimType = "dynamicPrefix"
)

func GetIPClaimTypeFromString

func GetIPClaimTypeFromString(s string) IPClaimType

type IPEntry

type IPEntry struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Spec   IPEntrySpec   `json:"spec,omitempty" yaml:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	Status IPEntryStatus `json:"status,omitempty" yaml:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:resource:categories={kuid} IPEntry is the Schema for the ipentry API

func BuildIPEntry

func BuildIPEntry(meta metav1.ObjectMeta, spec *IPEntrySpec, status *IPEntryStatus) *IPEntry

BuildIPEntry returns a reource from a client Object a Spec/Status

func GetIPEntry

func GetIPEntry(ctx context.Context, k store.Key, rangeName string, prefix netip.Prefix, labels map[string]string) *IPEntry

func IPEntryFromRuntime

func IPEntryFromRuntime(ru runtime.Object) (*IPEntry, error)

func (*IPEntry) DeepCopy

func (in *IPEntry) DeepCopy() *IPEntry

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

func (*IPEntry) DeepCopyInto

func (in *IPEntry) DeepCopyInto(out *IPEntry)

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

func (*IPEntry) DeepCopyObject

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

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

func (*IPEntry) FieldLabelConversion

func (r *IPEntry) FieldLabelConversion() runtime.FieldLabelConversionFunc

FieldLabelConversion is the schema conversion function for normalizing the FieldSelector for the resource

func (*IPEntry) FieldSelector

func (r *IPEntry) FieldSelector() func(ctx context.Context, fieldSelector fields.Selector) (resource.Filter, error)

func (IPEntry) GetCategories

func (IPEntry) GetCategories() []string

GetCategories return the categories of the resource GetCategories implements resource.Object

func (*IPEntry) GetClaimSummaryType

func (r *IPEntry) GetClaimSummaryType() IPClaimSummaryType

func (*IPEntry) GetCondition

func (r *IPEntry) GetCondition(t condition.ConditionType) condition.Condition

GetCondition returns the condition based on the condition kind

func (IPEntry) GetGroupVersionResource

func (IPEntry) GetGroupVersionResource() schema.GroupVersionResource

func (*IPEntry) GetIPPrefix

func (r *IPEntry) GetIPPrefix() string

func (*IPEntry) GetIPPrefixType

func (r *IPEntry) GetIPPrefixType() IPPrefixType

func (*IPEntry) GetIndex

func (r *IPEntry) GetIndex() string

func (*IPEntry) GetKey

func (r *IPEntry) GetKey() store.Key

func (*IPEntry) GetNamespacedName

func (r *IPEntry) GetNamespacedName() types.NamespacedName

func (*IPEntry) GetObjectMeta

func (r *IPEntry) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta implements resource.Object GetObjectMeta implements resource.Object

func (IPEntry) GetShortNames

func (IPEntry) GetShortNames() []string

GetShortNames returns the shortnames for the resource GetShortNames implements resource.Object

func (IPEntry) GetSingularName

func (IPEntry) GetSingularName() string

GetSingularName returns the singular name of the resource GetSingularName implements resource.Object

func (*IPEntry) GetSpecID

func (r *IPEntry) GetSpecID() string

func (*IPEntry) GetStatus

func (r *IPEntry) GetStatus() resource.StatusSubResource

GetStatus return the resource.StatusSubResource interface

func (*IPEntry) IsEqual

func (r *IPEntry) IsEqual(ctx context.Context, obj, old runtime.Object) bool

IsEqual returns a bool indicating if the desired state of both resources is equal or not

func (*IPEntry) IsStatusEqual

func (r *IPEntry) IsStatusEqual(ctx context.Context, obj, old runtime.Object) bool

IsStatusEqual returns a bool indicating if the status of both resources is equal or not

func (IPEntry) IsStorageVersion

func (IPEntry) IsStorageVersion() bool

IsStorageVersion returns true -- Config is used as the internal version. IsStorageVersion implements resource.Object

func (IPEntry) NamespaceScoped

func (IPEntry) NamespaceScoped() bool

NamespaceScoped returns true to indicate Fortune is a namespaced resource. NamespaceScoped implements resource.Object

func (IPEntry) New

func (IPEntry) New() runtime.Object

New return an empty resource New implements resource.Object

func (IPEntry) NewList

func (IPEntry) NewList() runtime.Object

NewList return an empty resourceList NewList implements resource.Object

func (*IPEntry) PrepareForCreate

func (r *IPEntry) PrepareForCreate(ctx context.Context, obj runtime.Object)

func (*IPEntry) PrepareForStatusUpdate

func (r *IPEntry) PrepareForStatusUpdate(ctx context.Context, obj, old runtime.Object)

PrepareForStatusUpdate prepares the status update

func (*IPEntry) PrepareForUpdate

func (r *IPEntry) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)

func (*IPEntry) SetConditions

func (r *IPEntry) SetConditions(c ...condition.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

func (*IPEntry) TableConvertor

func (r *IPEntry) TableConvertor() func(gr schema.GroupResource) rest.TableConvertor

TableConvertor return the table format of the resource

func (*IPEntry) ValidateCreate

func (r *IPEntry) ValidateCreate(ctx context.Context, obj runtime.Object) field.ErrorList

ValidateCreate statically validates

func (*IPEntry) ValidateStatusUpdate

func (r *IPEntry) ValidateStatusUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList

ValidateStatusUpdate validates status updates

func (*IPEntry) ValidateSyntax

func (r *IPEntry) ValidateSyntax(s string) field.ErrorList

func (*IPEntry) ValidateUpdate

func (r *IPEntry) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList

type IPEntryFilter

type IPEntryFilter struct {
	// Name filters by the name of the objects
	Name string `protobuf:"bytes,1,opt,name=name"`

	// Namespace filters by the namespace of the objects
	Namespace string `protobuf:"bytes,2,opt,name=namespace"`
}

func (*IPEntryFilter) DeepCopy

func (in *IPEntryFilter) DeepCopy() *IPEntryFilter

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

func (*IPEntryFilter) DeepCopyInto

func (in *IPEntryFilter) DeepCopyInto(out *IPEntryFilter)

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

func (*IPEntryFilter) Filter

func (r *IPEntryFilter) Filter(ctx context.Context, obj runtime.Object) bool

type IPEntryList

type IPEntryList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Items           []IPEntry `json:"items" yaml:"items" protobuf:"bytes,2,rep,name=items"`
}

IPEntryList contains a list of IPEntries +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*IPEntryList) DeepCopy

func (in *IPEntryList) DeepCopy() *IPEntryList

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

func (*IPEntryList) DeepCopyInto

func (in *IPEntryList) DeepCopyInto(out *IPEntryList)

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

func (*IPEntryList) DeepCopyObject

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

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

func (*IPEntryList) GetListMeta

func (r *IPEntryList) GetListMeta() *metav1.ListMeta

GetListMeta returns the ListMeta GetListMeta implements the resource.ObjectList

type IPEntrySpec

type IPEntrySpec struct {
	// Index defines the index for the IP Entry
	Index string `json:"index" yaml:"index" protobuf:"bytes,1,opt,name=index"`
	// IndexEntry identifies if the entry is originated from an IP Index
	IndexEntry bool `json:"indexEntry" yaml:"indexEntry" protobuf:"bytes,2,opt,name=indexEntry"`
	// PrefixType defines the prefixtype of IPEntry; for address and range claims this is not relevant
	// - network kind is used for physical, virtual nics on a device
	// - pool kind is used for allocating dedicated IP addresses
	// - aggregate kind is used for claiming an aggregate prefix; only used for networkInstance prefixes
	// +kubebuilder:validation:Enum=`network`;`aggregate`;`pool`;
	// +optional
	PrefixType *IPPrefixType `json:"prefixType,omitempty" yaml:"prefixType,omitempty" protobuf:"bytes,3,opt,name=prefixType"`
	// ClaimType defines the claimType of the IP Entry
	// +kubebuilder:validation:Enum=`staticAddress`;`staticPrefix`;`staticRange`;`dynamicPrefix`;`dynamicAddress`;
	ClaimType IPClaimType `json:"claimType,omitempty" yaml:"claimType,omitempty" protobuf:"bytes,4,opt,name=claimType"`
	// Prefix defines the prefix for the IP entry; which can be an expanded prefix from the prefix, range or address
	Prefix string `json:"prefix" yaml:"prefix" protobuf:"bytes,5,opt,name=prefix"`
	// DefaultGateway defines if the address acts as a default gateway
	// +optional
	DefaultGateway *bool `json:"defaultGateway,omitempty" yaml:"defaultGateway,omitempty" protobuf:"varint,6,opt,name=defaultGateway"`
	// AddressFamily defines the address family for the IP claim
	// +kubebuilder:validation:Enum=`ipv4`;`ipv6`
	// +kubebuilder:validation:Optional
	// +optional
	AddressFamily *iputil.AddressFamily `json:"addressFamily,omitempty" yaml:"addressFamily,omitempty" protobuf:"bytes,7,opt,name=addressFamily"`
	// UserDefinedLabels define the user defined labels
	common.UserDefinedLabels `json:",inline" yaml:",inline" protobuf:"bytes,8,opt,name=userDefinedLabels"`
}

IPEntrySpec defines the desired state of IPEntry

func (*IPEntrySpec) DeepCopy

func (in *IPEntrySpec) DeepCopy() *IPEntrySpec

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

func (*IPEntrySpec) DeepCopyInto

func (in *IPEntrySpec) DeepCopyInto(out *IPEntrySpec)

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

type IPEntryStatus

type IPEntryStatus struct {
	// ConditionedStatus provides the status of the IPClain using conditions
	// - a ready condition indicates the overall status of the resource
	condition.ConditionedStatus `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"`
}

IPEntryStatus defines the observed state of IPEntry

func (IPEntryStatus) CopyTo

CopyTo copies the content of the status subresource to a parent resource. CopyTo implements the resource.StatusSubResource

func (*IPEntryStatus) DeepCopy

func (in *IPEntryStatus) DeepCopy() *IPEntryStatus

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

func (*IPEntryStatus) DeepCopyInto

func (in *IPEntryStatus) DeepCopyInto(out *IPEntryStatus)

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

func (IPEntryStatus) SubResourceName

func (IPEntryStatus) SubResourceName() string

SubResourceName resturns the name of the subresource SubResourceName implements the resource.StatusSubResource

type IPIndex

type IPIndex struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Spec   IPIndexSpec   `json:"spec,omitempty" yaml:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	Status IPIndexStatus `json:"status,omitempty" yaml:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:resource:categories={kuid} IPIndex is the Schema for the IPIndex API

func BuildIPIndex

func BuildIPIndex(meta metav1.ObjectMeta, spec *IPIndexSpec, status *IPIndexStatus) *IPIndex

BuildIPClaim returns a reource from a client Object a Spec/Status

func (*IPIndex) DeepCopy

func (in *IPIndex) DeepCopy() *IPIndex

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

func (*IPIndex) DeepCopyInto

func (in *IPIndex) DeepCopyInto(out *IPIndex)

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

func (*IPIndex) DeepCopyObject

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

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

func (*IPIndex) FieldLabelConversion

func (r *IPIndex) FieldLabelConversion() runtime.FieldLabelConversionFunc

FieldLabelConversion is the schema conversion function for normalizing the FieldSelector for the resource

func (*IPIndex) FieldSelector

func (r *IPIndex) FieldSelector() func(ctx context.Context, fieldSelector fields.Selector) (resource.Filter, error)

func (IPIndex) GetCategories

func (IPIndex) GetCategories() []string

GetCategories return the categories of the resource GetCategories implements resource.Object

func (*IPIndex) GetClaim

func (r *IPIndex) GetClaim(prefix Prefix) (*IPClaim, error)

func (*IPIndex) GetClaims

func (r *IPIndex) GetClaims() ([]*IPClaim, error)

func (*IPIndex) GetCondition

func (r *IPIndex) GetCondition(t condition.ConditionType) condition.Condition

GetCondition returns the condition based on the condition kind

func (IPIndex) GetGroupVersionResource

func (IPIndex) GetGroupVersionResource() schema.GroupVersionResource

func (*IPIndex) GetKey

func (r *IPIndex) GetKey() store.Key

func (*IPIndex) GetNamespacedName

func (r *IPIndex) GetNamespacedName() types.NamespacedName

func (*IPIndex) GetObjectMeta

func (r *IPIndex) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta implements resource.Object GetObjectMeta implements resource.Object

func (IPIndex) GetShortNames

func (IPIndex) GetShortNames() []string

GetShortNames returns the shortnames for the resource GetShortNames implements resource.Object

func (IPIndex) GetSingularName

func (IPIndex) GetSingularName() string

GetSingularName returns the singular name of the resource GetSingularName implements resource.Object

func (*IPIndex) GetStatus

func (r *IPIndex) GetStatus() resource.StatusSubResource

GetStatus return the resource.StatusSubResource interface

func (*IPIndex) IsEqual

func (r *IPIndex) IsEqual(ctx context.Context, obj, old runtime.Object) bool

IsEqual returns a bool indicating if the desired state of both resources is equal or not

func (*IPIndex) IsStatusEqual

func (r *IPIndex) IsStatusEqual(ctx context.Context, obj, old runtime.Object) bool

IsStatusEqual returns a bool indicating if the status of both resources is equal or not

func (IPIndex) IsStorageVersion

func (IPIndex) IsStorageVersion() bool

IsStorageVersion returns true -- Config is used as the internal version. IsStorageVersion implements resource.Object

func (IPIndex) NamespaceScoped

func (IPIndex) NamespaceScoped() bool

NamespaceScoped returns true to indicate Fortune is a namespaced resource. NamespaceScoped implements resource.Object

func (IPIndex) New

func (IPIndex) New() runtime.Object

New return an empty resource New implements resource.Object

func (IPIndex) NewList

func (IPIndex) NewList() runtime.Object

NewList return an empty resourceList NewList implements resource.Object

func (*IPIndex) PrepareForCreate

func (r *IPIndex) PrepareForCreate(ctx context.Context, obj runtime.Object)

func (*IPIndex) PrepareForStatusUpdate

func (r *IPIndex) PrepareForStatusUpdate(ctx context.Context, obj, old runtime.Object)

PrepareForStatusUpdate prepares the status update

func (*IPIndex) PrepareForUpdate

func (r *IPIndex) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)

func (*IPIndex) SetConditions

func (r *IPIndex) SetConditions(c ...condition.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

func (*IPIndex) TableConvertor

func (r *IPIndex) TableConvertor() func(gr schema.GroupResource) rest.TableConvertor

TableConvertor return the table format of the resource

func (*IPIndex) ValidateCreate

func (r *IPIndex) ValidateCreate(ctx context.Context, obj runtime.Object) field.ErrorList

ValidateCreate statically validates

func (*IPIndex) ValidateStatusUpdate

func (r *IPIndex) ValidateStatusUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList

ValidateStatusUpdate validates status updates

func (*IPIndex) ValidateSyntax

func (r *IPIndex) ValidateSyntax(s string) field.ErrorList

func (*IPIndex) ValidateUpdate

func (r *IPIndex) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList

type IPIndexFilter

type IPIndexFilter struct {
	// Name filters by the name of the objects
	Name string `protobuf:"bytes,1,opt,name=name"`

	// Namespace filters by the namespace of the objects
	Namespace string `protobuf:"bytes,2,opt,name=namespace"`
}

func (*IPIndexFilter) DeepCopy

func (in *IPIndexFilter) DeepCopy() *IPIndexFilter

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

func (*IPIndexFilter) DeepCopyInto

func (in *IPIndexFilter) DeepCopyInto(out *IPIndexFilter)

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

func (*IPIndexFilter) Filter

func (r *IPIndexFilter) Filter(ctx context.Context, obj runtime.Object) bool

type IPIndexList

type IPIndexList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Items           []IPIndex `json:"items" yaml:"items" protobuf:"bytes,2,rep,name=items"`
}

IPIndexList contains a list of IPIndexs +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*IPIndexList) DeepCopy

func (in *IPIndexList) DeepCopy() *IPIndexList

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

func (*IPIndexList) DeepCopyInto

func (in *IPIndexList) DeepCopyInto(out *IPIndexList)

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

func (*IPIndexList) DeepCopyObject

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

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

func (*IPIndexList) GetListMeta

func (r *IPIndexList) GetListMeta() *metav1.ListMeta

GetListMeta returns the ListMeta GetListMeta implements the resource.ObjectList

type IPIndexSpec

type IPIndexSpec struct {
	// Prefixes define the aggregate prefixes for the network instance
	// A Network instance needs at least 1 prefix to be defined to become operational
	Prefixes []Prefix `json:"prefixes" yaml:"prefixes" protobuf:"bytes,1,opt,name=prefixes"`
}

IPIndexSpec defines the desired state of IPIndex

func (*IPIndexSpec) DeepCopy

func (in *IPIndexSpec) DeepCopy() *IPIndexSpec

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

func (*IPIndexSpec) DeepCopyInto

func (in *IPIndexSpec) DeepCopyInto(out *IPIndexSpec)

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

type IPIndexStatus

type IPIndexStatus struct {
	// ConditionedStatus provides the status of the IPClain using conditions
	// - a ready condition indicates the overall status of the resource
	condition.ConditionedStatus `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"`
	// Prefixes defines the prefixes, claimed through the IPAM backend
	Prefixes []Prefix `json:"prefixes,omitempty" yaml:"prefixes,omitempty" protobuf:"bytes,2,rep,name=prefixes"`
}

IPIndexStatus defines the observed state of IPIndex

func (IPIndexStatus) CopyTo

CopyTo copies the content of the status subresource to a parent resource. CopyTo implements the resource.StatusSubResource

func (*IPIndexStatus) DeepCopy

func (in *IPIndexStatus) DeepCopy() *IPIndexStatus

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

func (*IPIndexStatus) DeepCopyInto

func (in *IPIndexStatus) DeepCopyInto(out *IPIndexStatus)

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

func (IPIndexStatus) SubResourceName

func (IPIndexStatus) SubResourceName() string

SubResourceName resturns the name of the subresource SubResourceName implements the resource.StatusSubResource

type IPPrefixType

type IPPrefixType string
const (
	IPPrefixType_Invalid   IPPrefixType = "invalid"
	IPPrefixType_Other     IPPrefixType = "other"
	IPPrefixType_Pool      IPPrefixType = "pool"
	IPPrefixType_Network   IPPrefixType = "network"
	IPPrefixType_Aggregate IPPrefixType = "aggregate"
)

func GetIPPrefixTypeFromString

func GetIPPrefixTypeFromString(s string) *IPPrefixType

type Prefix

type Prefix struct {
	// Prefix defines the ip cidr in prefix notation.
	// +kubebuilder:validation:Pattern=`(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))`
	Prefix string `json:"prefix" yaml:"prefix" protobuf:"bytes,1,opt,name=prefix"`
	// PrefixType defines the prefixtype of IPIndex;
	// - network kind is used for physical, virtual nics on a device
	// - pool kind is used for allocating dedicated IP addresses
	// - aggregate kind is used for claiming an aggregate prefix; only used for networkInstance prefixes
	// +kubebuilder:validation:Enum=network;aggregate;pool;
	// +kubebuilder:default:=aggregate
	// +optional
	PrefixType *IPPrefixType `json:"prefixType,omitempty" yaml:"prefixType,omitempty" protobuf:"bytes,2,opt,name=prefixType"`
	// UserDefinedLabels define metadata to the resource.
	// defined in the spec to distingiush metadata labels from user defined labels
	common.UserDefinedLabels `json:",inline" yaml:",inline" protobuf:"bytes,2,opt,name=userDefinedLabels"`
}

func (*Prefix) DeepCopy

func (in *Prefix) DeepCopy() *Prefix

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

func (*Prefix) DeepCopyInto

func (in *Prefix) DeepCopyInto(out *Prefix)

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

type SyntaxValidator

type SyntaxValidator interface {
	Validate(claim *IPClaim) field.ErrorList
}

+kubebuilder:object:generate=false

Directories

Path Synopsis
v1alpha1 is the v1alpha1 version of the API.
v1alpha1 is the v1alpha1 version of the API.

Jump to

Keyboard shortcuts

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