v1alpha1

package
v0.10.0-preview2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the runs.marmotdata.io v1alpha1 API group. +kubebuilder:object:generate=true +groupName=runs.marmotdata.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "runs.marmotdata.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionResource 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 Run

type Run struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RunSpec   `json:"spec,omitempty"`
	Status RunStatus `json:"status,omitempty"`
}

Run is the Schema for the runs API. It declares an ingestion pipeline that the operator reconciles into K8s Jobs or CronJobs running `marmot ingest`.

func (*Run) DeepCopy

func (in *Run) DeepCopy() *Run

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

func (*Run) DeepCopyInto

func (in *Run) DeepCopyInto(out *Run)

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

func (*Run) DeepCopyObject

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

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

type RunList

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

RunList contains a list of Run.

func (*RunList) DeepCopy

func (in *RunList) DeepCopy() *RunList

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

func (*RunList) DeepCopyInto

func (in *RunList) DeepCopyInto(out *RunList)

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

func (*RunList) DeepCopyObject

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

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

type RunPhase

type RunPhase string

RunPhase describes the high-level state of a Run. +kubebuilder:validation:Enum=Idle;Scheduled;Running;Succeeded;Failed;Suspended

const (
	RunPhaseIdle      RunPhase = "Idle"
	RunPhaseScheduled RunPhase = "Scheduled"
	RunPhaseRunning   RunPhase = "Running"
	RunPhaseSucceeded RunPhase = "Succeeded"
	RunPhaseFailed    RunPhase = "Failed"
	RunPhaseSuspended RunPhase = "Suspended"
)

type RunSpec

type RunSpec struct {
	// Runs is the list of source configurations, identical to CLI YAML format.
	// Each entry maps a source name to its raw configuration.
	// +kubebuilder:validation:Required
	Runs []apiextensionsv1.JSON `json:"runs"`

	// Schedule is a cron expression. When set, a CronJob is created instead of a one-shot Job.
	// +optional
	Schedule string `json:"schedule,omitempty"`

	// Suspend tells the controller to suspend subsequent executions.
	// Applies only when Schedule is set.
	// +optional
	Suspend *bool `json:"suspend,omitempty"`

	// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
	// Valid values are Allow, Forbid, Replace.
	// +kubebuilder:validation:Enum=Allow;Forbid;Replace
	// +kubebuilder:default=Forbid
	// +optional
	ConcurrencyPolicy batchv1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`

	// BackoffLimit specifies the number of retries before marking a Job as failed.
	// +kubebuilder:default=3
	// +optional
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`

	// ActiveDeadlineSeconds specifies the duration in seconds relative to the
	// startTime that the Job may be active before the system tries to terminate it.
	// +optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`

	// SuccessfulJobsHistoryLimit is the number of successful finished CronJobs to retain.
	// +kubebuilder:default=3
	// +optional
	SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"`

	// FailedJobsHistoryLimit is the number of failed finished CronJobs to retain.
	// +kubebuilder:default=1
	// +optional
	FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"`

	// Resources overrides the container resource requirements for the ingestion Job pod.
	// +optional
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`

	// PodLabels are additional labels applied to the pod template of the Job or CronJob.
	// +optional
	PodLabels map[string]string `json:"podLabels,omitempty"`

	// PodAnnotations are additional annotations applied to the pod template of the Job or CronJob.
	// +optional
	PodAnnotations map[string]string `json:"podAnnotations,omitempty"`

	// TeardownOnDelete controls whether all assets created by this pipeline are
	// destroyed when the Run resource is deleted. Defaults to true.
	// +kubebuilder:default=true
	// +optional
	TeardownOnDelete *bool `json:"teardownOnDelete,omitempty"`
}

RunSpec defines the desired state of a Run.

func (*RunSpec) DeepCopy

func (in *RunSpec) DeepCopy() *RunSpec

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

func (*RunSpec) DeepCopyInto

func (in *RunSpec) DeepCopyInto(out *RunSpec)

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

type RunStatus

type RunStatus struct {
	// ObservedGeneration reflects the generation of the most recently observed Run spec.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Phase is the high-level summary of the Run state.
	// +optional
	Phase RunPhase `json:"phase,omitempty"`

	// LastRunTime is the last time a Job was started (scheduled or manually triggered).
	// +optional
	LastRunTime *metav1.Time `json:"lastRunTime,omitempty"`

	// LastSuccessfulTime is the last time a Job completed successfully.
	// +optional
	LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"`

	// Active is the number of currently running Jobs.
	// +optional
	Active int32 `json:"active,omitempty"`

	// Conditions represent the latest available observations of the Run's state.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

RunStatus defines the observed state of a Run.

func (*RunStatus) DeepCopy

func (in *RunStatus) DeepCopy() *RunStatus

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

func (*RunStatus) DeepCopyInto

func (in *RunStatus) DeepCopyInto(out *RunStatus)

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