예제 #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),
	}
}
예제 #2
0
파일: pods.go 프로젝트: abutcher/kubernetes
func isBestEffort(pod *api.Pod) bool {
	return qos.InternalGetPodQOS(pod) == qos.BestEffort
}