Example #1
0
// PrepareForCreate clears fields that are not allowed to be set by end users on creation.
func (podStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) {
	pod := obj.(*api.Pod)
	pod.Status = api.PodStatus{
		Phase:    api.PodPending,
		QOSClass: qos.InternalGetPodQOS(pod),
	}
}
Example #2
0
func isBestEffort(pod *api.Pod) bool {
	return qos.InternalGetPodQOS(pod) == qos.BestEffort
}