v1alpha1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1alpha1 is a generated protocol buffer package.

It is generated from these files:

k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha1/generated.proto

It has these top-level messages:

Pool
PoolList
PoolSpec
PoolStatus

Index

Constants

View Source
const (
	// GroupName is the group name used in this package.
	GroupName = "resource.aibee.cn"

	// GroupVersion is the version of scheduling group
	GroupVersion = "v1alpha1"
)
View Source
const GroupNameAnnotationKey = "resource.aibee.cn/pool"

GroupNameAnnotationKey is the annotation key of Pod to identify which ResourcePool it belongs to.

Variables

View Source
var (
	ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}

SchemeGroupVersion is the group version used to register these objects.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type Pool

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

	// Spec defines the desired resources divided
	// +optional
	Spec PoolSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Status defines the actual enforced deserved resources and its current usage
	// +optional
	Status PoolStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

Pool

func (*Pool) DeepCopy

func (in *Pool) DeepCopy() *Pool

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

func (*Pool) DeepCopyInto

func (in *Pool) DeepCopyInto(out *Pool)

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

func (*Pool) DeepCopyObject

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

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

func (*Pool) Descriptor added in v1.0.0

func (*Pool) Descriptor() ([]byte, []int)

func (*Pool) Marshal added in v1.0.0

func (m *Pool) Marshal() (dAtA []byte, err error)

func (*Pool) MarshalTo added in v1.0.0

func (m *Pool) MarshalTo(dAtA []byte) (int, error)

func (*Pool) ProtoMessage added in v1.0.0

func (*Pool) ProtoMessage()

func (*Pool) Reset added in v1.0.0

func (m *Pool) Reset()

func (*Pool) Size added in v1.0.0

func (m *Pool) Size() (n int)

func (*Pool) String added in v1.0.0

func (this *Pool) String() string

func (*Pool) Unmarshal added in v1.0.0

func (m *Pool) Unmarshal(dAtA []byte) error

type PoolList

type PoolList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// items is the list of Pool
	Items []Pool `json:"items" protobuf:"bytes,2,rep,name=items"`
}

Pool is a collection of resource pools.

func (*PoolList) DeepCopy

func (in *PoolList) DeepCopy() *PoolList

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

func (*PoolList) DeepCopyInto

func (in *PoolList) DeepCopyInto(out *PoolList)

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

func (*PoolList) DeepCopyObject

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

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

func (*PoolList) Descriptor added in v1.0.0

func (*PoolList) Descriptor() ([]byte, []int)

func (*PoolList) Marshal added in v1.0.0

func (m *PoolList) Marshal() (dAtA []byte, err error)

func (*PoolList) MarshalTo added in v1.0.0

func (m *PoolList) MarshalTo(dAtA []byte) (int, error)

func (*PoolList) ProtoMessage added in v1.0.0

func (*PoolList) ProtoMessage()

func (*PoolList) Reset added in v1.0.0

func (m *PoolList) Reset()

func (*PoolList) Size added in v1.0.0

func (m *PoolList) Size() (n int)

func (*PoolList) String added in v1.0.0

func (this *PoolList) String() string

func (*PoolList) Unmarshal added in v1.0.0

func (m *PoolList) Unmarshal(dAtA []byte) error

type PoolSpec

type PoolSpec struct {
	// NodeSelector match node label
	// +optional
	NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty" protobuf:"bytes,1,opt,name=nodeSelector"`

	// DisablePreemption flag whether task can preempt resources in the same pool ,
	// if false, task in pool can preempt resources from other pools
	// if true, task cannot preempt resources from other pools and wait available
	// resource in self pool
	// +optional
	DisablePreemption bool `json:"disablePreemption,omitempty" protobuf:"varint,2,opt,name=disablePreemption"`

	// DisableBorrowing flag whether task in self pool can borrow resources from other pool,
	// if false, task can borrow resources from other pool
	// if true, task will only can use deserved resources
	// +optional
	DisableBorrowing bool `json:"disableBorrowing,omitempty" protobuf:"varint,3,opt,name=disableBorrowing"`

	// BorrowingPools only borrow from those pools,
	// only available when DisableBorrowing is false,
	// if empty can borrow all sharing pools
	// +optional
	BorrowingPools []string `json:"borrowingPools,omitempty" protobuf:"bytes,4,opt,name=borrowingPools"`

	// DisableSharing flag if self pool share its resource to other pool,
	// if false, the pool can be preempted by task in other pool
	// if true, the pool will not be preempted.
	// +optional
	DisableSharing bool `json:"disableSharing,omitempty" protobuf:"varint,5,opt,name=disableSharing"`
}

