hygon

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HandshakeAnnos     = "hami.io/node-handshake-dcu"
	RegisterAnnos      = "hami.io/node-dcu-register"
	HygonDCUDevice     = "DCU"
	HygonDCUCommonWord = "DCU"
	DCUInUse           = "hygon.com/use-dcutype"
	DCUNoUse           = "hygon.com/nouse-dcutype"
	// DCUUseUUID is user can use specify DCU device for set DCU UUID.
	DCUUseUUID = "hygon.com/use-gpuuuid"
	// DCUNoUseUUID is user can not use specify DCU device for set DCU UUID.
	DCUNoUseUUID = "hygon.com/nouse-gpuuuid"
)

Variables

View Source
var (
	HygonResourceCount  string
	HygonResourceMemory string
	HygonResourceCores  string
)

Functions

func ParseConfig

func ParseConfig(fs *flag.FlagSet)

Types

type DCUDevices

type DCUDevices struct {
}

func InitDCUDevice

func InitDCUDevice() *DCUDevices

func (*DCUDevices) CheckHealth

func (dev *DCUDevices) CheckHealth(devType string, n *corev1.Node) (bool, bool)

func (*DCUDevices) CheckType

func (dev *DCUDevices) CheckType(annos map[string]string, d util.DeviceUsage, n util.ContainerDeviceRequest) (bool, bool, bool)

func (*DCUDevices) CheckUUID

func (dev *DCUDevices) CheckUUID(annos map[string]string, d util.DeviceUsage) bool

func (*DCUDevices) CommonWord

func (dev *DCUDevices) CommonWord() string

func (*DCUDevices) GenerateResourceRequests

func (dev *DCUDevices) GenerateResourceRequests(ctr *corev1.Container) util.ContainerDeviceRequest

func (*DCUDevices) GetNodeDevices

func (dev *DCUDevices) GetNodeDevices(n corev1.Node) ([]*api.DeviceInfo, error)

func (*DCUDevices) LockNode

func (dev *DCUDevices) LockNode(n *corev1.Node, p *corev1.Pod) error

func (*DCUDevices) MutateAdmission

func (dev *DCUDevices) MutateAdmission(ctr *corev1.Container) (bool, error)

func (*DCUDevices) NodeCleanUp

func (dev *DCUDevices) NodeCleanUp(nn string) error

func (*DCUDevices) PatchAnnotations

func (dev *DCUDevices) PatchAnnotations(annoinput *map[string]string, pd util.PodDevices) map[string]string

func (*DCUDevices) ReleaseNodeLock

func (dev *DCUDevices) ReleaseNodeLock(n *corev1.Node, p *corev1.Pod) error

Jump to

Keyboard shortcuts

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