v1alpha1

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the dana v1alpha1 API group +kubebuilder:object:generate=true +groupName=dana.hns.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "dana.hns.io", 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 NodeGroup

type NodeGroup struct {
	// LabelSelector defines the label selector of the nodes and how to find them.
	// Possible values examples: {"app":"gpu-nodes"}
	LabelSelector map[string]string `json:"labelSelector"`
	// Name is the name of the secondaryRoot.
	Name string `json:"name"`
	// ResourceMultiplier defines the multiplier that will be used when calculating the resources of nodes for allowing overcommit
	// Possible values examples: {"cpu":2, "memory":3} {"cpu":3, "gpu":3}
	ResourceMultiplier map[string]string `json:"multipliers,omitempty"`
}

NodeGroup defines a group of nodes that allocated to the secondary root workloads

func (*NodeGroup) DeepCopy

func (in *NodeGroup) DeepCopy() *NodeGroup

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

func (*NodeGroup) DeepCopyInto

func (in *NodeGroup) DeepCopyInto(out *NodeGroup)

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

type NodeQuotaConfig

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

	Spec   NodeQuotaConfigSpec   `json:"spec,omitempty"`
	Status NodeQuotaConfigStatus `json:"status,omitempty"`
}

NodeQuotaConfig is the Schema for the nodequotaconfigs API

func (*NodeQuotaConfig) DeepCopy

func (in *NodeQuotaConfig) DeepCopy() *NodeQuotaConfig

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

func (*NodeQuotaConfig) DeepCopyInto

func (in *NodeQuotaConfig) DeepCopyInto(out *NodeQuotaConfig)

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

func (*NodeQuotaConfig) DeepCopyObject

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

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

type NodeQuotaConfigList

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

NodeQuotaConfigList contains a list of NodeQuotaConfig

func (*NodeQuotaConfigList) DeepCopy

func (in *NodeQuotaConfigList) DeepCopy() *NodeQuotaConfigList

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

func (*NodeQuotaConfigList) DeepCopyInto

func (in *NodeQuotaConfigList) DeepCopyInto(out *NodeQuotaConfigList)

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

func (*NodeQuotaConfigList) DeepCopyObject

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

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

type NodeQuotaConfigSpec

type NodeQuotaConfigSpec struct {
	// ReservedHoursToLive defines how many hours the ReservedResources can live until they are removed from the cluster resources
	ReservedHoursToLive int `json:"reservedHoursToLive"`

	// ControlledResources defines which node resources are controlled
	// Possible values examples: ["cpu","memory"], ["cpu","gpu"]
	ControlledResources []string `json:"controlledResources"`

	// Roots defines the state of the cluster's secondary roots and roots
	Roots []SubnamespacesRoots `json:"subnamespacesRoots"`
}

NodeQuotaConfigSpec defines the desired state of NodeQuotaConfig

func (*NodeQuotaConfigSpec) DeepCopy

func (in *NodeQuotaConfigSpec) DeepCopy() *NodeQuotaConfigSpec

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

func (*NodeQuotaConfigSpec) DeepCopyInto

func (in *NodeQuotaConfigSpec) DeepCopyInto(out *NodeQuotaConfigSpec)

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

type NodeQuotaConfigStatus

type NodeQuotaConfigStatus struct {
	Conditions        []metav1.Condition  `json:"conditions,omitempty"`
	ReservedResources []ReservedResources `json:"reservedResources,omitempty"`
}

NodeQuotaConfigStatus defines the observed state of NodeQuotaConfig

func (*NodeQuotaConfigStatus) DeepCopy

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

func (*NodeQuotaConfigStatus) DeepCopyInto

func (in *NodeQuotaConfigStatus) DeepCopyInto(out *NodeQuotaConfigStatus)

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

type ReservedResources

type ReservedResources struct {
	// Resources defines the number of resources of the nodes
	Resources corev1.ResourceList `json:"resources,omitempty"`
	// NodeGroup defines which of the secondaryRoots the nodes that were removed was a part of
	NodeGroup string `json:"nodeGroup,omitempty"`
	// Timestamp defines when the nodes were removed
	Timestamp metav1.Time `json:"Timestamp,omitempty" protobuf:"bytes,8,opt,name=Timestamp"`
}

ReservedResources shows the resources of nodes that were deleted from the cluster but not from the subnamespace quota

func (*ReservedResources) DeepCopy

func (in *ReservedResources) DeepCopy() *ReservedResources

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

func (*ReservedResources) DeepCopyInto

func (in *ReservedResources) DeepCopyInto(out *ReservedResources)

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

type SubnamespacesRoots

type SubnamespacesRoots struct {
	// RootNamespace is the name of the root namespace
	RootNamespace string `json:"rootNamespace"`
	// SecondaryRoots are the subnamespaces under the root namespace
	SecondaryRoots []NodeGroup `json:"secondaryRoots"`
}

SubnamespacesRoots define the root and secondary root of the cluster's hierarchy

func (*SubnamespacesRoots) DeepCopy

func (in *SubnamespacesRoots) DeepCopy() *SubnamespacesRoots

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

func (*SubnamespacesRoots) DeepCopyInto

func (in *SubnamespacesRoots) DeepCopyInto(out *SubnamespacesRoots)

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