v1alpha1

package
v1.0.4-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: 6 Imported by: 6

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	// AppGroupLabel is the default label of the AppGroup for the network-aware framework
	AppGroupLabel = appgroupapi.GroupName

	// AppGroupSelectorLabel is the default selector label for Pods belonging to a given Workload (e.g., workload = App-A)
	AppGroupSelectorLabel = AppGroupLabel + ".workload"

	// Topological Sorting algorithms supported by AppGroup
	AppGroupKahnSort        = "KahnSort"
	AppGroupTarjanSort      = "TarjanSort"
	AppGroupReverseKahn     = "ReverseKahn"
	AppGroupReverseTarjan   = "ReverseTarjan"
	AppGroupAlternateKahn   = "AlternateKahn"
	AppGroupAlternateTarjan = "AlternateTarjan"
)

Constants for AppGroup

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: appgroup.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 AppGroup

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

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

	// AppGroupSpec defines the number of Pods and which Pods belong to the group.
	// +optional
	Spec AppGroupSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

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

AppGroup is a collection of Pods belonging to the same application. +protobuf=true

func (*AppGroup) DeepCopy

func (in *AppGroup) DeepCopy() *AppGroup

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

func (*AppGroup) DeepCopyInto

func (in *AppGroup) DeepCopyInto(out *AppGroup)

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

func (*AppGroup) DeepCopyObject

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

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

type AppGroupList

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

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

AppGroupList is a collection of app groups.

func (*AppGroupList) DeepCopy

func (in *AppGroupList) DeepCopy() *AppGroupList

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

func (*AppGroupList) DeepCopyInto

func (in *AppGroupList) DeepCopyInto(out *AppGroupList)

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

func (*AppGroupList) DeepCopyObject

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

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

type AppGroupSpec

type AppGroupSpec struct {
	// NumMembers defines the number of Pods belonging to the App Group
	// +kubebuilder:validation:Minimum=1
	// +required
	NumMembers int32 `json:"numMembers" protobuf:"bytes,1,opt,name=numMembers"`

	// The preferred Topology Sorting Algorithm
	// +required
	TopologySortingAlgorithm string `json:"topologySortingAlgorithm" protobuf:"bytes,2,opt,name=topologySortingAlgorithm"`

	// Workloads defines the workloads belonging to the group
	// +required
	Workloads AppGroupWorkloadList `json:"workloads" protobuf:"bytes,3,rep,name=workloads, casttype=AppGroupWorkloadList"`
}

AppGroupSpec represents the template of a app group. +protobuf=true

func (*AppGroupSpec) DeepCopy

func (in *AppGroupSpec) DeepCopy() *AppGroupSpec

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

func (*AppGroupSpec) DeepCopyInto

func (in *AppGroupSpec) DeepCopyInto(out *AppGroupSpec)

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

type AppGroupStatus

type AppGroupStatus struct {
	// The number of actively running workloads (e.g., number of pods).
	// +optional
	// +kubebuilder:validation:Minimum=0
	RunningWorkloads int32 `json:"runningWorkloads,omitempty" protobuf:"bytes,1,opt,name=runningWorkloads"`

	// ScheduleStartTime of the group
	// +optional
	ScheduleStartTime metav1.Time `json:"scheduleStartTime,omitempty" protobuf:"bytes,2,opt,name=scheduleStartTime"`

	// TopologyCalculationTime of the group
	// +optional
	TopologyCalculationTime metav1.Time `json:"topologyCalculationTime,omitempty" protobuf:"bytes,3,opt,name=topologyCalculationTime"`

	// Topology order for TopSort plugin (QueueSort)
	// +optional
	TopologyOrder AppGroupTopologyList `json:"topologyOrder,omitempty" protobuf:"bytes,4,rep,name=topologyOrder,casttype=TopologyList"`
}

AppGroupStatus represents the current state of an AppGroup. +protobuf=true

func (*AppGroupStatus) DeepCopy

func (in *AppGroupStatus) DeepCopy() *AppGroupStatus

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

func (*AppGroupStatus) DeepCopyInto

func (in *AppGroupStatus) DeepCopyInto(out *AppGroupStatus)

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

type AppGroupTopologyInfo

type AppGroupTopologyInfo struct {
	// Workload reference Info.
	Workload AppGroupWorkloadInfo `json:"workload,omitempty" protobuf:"bytes,1,opt,name=workload, casttype=AppGroupWorkloadInfo"`

	// Topology index.
	Index int32 `json:"index,omitempty" protobuf:"bytes,2,opt,name=index"`

	// AvgRequirement
	AvgRequirement int64 `json:"avgRequirement,omitempty" protobuf:"bytes,3,opt,name=avgRequirement"`

	// MaxRequirement
	MaxRequirement int64 `json:"maxRequirement,omitempty" protobuf:"bytes,4,opt,name=maxRequirement"`
}

