v1alpha

package
v1.15.22 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha contains API Schema definitions for the acn v1alpha API group +kubebuilder:object:generate=true +groupName=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: "acn.azure.com", Version: "v1alpha"}

	// 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 AssignmentMode

type AssignmentMode string

AssignmentMode is whether we are allocated an entire block or IP by IP. +kubebuilder:validation:Enum=dynamic;static

const (
	Dynamic AssignmentMode = "dynamic"
	Static  AssignmentMode = "static"
)

type IPAssignment

type IPAssignment struct {
	Name string `json:"name,omitempty"`
	IP   string `json:"ip,omitempty"`
}

IPAssignment groups an IP address and Name. Name is a UUID set by the the IP address assigner.

func (*IPAssignment) DeepCopy

func (in *IPAssignment) DeepCopy() *IPAssignment

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

func (*IPAssignment) DeepCopyInto

func (in *IPAssignment) DeepCopyInto(out *IPAssignment)

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

type NCStatus

type NCStatus string

NCStatus indicates the latest NC request status +kubebuilder:validation:Enum=NCUpdateSubnetFullError;NCUpdateInternalServerError;NCUpdateUnauthorizedError;NCUpdateSuccess;NCUpdateFailed +kubebuilder:validation:Optional

const (
	NCUpdateSubnetFull          NCStatus = "NCUpdateSubnetFullError"
	NCUpdateInternalServerError NCStatus = "NCUpdateInternalServerError"
	NCUpdateUnauthorizedError   NCStatus = "NCUpdateUnauthorizedError"
	NCUpdateSuccess             NCStatus = "NCUpdateSuccess"
	NCUpdateFailed              NCStatus = "NCUpdateFailed"
)

type NCType

type NCType string

NCType is the specific type of network this NC represents.

const (
	VNET      NCType = "vnet"
	VNETBlock NCType = "vnetblock"
	Overlay   NCType = "overlay"
)

type NetworkContainer

type NetworkContainer struct {
	ID string `json:"id,omitempty"`
	// +kubebuilder:default=dynamic
	AssignmentMode AssignmentMode `json:"assignmentMode,omitempty"`
	// +kubebuilder:default=vnet
	Type               NCType         `json:"type,omitempty"`
	PrimaryIP          string         `json:"primaryIP,omitempty"`
	SubnetName         string         `json:"subnetName,omitempty"`
	IPAssignments      []IPAssignment `json:"ipAssignments,omitempty"`
	DefaultGateway     string         `json:"defaultGateway,omitempty"`
	SubnetAddressSpace string         `json:"subnetAddressSpace,omitempty"`
	// +kubebuilder:default=0
	// +kubebuilder:validation:Optional
	Version         int64    `json:"version"`
	NodeIP          string   `json:"nodeIP,omitempty"`
	SubscriptionID  string   `json:"subcriptionID,omitempty"`
	ResourceGroupID string   `json:"resourceGroupID,omitempty"`
	VNETID          string   `json:"vnetID,omitempty"`
	SubnetID        string   `json:"subnetID,omitempty"`
	Status          NCStatus `json:"status,omitempty"`
}

NetworkContainer defines the structure of a Network Container as found in NetworkConfigStatus

func (*NetworkContainer) DeepCopy

func (in *NetworkContainer) DeepCopy() *NetworkContainer

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

func (*NetworkContainer) DeepCopyInto

func (in *NetworkContainer) DeepCopyInto(out *NetworkContainer)

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

type NodeNetworkConfig

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

	Spec   NodeNetworkConfigSpec   `json:"spec,omitempty"`
	Status NodeNetworkConfigStatus `json:"status,omitempty"`
}

