Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for podGenerateNameWithIndex (0.29 sec)

  1. pkg/controller/job/indexed_job_utils.go

    	}
    	// For consistency, we use the annotation batch.kubernetes.io/job-completion-index for the corresponding label as well.
    	template.Labels[batch.JobCompletionIndexAnnotation] = strconv.Itoa(index)
    }
    
    func podGenerateNameWithIndex(jobName string, index int) string {
    	appendIndex := "-" + strconv.Itoa(index) + "-"
    	generateNamePrefix := jobName + appendIndex
    	if len(generateNamePrefix) > names.MaxGeneratedNameLength {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 21 00:44:53 UTC 2023
    - 17.5K bytes
    - Viewed (0)
  2. pkg/controller/job/indexed_job_utils_test.go

    			wantPodGenerateName: "hhhhhooooohhhhhooooohhhhhooooohhhhhooooohhhhhooooohhhhh-1-",
    		},
    	}
    	for name, tc := range cases {
    		t.Run(name, func(t *testing.T) {
    			podGenerateName := podGenerateNameWithIndex(tc.jobname, tc.index)
    			if diff := cmp.Equal(tc.wantPodGenerateName, podGenerateName); !diff {
    				t.Errorf("Got pod generateName %s, want %s", podGenerateName, tc.wantPodGenerateName)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  3. pkg/controller/job/job_controller.go

    							addCompletionIndexLabel(template, completionIndex)
    						}
    						template.Spec.Hostname = fmt.Sprintf("%s-%d", job.Name, completionIndex)
    						generateName = podGenerateNameWithIndex(job.Name, completionIndex)
    						if hasBackoffLimitPerIndex(job) {
    							addIndexFailureCountAnnotation(logger, template, job, jobCtx.podsWithDelayedDeletionPerIndex[completionIndex])
    						}
    					}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 10 23:56:37 UTC 2024
    - 77.6K bytes
    - Viewed (0)
Back to top