Documentation ¶
Index ¶
- Variables
- func CheckAppIdInPod(pod *v1.Pod) error
- func CheckQueueNameInPod(pod *v1.Pod) error
- func Convert2ConfigMap(obj interface{}) *v1.ConfigMap
- func Convert2Pod(obj interface{}) (*v1.Pod, error)
- func Convert2PriorityClass(obj interface{}) *schedulingv1.PriorityClass
- func GenerateApplicationID(namespace string, generateUniqueAppIds bool, podUID string) string
- func GetApplicationIDFromPod(pod *v1.Pod) string
- func GetCoreSchedulerConfigFromConfigMap(config map[string]string) string
- func GetExtraConfigFromConfigMap(config map[string]string) map[string]string
- func GetNameSpaceAnnotationValue(namespace *v1.Namespace, annotationKey string) string
- func GetNamespaceGuaranteedFromAnnotation(namespaceObj *v1.Namespace) *si.Resource
- func GetNamespaceMaxAppsFromAnnotation(namespaceObj *v1.Namespace) string
- func GetNamespaceQuotaFromAnnotation(namespaceObj *v1.Namespace) *si.Resource
- func GetPlaceholderFlagFromPodSpec(pod *v1.Pod) bool
- func GetPodAnnotationValue(pod *v1.Pod, annotationKey string) string
- func GetPodLabelValue(pod *v1.Pod, labelKey string) string
- func GetQueueNameFromPod(pod *v1.Pod) string
- func GetTaskGroupFromPodSpec(pod *v1.Pod) string
- func GetUserFromPod(pod *v1.Pod) (string, []string)
- func IsAssignedPod(pod *v1.Pod) bool
- func IsPluginMode() bool
- func IsPodRunning(pod *v1.Pod) bool
- func IsPodTerminated(pod *v1.Pod) bool
- func MergeMaps(first, second map[string]string) map[string]string
- func PodAlreadyBound(pod *v1.Pod) bool
- func PodUnderCondition(pod *v1.Pod, condition *v1.PodCondition) bool
- func SetPluginMode(value bool)
- func ValidatePodLabelAnnotation(pod *v1.Pod, labelKeys []string, annotationKeys []string) error
- func WaitForCondition(eval func() bool, interval time.Duration, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrorTimeout returned if waiting for a condition times out ErrorTimeout = errors.New("timeout waiting for condition") )
Functions ¶
func CheckAppIdInPod ¶ added in v1.6.0
func CheckQueueNameInPod ¶ added in v1.6.0
func Convert2ConfigMap ¶ added in v1.2.0
func Convert2Pod ¶
func Convert2PriorityClass ¶ added in v1.2.0
func Convert2PriorityClass(obj interface{}) *schedulingv1.PriorityClass
func GenerateApplicationID ¶ added in v1.4.0
GenerateApplicationID generates an appID based on the namespace value if configured to generate unique appID, generate appID as <namespace>-<pod-uid> namespace capped at 26chars if not set or configured as false, appID generated as <autogen-prefix>-<namespace>-<autogen-suffix>
func GetApplicationIDFromPod ¶
GetApplicationIDFromPod returns the Application for a Pod. If a Pod is marked as schedulable by YuniKorn but is missing an ApplicationID, one will be generated here (if YuniKorn is running in standard mode) or an empty string will be returned (if YuniKorn is running in plugin mode). If an Application ID is returned, the Pod is managed by YuniKorn. Otherwise, it is managed by an external scheduler.
func GetCoreSchedulerConfigFromConfigMap ¶ added in v1.2.0
GetCoreSchedulerConfigFromConfigMap resolves a yunikorn configmap into a core scheduler config. If the configmap is missing or the policy group doesn't exist, uses a default configuration
func GetExtraConfigFromConfigMap ¶ added in v1.2.0
GetExtraConfigFromConfigMap filters the configmap entries, returning those that are not yaml
func GetNameSpaceAnnotationValue ¶ added in v1.2.0
func GetNamespaceGuaranteedFromAnnotation ¶ added in v1.4.0
get namespace guaranteed resource from namespace annotation
func GetNamespaceMaxAppsFromAnnotation ¶ added in v1.6.0
get namespace max apps from namespace annotation
func GetPodAnnotationValue ¶ added in v1.2.0
func GetQueueNameFromPod ¶
func GetTaskGroupFromPodSpec ¶
func GetUserFromPod ¶
GetUserFromPod find username from pod annotation or label
func IsAssignedPod ¶
assignedPod selects pods that are assigned (scheduled and running).
func IsPluginMode ¶ added in v1.4.0
func IsPluginMode() bool
func IsPodRunning ¶
func IsPodTerminated ¶
func MergeMaps ¶
merge two string maps if the same key defined in the first and second maps the value will be set by the second map
func PodAlreadyBound ¶ added in v1.5.0
PodAlreadyBound returns true if a newly initializing Pod is already assigned to a Node
func PodUnderCondition ¶
func PodUnderCondition(pod *v1.Pod, condition *v1.PodCondition) bool
compare the existing pod condition with the given one, return true if the pod condition remains not changed. return false if pod has no condition set yet, or condition has changed.
func SetPluginMode ¶ added in v1.4.0
func SetPluginMode(value bool)
func ValidatePodLabelAnnotation ¶ added in v1.6.0
return true if all non-empty values are same across all provided label/annotation
Types ¶
This section is empty.