Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SubstitutePodSpecForTask ¶
SubstitutePodSpecForTask returns a PodSpec from a TaskTemplate after substituting context variables for the task context.
func SubstitutePodTemplateSpecForJob ¶
func SubstitutePodTemplateSpecForJob(rj *execution.Job) v1.PodTemplateSpec
SubstitutePodTemplateSpecForJob returns a PodTemplateSpec for a given Job after substituting context variables for the job context. Uses the Job's substitutions field to specify overrides for the job context.
Types ¶
type Provider ¶
type Provider interface {
// GetAllPrefixes returns a list of prefixes that the provider would inject.
GetAllPrefixes() []string
// MakeVariablesFromJobConfig returns context variables for the "jobconfig"
// context, which contains information about the parent JobConfig of a Job.
MakeVariablesFromJobConfig(rjc *execution.JobConfig) map[string]string
// MakeVariablesFromJob returns context variables for the "job" context, which
// contains information about the Job.
MakeVariablesFromJob(rj *execution.Job) map[string]string
// MakeVariablesFromTask returns context variables for the "task" context, which
// contains information about the Task.
MakeVariablesFromTask(rj *execution.Job, task *tasks.TaskTemplate) map[string]string
}
Provider supplies context variables given an object. The intention is that variables can only be provided in different "contexts" in a Job's lifecycle.
var ( // ContextProvider is the global Provider that can supply context variables. ContextProvider Provider = &defaultProvider{} )
Click to show internal directories.
Click to hide internal directories.