Documentation ¶
Index ¶
- Constants
- func ApplyPodPolicies(_ context.Context, cfg *Config, pod *corev1.Pod) *corev1.Pod
- func CheckPodStatus(ctx context.Context, client core.KubeClient, name k8sTypes.NamespacedName) (info core.PhaseInfo, err error)
- func CheckSubTasksState(ctx context.Context, tCtx core.TaskExecutionContext, ...) (newState *arrayCore.State, logLinks []*idlCore.TaskLog, err error)
- func FlyteArrayJobToK8sPodTemplate(ctx context.Context, tCtx core.TaskExecutionContext) (podTemplate v1.Pod, job *idlPlugins.ArrayJob, err error)
- func GetNewExecutorPlugin(ctx context.Context, iCtx core.SetupContext) (core.Plugin, error)
- func LaunchSubTasks(ctx context.Context, tCtx core.TaskExecutionContext, ...) (newState *arrayCore.State, err error)
- func TerminateSubTasks(ctx context.Context, tMeta core.TaskExecutionMetadata, ...) error
- type Config
- type Executor
- func (e Executor) Abort(ctx context.Context, tCtx core.TaskExecutionContext) error
- func (e Executor) Finalize(ctx context.Context, tCtx core.TaskExecutionContext) error
- func (e Executor) GetID() string
- func (Executor) GetProperties() core.PluginProperties
- func (e Executor) Handle(ctx context.Context, tCtx core.TaskExecutionContext) (core.Transition, error)
- func (e Executor) Start(ctx context.Context) error
Constants ¶
View Source
const ( ErrBuildPodTemplate errors2.ErrorCode = "POD_TEMPLATE_FAILED" ErrReplaceCmdTemplate errors2.ErrorCode = "CMD_TEMPLATE_FAILED" ErrSubmitJob errors2.ErrorCode = "SUBMIT_JOB_FAILED" JobIndexVarName string = "BATCH_JOB_ARRAY_INDEX_VAR_NAME" FlyteK8sArrayIndexVarName string = "FLYTE_K8S_ARRAY_INDEX" )
View Source
const (
ErrCheckPodStatus errors.ErrorCode = "CHECK_POD_FAILED"
)
View Source
const PodKind = "pod"
Variables ¶
This section is empty.
Functions ¶
func ApplyPodPolicies ¶
func CheckPodStatus ¶
func CheckPodStatus(ctx context.Context, client core.KubeClient, name k8sTypes.NamespacedName) ( info core.PhaseInfo, err error)
func CheckSubTasksState ¶
func FlyteArrayJobToK8sPodTemplate ¶
func FlyteArrayJobToK8sPodTemplate(ctx context.Context, tCtx core.TaskExecutionContext) ( podTemplate v1.Pod, job *idlPlugins.ArrayJob, err error)
Note that Name is not set on the result object. It's up to the caller to set the Name before creating the object in K8s.
func GetNewExecutorPlugin ¶
func LaunchSubTasks ¶
func LaunchSubTasks(ctx context.Context, tCtx core.TaskExecutionContext, kubeClient core.KubeClient, config *Config, currentState *arrayCore.State) (newState *arrayCore.State, err error)
Launches subtasks
func TerminateSubTasks ¶
func TerminateSubTasks(ctx context.Context, tMeta core.TaskExecutionMetadata, kubeClient core.KubeClient, errsMaxLength int, currentState *arrayCore.State) error
Types ¶
type Config ¶
type Config struct { DefaultScheduler string `json:"scheduler" pflag:",Decides the scheduler to use when launching array-pods."` MaxErrorStringLength int `json:"maxErrLength" pflag:",Determines the maximum length of the error string returned for the array."` MaxArrayJobSize int64 `json:"maxArrayJobSize" pflag:",Maximum size of array job."` OutputAssembler workqueue.Config ErrorAssembler workqueue.Config }
Defines custom config for K8s Array plugin
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func (Executor) GetProperties ¶
func (Executor) GetProperties() core.PluginProperties
func (Executor) Handle ¶
func (e Executor) Handle(ctx context.Context, tCtx core.TaskExecutionContext) (core.Transition, error)
Click to show internal directories.
Click to hide internal directories.