Help us shape the future of Go! Take the 2026 Go Developer Survey

v1

package
v1.0.43 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the batch v1 API group +kubebuilder:object:generate=true +groupName=batch.flanksource.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "batch.flanksource.com", 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 BatchTrigger

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

	Spec   Config             `json:"spec,omitempty"`
	Status BatchTriggerStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,shortName=batch +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Queue",type=string,JSONPath=`.status.connectionState` +kubebuilder:printcolumn:name="Processed",type=integer,JSONPath=`.status.messagesProcessed` +kubebuilder:printcolumn:name="Failed",type=integer,JSONPath=`.status.messagesFailed` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` BatchTrigger is the Schema for the batch-runner configuration

func (*BatchTrigger) DeepCopy

func (in *BatchTrigger) DeepCopy() *BatchTrigger

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

func (*BatchTrigger) DeepCopyInto

func (in *BatchTrigger) DeepCopyInto(out *BatchTrigger)

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

func (*BatchTrigger) DeepCopyObject

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

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

type BatchTriggerList

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

+kubebuilder:object:root=true BatchTriggerList contains a list of BatchTrigger

func (*BatchTriggerList) DeepCopy

func (in *BatchTriggerList) DeepCopy() *BatchTriggerList

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

func (*BatchTriggerList) DeepCopyInto

func (in *BatchTriggerList) DeepCopyInto(out *BatchTriggerList)

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

func (*BatchTriggerList) DeepCopyObject

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

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

type BatchTriggerStatus

type BatchTriggerStatus struct {
	// ConnectionState indicates queue connection status: Connected, Disconnected, Error
	ConnectionState string `json:"connectionState,omitempty"`

	// MessagesProcessed is the total number of successfully processed messages
	MessagesProcessed int64 `json:"messagesProcessed,omitempty"`

	// MessagesFailed is the total number of failed messages
	MessagesFailed int64 `json:"messagesFailed,omitempty"`

	// MessagesRetried is the total number of retried messages
	MessagesRetried int64 `json:"messagesRetried,omitempty"`

	// LastError contains the most recent error message
	LastError string `json:"lastError,omitempty"`

	// LastErrorTime is when the last error occurred
	LastErrorTime *metav1.Time `json:"lastErrorTime,omitempty"`

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

BatchTriggerStatus defines the observed state of BatchTrigger

func (*BatchTriggerStatus) DeepCopy

func (in *BatchTriggerStatus) DeepCopy() *BatchTriggerStatus

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

func (*BatchTriggerStatus) DeepCopyInto

func (in *BatchTriggerStatus) DeepCopyInto(out *BatchTriggerStatus)

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

type Config

type Config struct {
	// +optional
	LogLevel           string       `json:"logLevel,omitempty"`
	Pod                *corev1.Pod  `json:"pod,omitempty"`
	Job                *batchv1.Job `json:"job,omitempty"`
	Exec               *ExecAction  `json:"exec,omitempty"`
	dutyps.QueueConfig `json:",inline"`
}

Config defines the desired state of BatchTrigger +kubebuilder:object:generate=true

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

func (*Config) GetDestination

func (c *Config) GetDestination() fmt.Stringer

func (Config) String

func (c Config) String() string

type ExecAction

type ExecAction struct {
	// Script can be an inline script or a path to a script that needs to be executed
	// On windows executed via powershell and in darwin and linux executed using bash
	Script      string                     `yaml:"script" json:"script" template:"true"`
	Connections connection.ExecConnections `yaml:"connections,omitempty" json:"connections,omitempty" template:"true"`
	// Artifacts to save
	Artifacts []shell.Artifact `yaml:"artifacts,omitempty" json:"artifacts,omitempty" template:"true"`
	// EnvVars are the environment variables that are accessible to exec processes
	EnvVars []types.EnvVar `yaml:"env,omitempty" json:"env,omitempty"`
	// Checkout details the git repository that should be mounted to the process
	Checkout *connection.GitConnection `yaml:"checkout,omitempty" json:"checkout,omitempty"`

	Retry *Retry `yaml:"retry,omitempty" json:"retry,omitempty"`
}

func (*ExecAction) DeepCopy

func (in *ExecAction) DeepCopy() *ExecAction

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

func (*ExecAction) DeepCopyInto

func (in *ExecAction) DeepCopyInto(out *ExecAction)

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

func (ExecAction) String

func (e ExecAction) String() string

func (*ExecAction) ToShellExec

func (e *ExecAction) ToShellExec() shell.Exec

type Retry

type Retry struct {
	Attempts int `json:"attempts,omitempty"`
	// Delay is the time in seconds to wait between retries
	Delay int `json:"delay"`
}

func (*Retry) DeepCopy

func (in *Retry) DeepCopy() *Retry

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

func (*Retry) DeepCopyInto

func (in *Retry) DeepCopyInto(out *Retry)

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

type S

type S string

func (S) String

func (s S) String() string

Jump to

Keyboard shortcuts

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