Documentation
¶
Overview ¶
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GetCapacityOfNode(node *v1.Node, resourceName string) int
- func GetGPUDeviceCountOfNode(node *v1.Node) int
- func GetGPUResourceOfContainer(container *v1.Container, resourceName v1.ResourceName) uint
- func GetGPUResourceOfPod(pod *v1.Pod, resourceName v1.ResourceName) uint
- func GetPredicateIdxOfContainer(pod *v1.Pod, containerIndex int) ([]int, error)
- func IsGPUEnabledNode(node *v1.Node) bool
- func IsGPURequiredContainer(c *v1.Container) bool
- func IsGPURequiredPod(pod *v1.Pod) bool
- func ShouldRetry(err error) bool
Constants ¶
const ( VCoreAnnotation = "tencent.com/vcuda-core" VMemoryAnnotation = "tencent.com/vcuda-memory" PredicateTimeAnnotation = "tencent.com/predicate-time" PredicateGPUIndexPrefix = "tencent.com/predicate-gpu-idx-" PredicateNode = "tencent.com/predicate-node" GPUAssigned = "tencent.com/gpu-assigned" HundredCore = 100 )
Variables ¶
This section is empty.
Functions ¶
func GetCapacityOfNode ¶
Get the capacity of request resource of the Node
func GetGPUDeviceCountOfNode ¶
GetGPUDeviceCountOfNode returns the number of GPU devices
func GetGPUResourceOfContainer ¶
func GetGPUResourceOfContainer(container *v1.Container, resourceName v1.ResourceName) uint
GetGPUResourceOfPod returns the limit size of GPU resource of given container
func GetGPUResourceOfPod ¶
func GetGPUResourceOfPod(pod *v1.Pod, resourceName v1.ResourceName) uint
GetGPUResourceOfPod returns the limit size of GPU resource of given pod
func GetPredicateIdxOfContainer ¶
GetPredicateIdxOfContainer returns the idx number of given container should be run on which GPU device
func IsGPURequiredContainer ¶
IsGPURequiredContainer tell if the container is a GPU request container
func IsGPURequiredPod ¶
IsGPURequiredPod tell if the pod is a GPU request pod
func ShouldRetry ¶
Types ¶
This section is empty.