PoolSpec

func (*PoolSpec) DeepCopy

func (in *PoolSpec) DeepCopy() *PoolSpec

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

func (*PoolSpec) DeepCopyInto

func (in *PoolSpec) DeepCopyInto(out *PoolSpec)

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

func (*PoolSpec) Descriptor added in v1.0.0

func (*PoolSpec) Descriptor() ([]byte, []int)

func (*PoolSpec) Marshal added in v1.0.0

func (m *PoolSpec) Marshal() (dAtA []byte, err error)

func (*PoolSpec) MarshalTo added in v1.0.0

func (m *PoolSpec) MarshalTo(dAtA []byte) (int, error)

func (*PoolSpec) ProtoMessage added in v1.0.0

func (*PoolSpec) ProtoMessage()

func (*PoolSpec) Reset added in v1.0.0

func (m *PoolSpec) Reset()

func (*PoolSpec) Size added in v1.0.0

func (m *PoolSpec) Size() (n int)

func (*PoolSpec) String added in v1.0.0

func (this *PoolSpec) String() string

func (*PoolSpec) Unmarshal added in v1.0.0

func (m *PoolSpec) Unmarshal(dAtA []byte) error

type PoolStatus

type PoolStatus struct {
	// Capacity all resources of pool nodes capacity sum
	// +optional
	Capacity v1.ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,opt,name=capacity,casttype=ResourceList,castkey=ResourceName"`

	// Allocatable all quota of pool divided
	// +optional
	Allocatable v1.ResourceList `json:"allocatable,omitempty" protobuf:"bytes,2,opt,name=allocatable,casttype=ResourceList,castkey=ResourceName"`

	// Requested  is the current observed total usage of the resource by tasks in the Pool
	// Requested = (Deserved + System + Shared)
	// +optional
	Requests v1.ResourceList `json:"requests,omitempty" protobuf:"bytes,3,opt,name=requests,casttype=ResourceList,castkey=ResourceName"`
	Limits   v1.ResourceList `json:"limits,omitempty" protobuf:"bytes,4,rep,name=limits,casttype=ResourceList,castkey=ResourceName"`

	// Deserved is the resource used by self pool task
	// +optional
	Deserved v1.ResourceList `json:"deserved,omitempty" protobuf:"bytes,5,opt,name=deserved,casttype=ResourceList,castkey=ResourceName"`

	// System is the resource used by scheduled by not ai-scheduler, i.e.calico,
	// +optional
	System v1.ResourceList `json:"system,omitempty" protobuf:"bytes,6,opt,name=system,casttype=ResourceList,castkey=ResourceName"`

	// shared is the resources that shared to tasks in others Pool
	// +optional
	Shared v1.ResourceList `json:"shared,omitempty" protobuf:"bytes,7,opt,name=shared,casttype=ResourceList,castkey=ResourceName"`

	// Borrowed is the resources that task in self Pool borrows from other Pool
	// +optional
	Borrowed v1.ResourceList `json:"borrowed,omitempty" protobuf:"bytes,8,opt,name=borrowed,casttype=ResourceList,castkey=ResourceName"`

	// Free = (Allocatable - allocated)
	Free v1.ResourceList `json:"free,omitempty" protobuf:"bytes,9,opt,name=free,casttype=ResourceList,castkey=ResourceName"`
}

PoolStatus

func (*PoolStatus) DeepCopy

func (in *PoolStatus) DeepCopy() *PoolStatus

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

func (*PoolStatus) DeepCopyInto

func (in *PoolStatus) DeepCopyInto(out *PoolStatus)

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

func (*PoolStatus) Descriptor added in v1.0.0

func (*PoolStatus) Descriptor() ([]byte, []int)

func (*PoolStatus) Marshal added in v1.0.0

func (m *PoolStatus) Marshal() (dAtA []byte, err error)

func (*PoolStatus) MarshalTo added in v1.0.0

func (m *PoolStatus) MarshalTo(dAtA []byte) (int, error)

func (*PoolStatus) ProtoMessage added in v1.0.0

func (*PoolStatus) ProtoMessage()

func (*PoolStatus) Reset added in v1.0.0

func (m *PoolStatus) Reset()

func (*PoolStatus) Size added in v1.0.0

func (m *PoolStatus) Size() (n int)

func (*PoolStatus) String added in v1.0.0

func (this *PoolStatus) String() string

func (*PoolStatus) Unmarshal added in v1.0.0

func (m *PoolStatus) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL