v1alpha1

package
v1.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	// NetworkTopologyRegion corresponds to "topology.kubernetes.io/region"
	NetworkTopologyRegion TopologyKey = v1.LabelTopologyRegion

	// NetworkTopologyRegion corresponds to "topology.kubernetes.io/zone"
	NetworkTopologyZone TopologyKey = v1.LabelTopologyZone

	// NetworkTopologySegment corresponds to "topology.kubernetes.io/segment"
	NetworkTopologySegment TopologyKey = "topology.kubernetes.io/segment"

	// NetworkTopologyNetperfCosts corresponds to costs defined with measurements via the Netperf Component: "NetperfCosts"
	NetworkTopologyNetperfCosts string = "NetperfCosts"
)

Constants for Network Topology

Variables

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

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CostInfo

type CostInfo struct {
	// Name of the destination (e.g., Region Name, Zone Name).
	// +required
	Destination string `json:"destination" protobuf:"bytes,1,opt,name=destination"`

	// If the communication between origin and destination is allowed.
	// +optional
	IsAllowed bool `json:"isAllowed,omitempty" protobuf:"bytes,2,opt,name=isAllowed"`

	// Bandwidth capacity between origin and destination.
	// +optional
	BandwidthCapacity resource.Quantity `json:"bandwidthCapacity,omitempty" protobuf:"bytes,3,opt,name=bandwidthCapacity"`

	// Bandwidth allocated between origin and destination.
	// +optional
	BandwidthAllocated resource.Quantity `json:"bandwidthAllocated,omitempty" protobuf:"bytes,4,opt,name=bandwidthAllocated"`

	// Network Cost between origin and destination (e.g., Dijkstra shortest path, etc)
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Default=0
	// +required
	NetworkCost int64 `json:"networkCost" protobuf:"bytes,5,opt,name=networkCost"`
}

CostInfo contains information about networkCosts. +protobuf=true

func (*CostInfo) DeepCopy

func (in *CostInfo) DeepCopy() *CostInfo

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

func (*CostInfo) DeepCopyInto

func (in *CostInfo) DeepCopyInto(out *CostInfo)

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

type CostList

type CostList []CostInfo

CostList contains an array of CostInfo objects. +protobuf=true

func (CostList) DeepCopy

func (in CostList) DeepCopy() CostList

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

func (CostList) DeepCopyInto

func (in CostList) DeepCopyInto(out *CostList)

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

type NetworkTopology

type NetworkTopology struct {
	metav1.TypeMeta `json:",inline"`

	// Standard object's metadata.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// NetworkTopologySpec defines the zones and regions of the cluster.
	// +optional
	Spec NetworkTopologySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// NetworkTopologyStatus defines the observed use.
	// +optional
	Status NetworkTopologyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

NetworkTopology defines network costs in the cluster between regions and zones

func (*NetworkTopology) DeepCopy

func (in *NetworkTopology) DeepCopy() *NetworkTopology

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

func (*NetworkTopology) DeepCopyInto

func (in *NetworkTopology) DeepCopyInto(out *NetworkTopology)

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

func (*NetworkTopology) DeepCopyObject

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

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

type NetworkTopologyList

type NetworkTopologyList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is the list of NetworkTopology
	Items []NetworkTopology `json:"items"`
}

NetworkTopologyList is a collection of netTopologies.

func (*NetworkTopologyList) DeepCopy

func (in *NetworkTopologyList) DeepCopy() *NetworkTopologyList

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

func (*NetworkTopologyList) DeepCopyInto

func (in *NetworkTopologyList) DeepCopyInto(out *NetworkTopologyList)

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

func (*NetworkTopologyList) DeepCopyObject

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

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

type NetworkTopologySpec

type NetworkTopologySpec struct {
	// The manual defined weights of the cluster
	// +required
	Weights WeightList `json:"weights" protobuf:"bytes,1,opt,name=weights,casttype=WeightList"`

	// ConfigmapName to be used for cost calculation
	// +required
	ConfigmapName string `json:"configmapName" protobuf:"bytes,2,opt,name=configmapName"`
}

NetworkTopologySpec represents the template of a NetworkTopology. +protobuf=true

func (*NetworkTopologySpec) DeepCopy

func (in *NetworkTopologySpec) DeepCopy() *NetworkTopologySpec

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

func (*NetworkTopologySpec) DeepCopyInto

func (in *NetworkTopologySpec) DeepCopyInto(out *NetworkTopologySpec)

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

