v1

package
v2.0.56 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1 contains API Schema definitions for the flyte.org v1 API group. +kubebuilder:object:generate=true +groupName=flyte.org

Index

Constants

View Source
const (
	// ActionTypeTask is the default action type (plugin-driven task with a pod).
	ActionTypeTask = "task"

	// ActionTypeCondition is a HITL condition: no plugin, no pod. It reaches
	// terminal state via Signal (Succeeded) or timeout (Failed).
	ActionTypeCondition = "condition"
)

ActionType values for TaskActionSpec.ActionType.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "flyte.org", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ActionAddress added in v2.0.52

type ActionAddress struct {
	// Pod is the pod serving the action: its own, or that of a worker serving many actions.
	// +optional
	Pod *PodAddress `json:"pod,omitempty"`
	// Path is the path on Pod that reaches this action (e.g. /s/<session>); empty when the whole
	// pod serves it.
	// +optional
	Path string `json:"path,omitempty"`
	// URL is an endpoint that cannot be derived from Pod (a gateway or tunnel); it takes
	// precedence when set.
	// +optional
	URL string `json:"url,omitempty"`
	// Cluster is the cluster the action runs in.
	// +optional
	Cluster string `json:"cluster,omitempty"`
	// Attempt is the attempt that reported the address, and SystemRetries the TaskAction's
	// system-retry count when it did. The address is delivered only while both are still the
	// TaskAction's own, so a new attempt or an in-place relaunch never exposes a dead pod.
	// +optional
	Attempt uint32 `json:"attempt,omitempty"`
	// +optional
	SystemRetries uint32 `json:"systemRetries,omitempty"`
}

ActionAddress is where a running action can be reached. Callers use URL when it is set, and otherwise Pod and Path.

func (*ActionAddress) DeepCopy added in v2.0.52

func (in *ActionAddress) DeepCopy() *ActionAddress

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionAddress.

func (*ActionAddress) DeepCopyInto added in v2.0.52

func (in *ActionAddress) DeepCopyInto(out *ActionAddress)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ErrorState added in v2.0.14

type ErrorState struct {
	// Code is the plugin-defined error code (e.g. "OOMKilled",
	// "ContainerCreating", "PrimaryContainerNotFound").
	// +optional
	Code string `json:"code,omitempty"`

	// Kind is the error kind: "USER", "SYSTEM", or "" (unspecified).
	// +optional
	Kind string `json:"kind,omitempty"`

	// Message is the human-readable error message.
	// +optional
	Message string `json:"message,omitempty"`
}

ErrorState captures the structured error returned by the plugin for a failed/aborted attempt. Persisted on TaskAction status so it can be surfaced as a full core.ExecutionError on the ActionUpdate (and reach the SDK with its Code intact, e.g. "OOMKilled").

func (*ErrorState) DeepCopy added in v2.0.14

func (in *ErrorState) DeepCopy() *ErrorState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ErrorState.

func (*ErrorState) DeepCopyInto added in v2.0.14