AppGroupTopologyInfo represents the calculated order for a given Workload. +protobuf=true

func (*AppGroupTopologyInfo) DeepCopy

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

func (*AppGroupTopologyInfo) DeepCopyInto

func (in *AppGroupTopologyInfo) DeepCopyInto(out *AppGroupTopologyInfo)

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

type AppGroupTopologyList

type AppGroupTopologyList []AppGroupTopologyInfo

TopologyList contains an array of workload indexes for the TopologySorting plugin. +protobuf=true

func (AppGroupTopologyList) DeepCopy

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

func (AppGroupTopologyList) DeepCopyInto

func (in AppGroupTopologyList) DeepCopyInto(out *AppGroupTopologyList)

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

type AppGroupWorkload

type AppGroupWorkload struct {
	// Workload reference Info.
	// +required
	Workload AppGroupWorkloadInfo `json:"workload" protobuf:"bytes,1,opt,name=workload, casttype=AppGroupWorkloadInfo"`

	// Dependencies of the Workload.
	// +optional
	Dependencies DependenciesList `json:"dependencies,omitempty" protobuf:"bytes,2,opt,name=dependencies, casttype=DependenciesList"`
}

AppGroupWorkload represents the Workloads belonging to the App Group. +protobuf=true

func (*AppGroupWorkload) DeepCopy

func (in *AppGroupWorkload) DeepCopy() *AppGroupWorkload

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

func (*AppGroupWorkload) DeepCopyInto

func (in *AppGroupWorkload) DeepCopyInto(out *AppGroupWorkload)

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

type AppGroupWorkloadInfo

type AppGroupWorkloadInfo struct {
	// Kind of the workload, info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
	// +required
	Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`

	// Name represents the workload, info: http://kubernetes.io/docs/user-guide/identifiers#names
	// +required
	Name string `json:"name" protobuf:"bytes,2,opt,name=name"`

	// Selector defines how to find Pods related to the Workload (key = workload). (e.g., workload=w1)
	// +required
	Selector string `json:"selector" protobuf:"bytes,3,opt,name=selector"`

	// ApiVersion defines the versioned schema of an object.
	//+optional
	APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,4,opt,name=apiVersion"`

	// Namespace of the workload
	//+optional
	Namespace string `json:"namespace,omitempty" protobuf:"bytes,5,opt,name=namespace"`
}

AppGroupWorkloadInfo contains information about one workload. +protobuf=true

func (*AppGroupWorkloadInfo) DeepCopy

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

func (*AppGroupWorkloadInfo) DeepCopyInto

func (in *AppGroupWorkloadInfo) DeepCopyInto(out *AppGroupWorkloadInfo)

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

type AppGroupWorkloadList

type AppGroupWorkloadList []AppGroupWorkload

AppGroupWorkloadList contains an array of Pod objects. +protobuf=true

func (AppGroupWorkloadList) DeepCopy

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

func (AppGroupWorkloadList) DeepCopyInto

func (in AppGroupWorkloadList) DeepCopyInto(out *AppGroupWorkloadList)

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

type DependenciesInfo

type DependenciesInfo struct {
	// Workload reference Info.
	// +required
	Workload AppGroupWorkloadInfo `json:"workload" protobuf:"bytes,1,opt,name=workload, casttype=AppGroupWorkloadInfo"`

	// MinBandwidth between workloads
	// +optional
	MinBandwidth resource.Quantity `json:"minBandwidth,omitempty" protobuf:"bytes,2,opt,name=minBandwidth"`

	// Max Network Cost between workloads
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Default=0
	// +kubebuilder:validation:Maximum=10000
	MaxNetworkCost int64 `json:"maxNetworkCost,omitempty" protobuf:"bytes,3,opt,name=maxNetworkCost"`
}

DependenciesInfo contains information about one dependency. +protobuf=true

func (*DependenciesInfo) DeepCopy

func (in *DependenciesInfo) DeepCopy() *DependenciesInfo

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

func (*DependenciesInfo) DeepCopyInto

func (in *DependenciesInfo) DeepCopyInto(out *DependenciesInfo)

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

type DependenciesList

type DependenciesList []DependenciesInfo

DependenciesList contains an array of ResourceInfo objects. +protobuf=true

func (DependenciesList) DeepCopy

func (in DependenciesList) DeepCopy() DependenciesList

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

func (DependenciesList) DeepCopyInto

func (in DependenciesList) DeepCopyInto(out *DependenciesList)

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