type NetworkTopologyStatus

type NetworkTopologyStatus struct {
	// The total number of nodes in the cluster
	// +kubebuilder:validation:Minimum=0
	NodeCount int64 `json:"nodeCount,omitempty" protobuf:"bytes,1,opt,name=nodeCount"`

	// The calculation time for the weights in the network topology CRD
	WeightCalculationTime metav1.Time `json:"weightCalculationTime,omitempty" protobuf:"bytes,2,opt,name=weightCalculationTime"`
}

NetworkTopologyStatus represents the current state of a Network Topology. +protobuf=true

func (*NetworkTopologyStatus) DeepCopy

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

func (*NetworkTopologyStatus) DeepCopyInto

func (in *NetworkTopologyStatus) DeepCopyInto(out *NetworkTopologyStatus)

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

type OriginInfo

type OriginInfo struct {
	// Name of the origin (e.g., Region Name, Zone Name).
	// +required
	Origin string `json:"origin" protobuf:"bytes,1,opt,name=origin"`

	// +optional
	MinCost int64 `json:"minCost" protobuf:"bytes,2,opt,name=minCost"`

	// +optional
	AvgCost int64 `json:"avgCost" protobuf:"bytes,3,opt,name=avgCost"`

	// +optional
	MaxCost int64 `json:"maxCost" protobuf:"bytes,4,opt,name=maxCost"`

	// Costs for the particular origin.
	CostList CostList `json:"costList,omitempty" protobuf:"bytes,5,rep,name=costList,casttype=CostList"`
}

OriginInfo contains information about network costs for a particular Origin. +protobuf=true

func (*OriginInfo) DeepCopy

func (in *OriginInfo) DeepCopy() *OriginInfo

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

func (*OriginInfo) DeepCopyInto

func (in *OriginInfo) DeepCopyInto(out *OriginInfo)

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

type OriginList

type OriginList []OriginInfo

OriginList contains an array of OriginInfo objects. +protobuf=true

func (OriginList) DeepCopy

func (in OriginList) DeepCopy() OriginList

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

func (OriginList) DeepCopyInto

func (in OriginList) DeepCopyInto(out *OriginList)

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

type TopologyInfo

type TopologyInfo struct {
	// Topology key (e.g., "topology.kubernetes.io/region", "topology.kubernetes.io/zone").
	// +required
	TopologyKey TopologyKey `json:"topologyKey" protobuf:"bytes,1,opt,name=topologyKey"` // add as enum instead of string

	// OriginList for a particular origin.
	// +required
	OriginList OriginList `json:"originList" protobuf:"bytes,2,rep,name=originList,casttype=OriginList"`
}

TopologyInfo contains information about network costs for a particular Topology Key. +protobuf=true

func (*TopologyInfo) DeepCopy

func (in *TopologyInfo) DeepCopy() *TopologyInfo

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

func (*TopologyInfo) DeepCopyInto

func (in *TopologyInfo) DeepCopyInto(out *TopologyInfo)

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

type TopologyKey

type TopologyKey string

TopologyKey is the key of a OriginList in a NetworkTopology.

type TopologyList

type TopologyList []TopologyInfo

TopologyList contains an array of OriginInfo objects. +protobuf=true

func (TopologyList) DeepCopy

func (in TopologyList) DeepCopy() TopologyList

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

func (TopologyList) DeepCopyInto

func (in TopologyList) DeepCopyInto(out *TopologyList)

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

type WeightInfo

type WeightInfo struct {
	// Algorithm Name for network cost calculation (e.g., userDefined)
	// +required
	Name string `json:"name" protobuf:"bytes,1,opt,name=name"`

	// TopologyList owns Costs between origins
	// +required
	TopologyList TopologyList `json:"topologyList" protobuf:"bytes,2,opt,name=topologyList,casttype=TopologyList"`
}

WeightInfo contains information about all network costs for a given algorithm. +protobuf=true

func (*WeightInfo) DeepCopy

func (in *WeightInfo) DeepCopy() *WeightInfo

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

func (*WeightInfo) DeepCopyInto

func (in *WeightInfo) DeepCopyInto(out *WeightInfo)

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

type WeightList

type WeightList []WeightInfo

WeightList contains an array of WeightInfo objects. +protobuf=true

func (WeightList) DeepCopy

func (in WeightList) DeepCopy() WeightList

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

func (WeightList) DeepCopyInto

func (in WeightList) DeepCopyInto(out *WeightList)

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