func (in *ErrorState) DeepCopyInto(out *ErrorState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PhaseTransition added in v2.0.7

type PhaseTransition struct {
	// Phase is the phase that was entered (e.g. "Queued", "Initializing", "Executing", "Succeeded", "Failed").
	Phase string `json:"phase"`

	// OccurredAt is when this phase transition happened.
	OccurredAt metav1.Time `json:"occurredAt"`

	// Message is an optional human-readable message about the transition.
	// +optional
	Message string `json:"message,omitempty"`
}

PhaseTransition records a phase change with its timestamp.

func (*PhaseTransition) DeepCopy added in v2.0.7

func (in *PhaseTransition) DeepCopy() *PhaseTransition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhaseTransition.

func (*PhaseTransition) DeepCopyInto added in v2.0.7

func (in *PhaseTransition) DeepCopyInto(out *PhaseTransition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodAddress added in v2.0.52

type PodAddress struct {
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// +optional
	Name string `json:"name,omitempty"`
	// IP is the pod's IP, reachable from inside the cluster.
	// +optional
	IP string `json:"ip,omitempty"`
	// Port is the port the action serves on.
	// +optional
	Port uint32 `json:"port,omitempty"`
}

PodAddress locates a pod that serves an action.

func (*PodAddress) DeepCopy added in v2.0.52

func (in *PodAddress) DeepCopy() *PodAddress

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAddress.

func (*PodAddress) DeepCopyInto added in v2.0.52

func (in *PodAddress) DeepCopyInto(out *PodAddress)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskAction

type TaskAction struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`

	// spec defines the desired state of TaskAction
	// +required
	Spec TaskActionSpec `json:"spec"`

	// status defines the observed state of TaskAction
	// +optional
	Status TaskActionStatus `json:"status,omitempty,omitzero"`
}

TaskAction is the Schema for the taskactions API

func (*TaskAction) DeepCopy

func (in *TaskAction) DeepCopy() *TaskAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskAction.

func (*TaskAction) DeepCopyInto

func (in *TaskAction) DeepCopyInto(out *TaskAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskAction) DeepCopyObject

func (in *TaskAction) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TaskActionConditionReason added in v2.0.1

type TaskActionConditionReason string
const (
	// ConditionReasonQueued indicates the TaskAction is queued and waiting for resources
	ConditionReasonQueued TaskActionConditionReason = "Queued"

	// ConditionReasonInitializing indicates the TaskAction is being initialized
	ConditionReasonInitializing TaskActionConditionReason = "Initializing"

	// ConditionReasonExecuting indicates the TaskAction is actively executing
	ConditionReasonExecuting TaskActionConditionReason = "Executing"

	// ConditionReasonCompleted indicates the TaskAction has completed successfully
	ConditionReasonCompleted TaskActionConditionReason = "Completed"

	// ConditionReasonRetryableFailure indicates the TaskAction experienced a retryable failure
	ConditionReasonRetryableFailure TaskActionConditionReason = "RetryableFailure"

	// ConditionReasonPermanentFailure indicates the TaskAction experienced a permanent failure
	ConditionReasonPermanentFailure TaskActionConditionReason = "PermanentFailure"

	// ConditionReasonAborted indicates the TaskAction was aborted
	ConditionReasonAborted TaskActionConditionReason = "Aborted"

	// ConditionReasonPluginNotFound indicates no plugin was found for the task type
	ConditionReasonPluginNotFound TaskActionConditionReason = "PluginNotFound"

	// ConditionReasonInvalidSpec indicates the TaskAction spec is missing required fields
	ConditionReasonInvalidSpec TaskActionConditionReason = "InvalidSpec"

	// ConditionReasonPaused indicates a condition action is waiting for a signal (Progressing=True)
	ConditionReasonPaused TaskActionConditionReason = "Paused"

	// ConditionReasonSignaled indicates a condition action received its signal (Succeeded=True)
	ConditionReasonSignaled TaskActionConditionReason = "Signaled"

	// ConditionReasonTimedOut indicates the action reached its deadline (Failed=True).
	// This applies to condition actions that were not signalled in time, to task
	// actions whose per-attempt max-runtime was exhausted, and to task actions that
	// did not finish within their deadline.
	ConditionReasonTimedOut TaskActionConditionReason = "TimedOut"
)

Condition reason constants Reasons explain why a condition has a particular status. These are used in the Reason field of conditions to provide detailed sub-state information.

type TaskActionConditionType added in v2.0.1

type TaskActionConditionType string
const (
	// ConditionTypeProgressing indicates whether the TaskAction is actively progressing.
	// This is True when the TaskAction is queued, initializing, or executing.
	// This is False when the TaskAction has completed or failed.
	ConditionTypeProgressing TaskActionConditionType = "Progressing"

	// ConditionTypeSucceeded indicates whether the TaskAction has completed successfully.
	// This is a terminal condition. Once True, the TaskAction will not be reconciled further.
	ConditionTypeSucceeded TaskActionConditionType = "Succeeded"

	// ConditionTypeFailed indicates whether the TaskAction has failed.
	// This is a terminal condition. Once True, the TaskAction will not be reconciled further.
	ConditionTypeFailed TaskActionConditionType = "Failed"
)

Condition type constants Following Kubernetes API conventions: - Condition types describe the current observed state - Use Reason field to track sub-states (like Queued, Initializing, Executing)

type TaskActionList

type TaskActionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TaskAction `json:"items"`
}

TaskActionList contains a list of TaskAction

func (*TaskActionList) DeepCopy

func (in *TaskActionList) DeepCopy() *TaskActionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskActionList.

func (*TaskActionList) DeepCopyInto

func (in *TaskActionList) DeepCopyInto(out *TaskActionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskActionList) DeepCopyObject

func (in *TaskActionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TaskActionSpec

type TaskActionSpec struct {
	// RunName is the name of the run this action belongs to
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=30
	RunName string `json:"runName"`

	// Project this action belongs to
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	Project string `json:"project"`

	// Domain this action belongs to
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	Domain string `json:"domain"`

	// ActionName is the unique name of this action within the run
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=30
	ActionName string `json:"actionName"`

	// ParentActionName is the optional name of the parent action
	// +optional
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=30
	ParentActionName *string `json:"parentActionName,omitempty"`

	// ActionType discriminates what kind of action this CR represents.
	// Mirrors cloud's explicit ActionType enum. Empty means "task" for
	// backward compatibility with existing CRs.
	// +kubebuilder:validation:Enum=task;condition
	// +optional
	ActionType string `json:"actionType,omitempty"`

	// ConditionSpec is the proto-serialized workflow.ConditionAction, present iff
	// actionType == "condition". Carries type/prompt/description/timeout/webhook.
	// +optional
	ConditionSpec []byte `json:"conditionSpec,omitempty"`

	// InputURI is the path to the input data for this action.
	// Empty for conditions; the reconciler validates presence for tasks.
	// +optional
	InputURI string `json:"inputUri,omitempty"`

	// RunOutputBase is the base path where this action should write its output.
	// Empty for conditions; the reconciler validates presence for tasks.
	// +optional
	RunOutputBase string `json:"runOutputBase,omitempty"`

	// CacheKey enables cache lookup/writeback for this task action when set.
	// This is propagated from workflow.TaskAction.cache_key.
	// +optional
	// +kubebuilder:validation:MaxLength=256
	CacheKey string `json:"cacheKey,omitempty"`

	// TaskType identifies which plugin handles this task (e.g. "container", "spark", "ray").
	// Empty for conditions; the reconciler validates presence for tasks.
	// +optional
	// +kubebuilder:validation:MaxLength=63
	TaskType string `json:"taskType,omitempty"`

	// ShortName is the human-readable display name for this task
	// +optional
	// +kubebuilder:validation:MaxLength=63
	ShortName string `json:"shortName,omitempty"`

	// TaskTemplate is the proto-serialized core.TaskTemplate stored inline in etcd.
	// Empty for conditions; the reconciler validates presence for tasks.
	// +optional
	TaskTemplate []byte `json:"taskTemplate,omitempty"`

	// EnvVars are run-scoped environment variables projected from RunSpec for executor runtime use.
	// +optional
	EnvVars map[string]string `json:"envVars,omitempty"`

	// Interruptible is the run-scoped interruptibility override projected from RunSpec.
	// +optional
	Interruptible *bool `json:"interruptible,omitempty"`

	// PodTemplateName is the run-scoped pod template name projected from RunSpec.DefaultSettings.
	// Stamped onto tasks that do not name one themselves.
	// +optional
	// +kubebuilder:validation:MaxLength=253
	PodTemplateName string `json:"podTemplateName,omitempty"`

	// ServiceAccount is the run-scoped Kubernetes service account projected from
	// RunSpec.SecurityContext. Stamped onto tasks that do not set one themselves.
	// +optional
	// +kubebuilder:validation:MaxLength=253
	ServiceAccount string `json:"serviceAccount,omitempty"`

	// RawDataPrefix is the run-scoped raw data base projected from RunSpec.RawDataStorage.
	// Empty writes raw data under RunOutputBase.
	// +optional
	RawDataPrefix string `json:"rawDataPrefix,omitempty"`

	// RunStartTime is the run-scoped start time in RFC3339 UTC, inherited by child tasks.
	// +optional
	RunStartTime string `json:"runStartTime,omitempty"`

	// Group is the group this action belongs to, if applicable.
	// +optional
	// +kubebuilder:validation:MaxLength=256
	Group string `json:"group,omitempty"`
}

TaskActionSpec defines the desired state of TaskAction

func (*TaskActionSpec) DeepCopy

func (in *TaskActionSpec) DeepCopy() *TaskActionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskActionSpec.

func (*TaskActionSpec) DeepCopyInto

func (in *TaskActionSpec) DeepCopyInto(out *TaskActionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskActionSpec) GetActionSpec

func (in *TaskActionSpec) GetActionSpec() (*workflow.ActionSpec, error)

func (*TaskActionSpec) SetActionSpec

func (in *TaskActionSpec) SetActionSpec(spec *workflow.ActionSpec) error

type TaskActionStatus

type TaskActionStatus struct {

	// StateJSON is the JSON serialized NodeStatus that was last sent to the State Service
	// +optional
	StateJSON string `json:"stateJson,omitempty"`

	// PluginState is the Gob-encoded plugin state from the last reconciliation round.
	// +optional
	PluginState []byte `json:"pluginState,omitempty"`

	// PluginStateVersion tracks the version of the plugin state schema for compatibility.
	// +optional
	PluginStateVersion uint8 `json:"pluginStateVersion,omitempty"`

	// PluginPhase is a human-readable representation of the plugin's current phase.
	// +optional
	PluginPhase string `json:"pluginPhase,omitempty"`

	// PluginPhaseVersion is the version of the current plugin phase.
	// +optional
	PluginPhaseVersion uint32 `json:"pluginPhaseVersion,omitempty"`

	// Attempts is the latest observed action attempt number, starting from 1.
	// +optional
	Attempts uint32 `json:"attempts,omitempty"`

	// AttemptStartedAt is when the current user attempt first entered the Running phase.
	// It is persisted independently from ActionEvent publication so max-runtime
	// enforcement survives controller and event-service outages.
	// +optional
	AttemptStartedAt *metav1.Time `json:"attemptStartedAt,omitempty"`

	// TimeoutAt is the expired deadline that ended the current attempt: the earlier
	// of the attempt's max runtime and the action's deadline across all attempts.
	// While set on a non-terminal action, timeout cleanup is pending and the
	// plugin resource must not be handled or recreated.
	// +optional
	TimeoutAt *metav1.Time `json:"timeoutAt,omitempty"`

	// NextAttemptAt is the earliest time the next user attempt may launch, set when a
	// failed attempt is retried under a RetryStrategy with a backoff. While it lies in
	// the future the plugin is not handled; it is cleared when the attempt launches.
	// +optional
	NextAttemptAt *metav1.Time `json:"nextAttemptAt,omitempty"`

	// SystemFailures counts system-level failures observed during reconciliation —
	// either Go errors returned from Plugin.Handle (e.g. transient k8s API errors,
	// admission webhook denials) or plugin transitions reporting a system-retryable
	// failure (e.g. resource deleted externally). When it exceeds the configured
	// maximum, the TaskAction is converted to a permanent failure.
	// +optional
	SystemFailures uint32 `json:"systemFailures,omitempty"`

	// SystemRetries counts the times this TaskAction was relaunched in place after a
	// system-retryable failure. Unlike SystemFailures it is never reset, so it gives
	// each system-retry event a version no earlier one used.
	// +optional
	SystemRetries uint32 `json:"systemRetries,omitempty"`

	// CacheStatus is the latest observed cache lookup result for this action.
	// +optional
	CacheStatus core.CatalogCacheStatus `json:"cacheStatus,omitempty"`

	// conditions represent the current state of the TaskAction resource.
	// Each condition has a unique type and reflects the status of a specific aspect of the resource.
	//
	// Standard condition types include:
	// - "Available": the resource is fully functional
	// - "Progressing": the resource is being created or updated
	// - "Degraded": the resource failed to reach or maintain its desired state
	//
	// The status of each condition is one of True, False, or Unknown.
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// PhaseHistory is an append-only log of phase transitions. Unlike conditions
	// (which are updated in-place by type), this preserves the full timeline:
	// Queued → Initializing → Executing → Succeeded/Failed, each with a timestamp.
	// +optional
	PhaseHistory []PhaseTransition `json:"phaseHistory,omitempty"`

	// ErrorState is the structured error from the last failed/aborted attempt.
	// Populated when the plugin returns a core.ExecutionError; preserves the
	// Code field that ActionEvent.ErrorInfo cannot carry.
	// +optional
	ErrorState *ErrorState `json:"errorState,omitempty"`

	// SignalValue is the proto-serialized core.Literal supplied by Signal.
	// Set exactly once; the reconciler transitions the CR to Succeeded when present.
	// Only meaningful for condition actions.
	// +optional
	SignalValue []byte `json:"signalValue,omitempty"`

	// Address is where the running task can be reached, as reported by its worker with
	// actions.UpdateRequest.address (e.g. an interactive sandbox session). Watchers of the parent
	// receive it on ActionUpdate.address while the task runs. The actions service owns it: the
	// reconciler keeps it when persisting status. A later address replaces it and an empty one
	// withdraws it; it is not delivered once Attempts or SystemRetries move past the ones it was
	// reported for, or once the task is terminal.
	// +optional
	Address *ActionAddress `json:"address,omitempty"`

	// SignalledBy identifies the principal that signalled the condition.
	// +optional
	SignalledBy string `json:"signalledBy,omitempty"`

	// SignalledAt is when the signal was received.
	// +optional
	SignalledAt *metav1.Time `json:"signalledAt,omitempty"`
}

TaskActionStatus defines the observed state of TaskAction.

func (*TaskActionStatus) DeepCopy

func (in *TaskActionStatus) DeepCopy() *TaskActionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskActionStatus.

func (*TaskActionStatus) DeepCopyInto

func (in *TaskActionStatus) DeepCopyInto(out *TaskActionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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