v1alpha1

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the n8s.nebuly.ai v1alpha1 API group +genclient +kubebuilder:object:generate=true +groupName=n8s.nebuly.ai

Index

Constants

View Source
const (
	AnnotationGPUSpecPrefix       = "n8s.nebuly.ai/spec-gpu"
	AnnotationGPUMigSpecFormat    = "n8s.nebuly.ai/spec-gpu-%d-%s"
	AnnotationGPUStatusPrefix     = "n8s.nebuly.ai/status-gpu"
	AnnotationGPUStatusFreeSuffix = "free"
	AnnotationGPUStatusUsedSuffix = "used"

	// AnnotationPartitioningPlan indicates the partitioning plan that was applied to the node.
	AnnotationPartitioningPlan = "n8s.nebuly.ai/spec-partitioning-plan"
	// AnnotationReportedPartitioningPlan indicates the last partitioning plan reported by the node.
	AnnotationReportedPartitioningPlan = "n8s.nebuly.ai/status-partitioning-plan"
)
View Source
const (
	// LabelCapacityInfo specifies the status of a Pod in regard to the ElasticQuota it belongs to
	LabelCapacityInfo = "n8s.nebuly.ai/capacity"
	// LabelGpuPartitioning specifies the PartitioningKind that should be performed on the GPUs of a node
	LabelGpuPartitioning = "n8s.nebuly.ai/gpu-partitioning"
)
View Source
const (
	GroupName = "n8s.nebuly.ai"
)
View Source
const (
	// ResourceGPUMemory is the name of the custom resource used by n8s for specifying GPU memory GigaBytes
	ResourceGPUMemory v1.ResourceName = "n8s.nebuly.ai/gpu-memory"
)

Resources

Variables

View Source
var (
	AnnotationUsedMigStatusFormat = fmt.Sprintf("%s-%%d-%%s-%s", AnnotationGPUStatusPrefix, AnnotationGPUStatusUsedSuffix)
	AnnotationFreeMigStatusFormat = fmt.Sprintf("%s-%%d-%%s-%s", AnnotationGPUStatusPrefix, AnnotationGPUStatusFreeSuffix)
)
View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: GroupName, 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

func BuildCompositeEq

func BuildCompositeEq(namespace, name string) *compositeEqBuilder

func BuildEq

func BuildEq(namespace, name string) *eqBuilder

Types

type CompositeElasticQuota

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

	// CompositeElasticQuotaSpec defines the Min and Max for Quota.
	Spec CompositeElasticQuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

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

func (*CompositeElasticQuota) DeepCopy

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

func (*CompositeElasticQuota) DeepCopyInto

func (in *CompositeElasticQuota) DeepCopyInto(out *CompositeElasticQuota)

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

func (*CompositeElasticQuota) DeepCopyObject

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

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

func (*CompositeElasticQuota) SetupWebhookWithManager

func (r *CompositeElasticQuota) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*CompositeElasticQuota) ValidateCreate

func (r *CompositeElasticQuota) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*CompositeElasticQuota) ValidateDelete

func (r *CompositeElasticQuota) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*CompositeElasticQuota) ValidateUpdate

func (r *CompositeElasticQuota) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type CompositeElasticQuotaList

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

	Items []CompositeElasticQuota `json:"items" protobuf:"bytes,2,rep,name=items"`
}

func (*CompositeElasticQuotaList) DeepCopy

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

func (*CompositeElasticQuotaList) DeepCopyInto

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

func (*CompositeElasticQuotaList) DeepCopyObject

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

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

type CompositeElasticQuotaSpec

