Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for WarningsForJobSpec (0.21 sec)

  1. pkg/api/job/warnings.go

    	"k8s.io/utils/ptr"
    )
    
    const (
    	completionsSoftLimit                        = 100_000
    	parallelismSoftLimitForUnlimitedCompletions = 10_000
    )
    
    // WarningsForJobSpec produces warnings for fields in the JobSpec.
    func WarningsForJobSpec(ctx context.Context, path *field.Path, spec, oldSpec *batch.JobSpec) []string {
    	var warnings []string
    	if spec.CompletionMode != nil && *spec.CompletionMode == batch.IndexedCompletion {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 24 11:44:07 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. pkg/api/job/warnings_test.go

    				Template:       validPodTemplate,
    			},
    			wantWarningsCount: 1,
    		},
    	}
    	for name, tc := range cases {
    		t.Run(name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			warnings := WarningsForJobSpec(ctx, nil, tc.spec, nil)
    			if len(warnings) != tc.wantWarningsCount {
    				t.Errorf("Got %d warnings, want %d.\nWarnings: %v", len(warnings), tc.wantWarningsCount, warnings)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 14 14:38:42 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  3. pkg/registry/batch/cronjob/strategy.go

    		warnings = append(warnings, fmt.Sprintf("metadata.name: this is used in Pod names and hostnames, which can result in surprising behavior; a DNS label is recommended: %v", msgs))
    	}
    	warnings = append(warnings, job.WarningsForJobSpec(ctx, field.NewPath("spec", "jobTemplate", "spec"), &newCronJob.Spec.JobTemplate.Spec, nil)...)
    	return warnings
    }
    
    // Canonicalize normalizes the object after validation.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 20 15:14:03 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  4. pkg/registry/batch/job/strategy.go

    		warnings = append(warnings, fmt.Sprintf("metadata.name: this is used in Pod names and hostnames, which can result in surprising behavior; a DNS label is recommended: %v", msgs))
    	}
    	warnings = append(warnings, job.WarningsForJobSpec(ctx, field.NewPath("spec"), &newJob.Spec, nil)...)
    	return warnings
    }
    
    // generateSelectorIfNeeded checks the job's manual selector flag and generates selector labels if the flag is true.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 16:43:24 UTC 2024
    - 18.4K bytes
    - Viewed (0)
Back to top