Documentation ¶
Index ¶
- Constants
- func CreateMergePatch(original, new interface{}) ([]byte, error)
- func GetPodEffectiveRequest(pod *v1.Pod) v1.ResourceList
- func GetPodGroupFullName(pod *v1.Pod) string
- func GetPodGroupLabel(pod *v1.Pod) string
- func GetWaitTimeDuration(pg *v1alpha1.PodGroup, scheduleTimeout *time.Duration) time.Duration
- func ResourceList(r *framework.Resource) v1.ResourceList
Constants ¶
const DefaultWaitTime = 60 * time.Second
DefaultWaitTime is 60s if ScheduleTimeoutSeconds is not specified.
Variables ¶
This section is empty.
Functions ¶
func CreateMergePatch ¶
CreateMergePatch return patch generated from original and new interfaces
func GetPodEffectiveRequest ¶
func GetPodEffectiveRequest(pod *v1.Pod) v1.ResourceList
GetPodEffectiveRequest gets the effective request resource of a pod to the origin resource. The Pod's effective request is the higher of: - the sum of all app containers(spec.Containers) request for a resource. - the effective init containers(spec.InitContainers) request for a resource. The effective init containers request is the highest request on all init containers.
func GetPodGroupFullName ¶
GetPodGroupFullName get namespaced group name from pod annotations
func GetPodGroupLabel ¶
GetPodGroupLabel get pod group from pod annotations
func GetWaitTimeDuration ¶
GetWaitTimeDuration returns a wait timeout based on the following precedences: 1. spec.scheduleTimeoutSeconds of the given pg, if specified 2. given scheduleTimeout, if not nil 3. fall back to DefaultWaitTime
func ResourceList ¶
func ResourceList(r *framework.Resource) v1.ResourceList
ResourceList returns a resource list of this resource. Note: this code used to exist in k/k, but removed in k/k#101465.
Types ¶
This section is empty.