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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Config) GetDestination ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Retry.
func (*Retry) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.