v1

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// kubeshare constants
	KubeShareResourceGPURequest = "kubeshare/gpu_request"
	KubeShareResourceGPULimit   = "kubeshare/gpu_limit"
	KubeShareResourceGPUMemory  = "kubeshare/gpu_mem"
	KubeShareResourceGPUID      = "kubeshare/GPUID"
	KubeShareDummyPodName       = "kubeshare-vgpu"
	KubeShareNodeName           = "kubeshare/nodeName"
	KubeShareRole               = "kubeshare/role"
	KubeShareNodeGPUInfo        = "kubeshare/gpu_info"
	ResourceNVIDIAGPU           = "nvidia.com/gpu"
)

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "faasshare.tum", Version: "v1"}

Functions

func NewGPUID

func NewGPUID(n int) string

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Scheded

type Scheded struct {
	Node string `json:"node,omitempty"`
	GPU  string `json:"gpu,omitempty"`
}

func (*Scheded) DeepCopy

func (in *Scheded) DeepCopy() *Scheded

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

func (*Scheded) DeepCopyInto

func (in *Scheded) DeepCopyInto(out *Scheded)

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

type SharePod

type SharePod struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// +optional
	Status SharePodStatus `json:"status,omitempty"`
	// +optional
	Spec SharePodSpec `json:"spec,omitempty"`
}

func (*SharePod) DeepCopy

func (in *SharePod) DeepCopy() *SharePod

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

func (*SharePod) DeepCopyInto

func (in *SharePod) DeepCopyInto(out *SharePod)

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

func (*SharePod) DeepCopyObject

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

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

func (SharePod) Print

func (this SharePod) Print()

type SharePodList

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

	Items []SharePod `json:"items"`
}

TestTypeList is a top-level list type. The client methods for lists are automatically created. You are not supposed to create a separated client for this one.

func (*SharePodList) DeepCopy

func (in *SharePodList) DeepCopy() *SharePodList

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

func (*SharePodList) DeepCopyInto

func (in *SharePodList) DeepCopyInto(out *SharePodList)

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

func (*SharePodList) DeepCopyObject

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

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

type SharePodSpec

type SharePodSpec struct {

	// +optional
	PodSpec corev1.PodSpec `json:"podSpec,omitempty"`

	// Replicas is the number of desired replicas.
	// This is a pointer to distinguish between explicit zero and unspecified.
	// Defaults to 1.
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
	// +optional
	Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`

	// Selector is a label query over pods that should match the replica count.
	// Label keys and values that must match in order to be controlled by this replica set.
	// It must match the pod template's labels.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"`
}

func (*SharePodSpec) DeepCopy

func (in *SharePodSpec) DeepCopy() *SharePodSpec

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

func (*SharePodSpec) DeepCopyInto

func (in *SharePodSpec) DeepCopyInto(out *SharePodSpec)

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

type SharePodStatus

type SharePodStatus struct {

	// +optional
	PrewarmPool []*corev1.Pod `json:"prewarmPool,omitempty"` //list[*corev1.Pod]

	// readyReplicas is the number of pods targeted by this ReplicaSet with a Ready Condition.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`

	// The number of available replicas (ready for at least minReadySeconds) for this replica set.
	// +optional
	AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`

	// Replicas is the most recently oberved number of replicas.
	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
	Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`

	//maping from pod 2 boundDeviceID
	// +optional
	BoundDeviceIDs *map[string]string `json:"boundDeviceIDs,omitempty"`

	//BoundDeviceID     string
	PodManagerPort *map[string]int `json:"podManagerPort,omitempty"`

	//TODOs: add replicas spec for faas
	// +optional
	Usage *map[string]SharepodUsage `json:"usage,omitempty"`

	// +optional
	Pod2Node *map[string]string `json:"pod2node,omitempty"`

	// +optional
	Node2Id []Scheded `json:"node2Id,omitempty"`
}

func (*SharePodStatus) DeepCopy

func (in *SharePodStatus) DeepCopy() *SharePodStatus

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

func (*SharePodStatus) DeepCopyInto

func (in *SharePodStatus) DeepCopyInto(out *SharePodStatus)

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

type SharepodUsage

type SharepodUsage struct {
	GPU float64 `json:"gpu,omitempty"`

	TotalMemoryBytes float64 `json:"totalMemoryBytes,omitempty"`
}

func (*SharepodUsage) DeepCopy

func (in *SharepodUsage) DeepCopy() *SharepodUsage

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

func (*SharepodUsage) DeepCopyInto

func (in *SharepodUsage) DeepCopyInto(out *SharepodUsage)

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