type CompositeElasticQuotaSpec struct {
	// Namespaces is the desired list of namespaces in which the specified limits will be enforced
	//+kubebuilder:validation:MinItems:=1
	Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,1,rep,name=namespaces"`

	// Min is the set of desired guaranteed limits for each named resource.
	Min v1.ResourceList `json:"min,omitempty" protobuf:"bytes,1,rep,name=min, casttype=ResourceList,castkey=ResourceName"`

	// Max is the set of desired max limits for each named resource. The usage of max is based on the resource configurations of
	// successfully scheduled pods.
	Max v1.ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max, casttype=ResourceList,castkey=ResourceName"`
}

func (*CompositeElasticQuotaSpec) DeepCopy

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

func (*CompositeElasticQuotaSpec) DeepCopyInto

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

type CompositeElasticQuotaStatus

type CompositeElasticQuotaStatus struct {
	// Used is the current observed total usage of the resource in the namespace.
	Used v1.ResourceList `json:"used,omitempty" protobuf:"bytes,1,rep,name=used,casttype=ResourceList,castkey=ResourceName"`
}

func (*CompositeElasticQuotaStatus) DeepCopy

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

func (*CompositeElasticQuotaStatus) DeepCopyInto

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

type ElasticQuota

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

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

	// ElasticQuotaSpec defines the Min and Max for Quota.
	Spec ElasticQuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

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

ElasticQuota sets elastic quota restrictions per namespace

func (*ElasticQuota) DeepCopy

func (in *ElasticQuota) DeepCopy() *ElasticQuota

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

func (*ElasticQuota) DeepCopyInto

func (in *ElasticQuota) DeepCopyInto(out *ElasticQuota)

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

func (*ElasticQuota) DeepCopyObject

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

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

func (*ElasticQuota) SetupWebhookWithManager

func (r *ElasticQuota) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ElasticQuota) ValidateCreate

func (r *ElasticQuota) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ElasticQuota) ValidateDelete

func (r *ElasticQuota) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ElasticQuota) ValidateUpdate

func (r *ElasticQuota) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ElasticQuotaList

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

	// Standard list metadata.
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Items is a list of ElasticQuota objects.
	Items []ElasticQuota `json:"items" protobuf:"bytes,2,rep,name=items"`
}

ElasticQuotaList is a list of ElasticQuota items.

func (*ElasticQuotaList) DeepCopy

func (in *ElasticQuotaList) DeepCopy() *ElasticQuotaList

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

func (*ElasticQuotaList) DeepCopyInto

func (in *ElasticQuotaList) DeepCopyInto(out *ElasticQuotaList)

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

func (*ElasticQuotaList) DeepCopyObject

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

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

type ElasticQuotaSpec

type ElasticQuotaSpec struct {
	// Min is the set of desired guaranteed limits for each named resource.
	Min v1.ResourceList `json:"min,omitempty" protobuf:"bytes,1,rep,name=min, casttype=ResourceList,castkey=ResourceName"`

	// Max is the set of desired max limits for each named resource. The usage of max is based on the resource configurations of
	// successfully scheduled pods.
	Max v1.ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max, casttype=ResourceList,castkey=ResourceName"`
}

ElasticQuotaSpec defines the Min and Max for Quota.

func (*ElasticQuotaSpec) DeepCopy

func (in *ElasticQuotaSpec) DeepCopy() *ElasticQuotaSpec

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

func (*ElasticQuotaSpec) DeepCopyInto

func (in *ElasticQuotaSpec) DeepCopyInto(out *ElasticQuotaSpec)

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

type ElasticQuotaStatus

type ElasticQuotaStatus struct {
	// Used is the current observed total usage of the resource in the namespace.
	Used v1.ResourceList `json:"used,omitempty" protobuf:"bytes,1,rep,name=used,casttype=ResourceList,castkey=ResourceName"`
}

ElasticQuotaStatus defines the observed use.

func (*ElasticQuotaStatus) DeepCopy

func (in *ElasticQuotaStatus) DeepCopy() *ElasticQuotaStatus

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

func (*ElasticQuotaStatus) DeepCopyInto

func (in *ElasticQuotaStatus) DeepCopyInto(out *ElasticQuotaStatus)

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