v1alpha1

package
v0.0.0-...-12e0a72 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	AnnotationGpuSpecPrefix   = "nos.nebuly.com/spec-gpu"
	AnnotationGpuStatusPrefix = "nos.nebuly.com/status-gpu"

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

Resources

Variables

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
)
View Source
var AnnotationGpuSpecFormat = fmt.Sprintf(
	"%s-%%d-%%s",
	AnnotationGpuSpecPrefix,
)

AnnotationGpuSpecFormat is the format of the annotation used to specify the required GPU profiles on the GPUs of a node

Format:

"nos.nebuly.com/spec-gpu-<gpu-index>-<profile>"

Example:

"nos.nebuly.com/spec-gpu-0-1g.10gb"
View Source
var AnnotationGpuStatusFormat = fmt.Sprintf(
	"%s-%%d-%%s-%%s",
	AnnotationGpuStatusPrefix,
)

AnnotationGpuStatusFormat is the format of the annotation used to expose the profiles the GPUs of a node

Format:

"nos.nebuly.com/status-gpu-<gpu-index>-<profile>"

Example:

"nos.nebuly.com/status-gpu-0-1g.10gb-free"

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