Documentation ¶
Index ¶
- Constants
- Variables
- func ParseConfig(fs *flag.FlagSet)
- type DCUDevices
- func (dev *DCUDevices) CheckHealth(devType string, n *corev1.Node) (bool, bool)
- func (dev *DCUDevices) CheckType(annos map[string]string, d util.DeviceUsage, n util.ContainerDeviceRequest) (bool, bool, bool)
- func (dev *DCUDevices) CheckUUID(annos map[string]string, d util.DeviceUsage) bool
- func (dev *DCUDevices) CommonWord() string
- func (dev *DCUDevices) GenerateResourceRequests(ctr *corev1.Container) util.ContainerDeviceRequest
- func (dev *DCUDevices) GetNodeDevices(n corev1.Node) ([]*api.DeviceInfo, error)
- func (dev *DCUDevices) LockNode(n *corev1.Node, p *corev1.Pod) error
- func (dev *DCUDevices) MutateAdmission(ctr *corev1.Container) (bool, error)
- func (dev *DCUDevices) NodeCleanUp(nn string) error
- func (dev *DCUDevices) PatchAnnotations(annoinput *map[string]string, pd util.PodDevices) map[string]string
- func (dev *DCUDevices) ReleaseNodeLock(n *corev1.Node, p *corev1.Pod) error
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 ¶
Types ¶
type DCUDevices ¶
type DCUDevices struct { }
func InitDCUDevice ¶
func InitDCUDevice() *DCUDevices
func (*DCUDevices) CheckHealth ¶
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) 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 ¶
Click to show internal directories.
Click to hide internal directories.