v1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the resources.scheduler v1 API group +kubebuilder:object:generate=true +groupName=resources.scheduler.caden2016.github.io

Index

Constants

View Source
const (
	StatusHealth    = "True"
	StatusNotHealth = "False"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "resources.scheduler.caden2016.github.io", Version: "v1"}

	// 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 SchemeGroupVersion = GroupVersion

Functions

func Kind

func Kind(kind string) schema.GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Types

type GpuNode

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

	Spec   GpuNodeSpec   `json:"spec,omitempty"`
	Status GpuNodeStatus `json:"status,omitempty"`
}

GpuNode is the Schema for the gpunodes API

func (*GpuNode) DeepCopy

func (in *GpuNode) DeepCopy() *GpuNode

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

func (*GpuNode) DeepCopyInto

func (in *GpuNode) DeepCopyInto(out *GpuNode)

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

func (*GpuNode) DeepCopyObject

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

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

type GpuNodeList

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

GpuNodeList contains a list of GpuNode

func (*GpuNodeList) DeepCopy

func (in *GpuNodeList) DeepCopy() *GpuNodeList

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

func (*GpuNodeList) DeepCopyInto

func (in *GpuNodeList) DeepCopyInto(out *GpuNodeList)

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

func (*GpuNodeList) DeepCopyObject

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

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

type GpuNodeSpec

type GpuNodeSpec struct {
	// GpuInfos defines the observed state of gpu from each node.
	GpuInfos map[string]*jsonstruct.GpuInfo `json:"device_infos,omitempty"`
	// Models group the gpus by model.
	Models map[string][]string `json:"device_models,omitempty"`
	// NodeDeviceInUse defines the gpus which are used.
	NodeDeviceInUse []string `json:"device_busy"`
	// ReportTime record the time gpuinfo populated by each gpuserver-ds.
	ReportTime metav1.Time `json:"report_time,omitempty"`
}

GpuNodeSpec defines the desired state of GpuNode

func (*GpuNodeSpec) DeepCopy

func (in *GpuNodeSpec) DeepCopy() *GpuNodeSpec

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

func (*GpuNodeSpec) DeepCopyInto

func (in *GpuNodeSpec) DeepCopyInto(out *GpuNodeSpec)

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

type GpuNodeStatus

type GpuNodeStatus struct {
	NodeName           string      `json:"node,omitempty"`
	Health             string      `json:"health,omitempty"`
	Message            string      `json:"message,omitempty"`
	LastHealthyTime    metav1.Time `json:"last_health_time,omitempty"`
	LastTransitionTime metav1.Time `json:"last_transition_time,omitempty"`
}

GpuNodeStatus defines the observed state of GpuNode. This will be updated with resource GpuNodeHealth.

func (*GpuNodeStatus) DeepCopy

func (in *GpuNodeStatus) DeepCopy() *GpuNodeStatus

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

func (*GpuNodeStatus) DeepCopyInto

func (in *GpuNodeStatus) DeepCopyInto(out *GpuNodeStatus)

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