NodeNetworkConfig is the Schema for the nodenetworkconfigs API +kubebuilder:resource:scope=Namespaced +kubebuilder:resource:shortName=nnc +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Requested IPs",type=integer,priority=1,JSONPath=`.spec.requestedIPCount` +kubebuilder:printcolumn:name="Allocated IPs",type=integer,priority=0,JSONPath=`.status.assignedIPCount` +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.status.networkContainers[*].subnetName` +kubebuilder:printcolumn:name="Subnet CIDR",type=string,priority=1,JSONPath=`.status.networkContainers[*].subnetAddressSpace` +kubebuilder:printcolumn:name="NC ID",type=string,priority=1,JSONPath=`.status.networkContainers[*].id` +kubebuilder:printcolumn:name="NC Mode",type=string,priority=0,JSONPath=`.status.networkContainers[*].assignmentMode` +kubebuilder:printcolumn:name="NC Type",type=string,priority=1,JSONPath=`.status.networkContainers[*].type` +kubebuilder:printcolumn:name="NC Version",type=integer,priority=0,JSONPath=`.status.networkContainers[*].version`

func (*NodeNetworkConfig) DeepCopy

func (in *NodeNetworkConfig) DeepCopy() *NodeNetworkConfig

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

func (*NodeNetworkConfig) DeepCopyInto

func (in *NodeNetworkConfig) DeepCopyInto(out *NodeNetworkConfig)

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

func (*NodeNetworkConfig) DeepCopyObject

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

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

type NodeNetworkConfigList

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

NodeNetworkConfigList contains a list of NetworkConfig

func (*NodeNetworkConfigList) DeepCopy

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

func (*NodeNetworkConfigList) DeepCopyInto

func (in *NodeNetworkConfigList) DeepCopyInto(out *NodeNetworkConfigList)

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

func (*NodeNetworkConfigList) DeepCopyObject

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

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

type NodeNetworkConfigSpec

type NodeNetworkConfigSpec struct {
	// +kubebuilder:default=0
	// +kubebuilder:validation:Optional
	RequestedIPCount int64    `json:"requestedIPCount"`
	IPsNotInUse      []string `json:"ipsNotInUse,omitempty"`
}

NodeNetworkConfigSpec defines the desired state of NetworkConfig

func (*NodeNetworkConfigSpec) DeepCopy

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

func (*NodeNetworkConfigSpec) DeepCopyInto

func (in *NodeNetworkConfigSpec) DeepCopyInto(out *NodeNetworkConfigSpec)

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

type NodeNetworkConfigStatus

type NodeNetworkConfigStatus struct {
	// +kubebuilder:default=0
	// +kubebuilder:validation:Optional
	AssignedIPCount   int                `json:"assignedIPCount"`
	Scaler            Scaler             `json:"scaler,omitempty"`
	Status            Status             `json:"status,omitempty"`
	NetworkContainers []NetworkContainer `json:"networkContainers,omitempty"`
}

NodeNetworkConfigStatus defines the observed state of NetworkConfig

func (*NodeNetworkConfigStatus) DeepCopy

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

func (*NodeNetworkConfigStatus) DeepCopyInto

func (in *NodeNetworkConfigStatus) DeepCopyInto(out *NodeNetworkConfigStatus)

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

type Scaler

type Scaler struct {
	BatchSize               int64 `json:"batchSize,omitempty"`
	ReleaseThresholdPercent int64 `json:"releaseThresholdPercent,omitempty"`
	RequestThresholdPercent int64 `json:"requestThresholdPercent,omitempty"`
	MaxIPCount              int64 `json:"maxIPCount,omitempty"`
}

Scaler groups IP request params together

func (*Scaler) DeepCopy

func (in *Scaler) DeepCopy() *Scaler

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

func (*Scaler) DeepCopyInto

func (in *Scaler) DeepCopyInto(out *Scaler)

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 NNC reconcile status +kubebuilder:validation:Enum=Updating;Updated;Error

const (
	Updating Status = "Updating"
	Updated  Status = "Updated"
	Error    Status = "Error"
)

Jump to

Keyboard shortcuts

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