Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for matchPodFailurePolicy (0.3 sec)

  1. pkg/controller/job/pod_failure_policy_test.go

    		t.Run(name, func(t *testing.T) {
    			featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.JobBackoffLimitPerIndex, tc.enableJobBackoffLimitPerIndex)
    			jobFailMessage, countFailed, action := matchPodFailurePolicy(tc.podFailurePolicy, tc.failedPod)
    			if diff := cmp.Diff(tc.wantJobFailureMessage, jobFailMessage); diff != "" {
    				t.Errorf("Unexpected job failure message: %s", diff)
    			}
    			if tc.wantCountFailed != countFailed {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. pkg/controller/job/job_controller.go

    	result := len(failedPods)
    	if feature.DefaultFeatureGate.Enabled(features.JobPodFailurePolicy) && jobCtx.job.Spec.PodFailurePolicy != nil {
    		for _, p := range failedPods {
    			_, countFailed, _ := matchPodFailurePolicy(jobCtx.job.Spec.PodFailurePolicy, p)
    			if !countFailed {
    				result--
    			}
    		}
    	}
    	return result
    }
    
    // deleteJobPods deletes the pods, returns the number of successful removals
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 10 23:56:37 UTC 2024
    - 77.6K bytes
    - Viewed (1)
Back to top