func()

in kubernetes/controllers/expectation.go [23:40]


func (r *ElasticJobReconciler) satisfiedExpections(job *v1alpha1.ElasticJob) bool {
	satisfied := false
	key, err := common.KeyFunc(job)
	if err != nil {
		runtime.HandleError(fmt.Errorf("couldn't get key for job object %v: %v", job, err))
		return false
	}
	for rtype := range job.Spec.ReplicaSpecs {
		// Check the expectations of the pods.
		expectationPodsKey := common.GenExpectationPodsKey(key, string(rtype))
		satisfied = satisfied || r.jobController.Expectations.SatisfiedExpectations(expectationPodsKey)
		// Check the expectations of the services.
		expectationServicesKey := common.GenExpectationServicesKey(key, string(rtype))
		satisfied = satisfied || r.jobController.Expectations.SatisfiedExpectations(expectationServicesKey)
	}

	return satisfied
}