helpers

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// PodNameFmt pod name format
	PodNameFmt = "%s-%s-%d"
)

Variables

This section is empty.

Functions

func CompareTask added in v1.5.0

func CompareTask(lv, rv *api.TaskInfo) bool

CompareTask by pod index

func GenPVCName

func GenPVCName(jobName string) string

GenPVCName generates pvc name with job name.

func GenRandomStr

func GenRandomStr(l int) string

GenRandomStr generate random str with specified length l.

func GetJobKeyByReq

func GetJobKeyByReq(req *apis.Request) string

GetJobKeyByReq gets the key for the job request.

func GetPodIndexUnderTask added in v1.5.0

func GetPodIndexUnderTask(pod *v1.Pod) string

GetPodIndexUnderTask returns task Index.

func GetPodsNameUnderTask added in v1.5.0

func GetPodsNameUnderTask(taskName string, job *batch.Job) []string

GetPodsNameUnderTask return names of all pods in the task.

func GetTaskIndexUnderJob added in v1.9.0

func GetTaskIndexUnderJob(taskName string, job *batch.Job) int

GetTaskIndexUnderJob return index of the task in the job.

func GetTaskKey added in v1.5.0

func GetTaskKey(pod *v1.Pod) string

GetTaskKey returns task key/name

func GetTaskSpec added in v1.5.0

func GetTaskSpec(job *batch.Job, taskName string) (batch.TaskSpec, bool)

GetTaskSpec returns task spec

func MakeDomainName added in v1.5.0

func MakeDomainName(ts batch.TaskSpec, job *batch.Job, index int) string

MakeDomainName creates task domain name

func MakePodName

func MakePodName(jobName string, taskName string, index int) string

MakePodName creates pod name.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL