in internal/utils/controller/appdeployment_validate.go [52:104]
func jobConstraint(js batchv1.JobSpec) error {
if js.ActiveDeadlineSeconds != nil {
return fmt.Errorf("activeDeadlineSeconds is not allowed")
}
if js.BackoffLimit != nil {
return fmt.Errorf("backoffLimit is not allowed")
}
if js.BackoffLimitPerIndex != nil {
return fmt.Errorf("backoffLimitPerIndex is not allowed")
}
if js.Completions != nil {
return fmt.Errorf("completions is not allowed")
}
if js.CompletionMode != nil {
return fmt.Errorf("completionMode is not allowed")
}
if js.ManagedBy != nil {
return fmt.Errorf("managedBy is not allowed")
}
if js.ManualSelector != nil {
return fmt.Errorf("manualSelector is not allowed")
}
if js.MaxFailedIndexes != nil {
return fmt.Errorf("maxFailedIndexes is not allowed")
}
if js.Parallelism != nil {
return fmt.Errorf("parallelism is not allowed")
}
if js.PodFailurePolicy != nil {
return fmt.Errorf("podFailurePolicy is not allowed")
}
if js.PodReplacementPolicy != nil {
return fmt.Errorf("podReplacementPolicy is not allowed")
}
if js.Selector != nil {
return fmt.Errorf("selector is not allowed")
}
if js.TTLSecondsAfterFinished != nil {
return fmt.Errorf("ttlSecondsAfterFinished is not allowed")
}
if js.SuccessPolicy != nil {
return fmt.Errorf("successPolicy is not allowed")
}
if js.Suspend != nil {
return fmt.Errorf("suspend is not allowed")
}
if podConstraint(js.Template) != nil {
return fmt.Errorf("pod template: %w", podConstraint(js.Template))
}
return nil
}