v1alpha2

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

	// 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 Action

type Action struct {
	// Name is a name for the action.
	Name string `json:"name"`

	// Image is an OCI image.
	Image string `json:"image"`

	// Cmd defines the command to use when launching the image. It overrides the default command
	// of the action. It must be a unix path to an executable program.
	// +kubebuilder:validation:Pattern=`^(/[^/ ]*)+/?$`
	// +optional
	Cmd *string `json:"cmd,omitempty"`

	// Args are a set of arguments to be passed to the command executed by the container on
	// launch.
	// +optional
	Args []string `json:"args,omitempty"`

	// Env defines environment variables used when launching the container.
	//+optional
	Env map[string]string `json:"env,omitempty"`

	// Volumes defines the volumes to mount into the container.
	// +optional
	Volumes []Volume `json:"volumes,omitempty"`

	// Namespace defines the Linux namespaces this container should execute in.
	// +optional
	Namespace *Namespace `json:"namespaces,omitempty"`
}

Action defines an individual action to be run on a target machine.

func (*Action) DeepCopy

func (in *Action) DeepCopy() *Action

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

func (*Action) DeepCopyInto

func (in *Action) DeepCopyInto(out *Action)

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

type ActionState

type ActionState string

ActionState describes a point in time state of an Action.

const (
	// ActionStatePending indicates an Action is awaiting execution.
	ActionStatePending ActionState = "Pending"

	// ActionStateRunning indicates an Action has begun execution.
	ActionStateRunning ActionState = "Running"

	// ActionStateSucceeded indicates an Action completed execution successfully.
	ActionStateSucceeded ActionState = "Succeeded"

	// ActionStatFailed indicates an Action failed to execute. Users may inspect the associated
	// Workflow resource to gain deeper insights into why the action failed.
	ActionStateFailed ActionState = "Failed"
)

type ActionStatus

type ActionStatus struct {
	// Rendered is the rendered action.
	Rendered Action `json:"rendered,omitempty"`

	// ID uniquely identifies the action status.
	ID string `json:"id"`

	// StartedAt is the time the action was started as reported by the client. Nil indicates the
	// Action has not started.
	StartedAt *metav1.Time `json:"startedAt,omitempty"`

	// LastTransition is the observed time when State transitioned last.
	LastTransition *metav1.Time `json:"lastTransitioned,omitempty"`

	// State describes the current state of the action.
	State ActionState `json:"state,omitempty"`

	// FailureReason is a short CamelCase word or phrase describing why the Action entered
	// ActionStateFailed.
	FailureReason string `json:"failureReason,omitempty"`

	// FailureMessage is a free-form user friendly message describing why the Action entered the
	// ActionStateFailed state. Typically, this is an elaboration on the Reason.
	FailureMessage string `json:"failureMessage,omitempty"`
}

ActionStatus describes status information about an action.

func (*ActionStatus) DeepCopy

func (in *ActionStatus) DeepCopy() *ActionStatus

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

func (*ActionStatus) DeepCopyInto

func (in *ActionStatus) DeepCopyInto(out *ActionStatus)

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

type Condition

type Condition struct {
	// Type of condition.
	Type ConditionType `json:"type"`

	// Status of the condition.
	Status ConditionStatus `json:"status"`

	// LastTransition is the last time the condition transitioned from one status to another.
	LastTransition metav1.Time `json:"lastTransitionTime"`

	// Reason is a short CamelCase description for the conditions last transition.
	// +optional
	Reason *string `json:"reason,omitempty"`

	// Message is a human readable message indicating details about the last transition.
	// +optional
	Message *string `json:"message,omitempty"`
}

Condition defines an observation on a resource that is generally attainable by inspecting other status fields.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConditionStatus

type ConditionStatus string

ConditionStatus expresses the current state of the condition.

const (
	// ConditionStatusUnknown is the default status and indicates the condition cannot be
	// evaluated as True or False.
	ConditionStatusUnknown ConditionStatus = "Unknown"

	// ConditionStatusTrue indicates the condition has been evaluated as true.
	ConditionStatusTrue ConditionStatus = "True"

	// ConditionStatusFalse indicates the condition has been evaluated as false.
	ConditionStatusFalse ConditionStatus = "False"
)

type ConditionType

type ConditionType string

ConditionType identifies the type of condition.

type Conditions

type Conditions []Condition

Conditions define a list of observations of a particular resource.

func (Conditions) DeepCopy

func (in Conditions) DeepCopy() Conditions

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

func (Conditions) DeepCopyInto

func (in Conditions) DeepCopyInto(out *Conditions)

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

type DHCP

type DHCP struct {
	// IP is an IPv4 address to serve.
	// +kubebuilder:validation:Pattern=`(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}`
	IP string `json:"ip,omitempty"`

	// Netmask is an IPv4 netmask to serve.
	// +kubebuilder+validation:Pattern=`^(255)\.(0|128|192|224|240|248|252|254|255)\.(0|128|192|224|240|248|252|254|255)\.(0|128|192|224|240|248|252|254|255)`
	Netmask string `json:"netmask,omitempty"`

	// Gateway is the default gateway address to serve.
	// +kubebuilder:validation:Pattern=`(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}`
	// +optional
	Gateway *string `json:"gateway,omitempty"`

	// +kubebuilder:validation:Pattern=`^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9]"[A-Za-z0-9\-]*[A-Za-z0-9])$`
	// +optional
	Hostname *string `json:"hostname,omitempty"`

	// VLANID is a VLAN ID between 0 and 4096.
	// +kubebuilder:validation:Pattern=`^(([0-9][0-9]{0,2}|[1-3][0-9][0-9][0-9]|40([0-8][0-9]|9[0-6]))(,[1-9][0-9]{0,2}|[1-3][0-9][0-9][0-9]|40([0-8][0-9]|9[0-6]))*)$`
	// +optional
	VLANID *string `json:"vlanId,omitempty"`

	// Nameservers to serve.
	// +optional
	Nameservers []Nameserver `json:"nameservers,omitempty"`

	// Timeservers to serve.
	// +optional
	Timeservers []Timeserver `json:"timeservers,omitempty"`

	// LeaseTimeSeconds to serve. 24h default. Maximum equates to max uint32 as defined by RFC 2132
	// § 9.2 (https://www.rfc-editor.org/rfc/rfc2132.html#section-9.2).
	// +kubebuilder:default=86400
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=4294967295
	// +optional
	LeaseTimeSeconds *int64 `json:"leaseTimeSeconds"`
}

DHCP describes basic network configuration to be served in DHCP OFFER responses. It can be considered a DHCP reservation.

func (*DHCP) DeepCopy

func (in *DHCP) DeepCopy() *DHCP

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

func (*DHCP) DeepCopyInto

func (in *DHCP) DeepCopyInto(out *DHCP)

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

type Hardware

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

	Spec HardwareSpec `json:"spec,omitempty"`
}

Hardware is a logical representation of a machine that can execute Workflows.

func (*Hardware) DeepCopy

func (in *Hardware) DeepCopy() *Hardware

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

func (*Hardware) DeepCopyInto

func (in *Hardware) DeepCopyInto(out *Hardware)

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

func (*Hardware) DeepCopyObject

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

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

func (*Hardware) GetIPs

func (h *Hardware) GetIPs() []string

GetIPs retrieves all IP addresses. It does not consider the DisableDHCP flag.

func (*Hardware) GetMACs

func (h *Hardware) GetMACs() []string

GetMACs retrieves all MACs associated with h.

type HardwareList

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

func (*HardwareList) DeepCopy

func (in *HardwareList) DeepCopy() *HardwareList

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

func (*HardwareList) DeepCopyInto

func (in *HardwareList) DeepCopyInto(out *HardwareList)

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

func (*HardwareList) DeepCopyObject

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

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

type HardwareSpec

type HardwareSpec struct {
	// NetworkInterfaces defines the desired DHCP and netboot configuration for a network interface.
	// +kubebuilder:validation:MinPoperties=1
	NetworkInterfaces NetworkInterfaces `json:"networkInterfaces,omitempty"`

	// IPXE provides iPXE script override fields. This is useful for debugging or netboot
	// customization.
	// +optional.
	IPXE *IPXE `json:"ipxe,omitempty"`

	// OSIE describes the Operating System Installation Environment to be netbooted.
	OSIE corev1.LocalObjectReference `json:"osie,omitempty"`

	// KernelParams passed to the kernel when launching the OSIE. Parameters are joined with a
	// space.
	// +optional
	KernelParams []string `json:"kernelParams,omitempty"`

	// Instance describes instance specific data that is generally unused by Tinkerbell core.
	// +optional
	Instance *Instance `json:"instance,omitempty"`

	// StorageDevices is a list of storage devices that will be available in the OSIE.
	// +optional.
	StorageDevices []StorageDevice `json:"storageDevices,omitempty"`

	// BMCRef references a Rufio Machine object.
	// +optional.
	BMCRef *corev1.LocalObjectReference `json:"bmcRef,omitempty"`
}

func (*HardwareSpec) DeepCopy

func (in *HardwareSpec) DeepCopy() *HardwareSpec

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

func (*HardwareSpec) DeepCopyInto

func (in *HardwareSpec) DeepCopyInto(out *HardwareSpec)

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

type IPXE

type IPXE struct {
	// Content is an inline iPXE script.
	// +optional
	Content *string `json:"inline,omitempty"`

	// URL is a URL to a hosted iPXE script.
	// +optional
	URL *string `json:"url,omitempty"`
}

IPXE describes overrides for IPXE scripts. At least 1 option must be specified.

func (*IPXE) DeepCopy

func (in *IPXE) DeepCopy() *IPXE

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

func (*IPXE) DeepCopyInto

func (in *IPXE) DeepCopyInto(out *IPXE)

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

type Instance

type Instance struct {
	// Userdata is data with a structure understood by the producer and consumer of the data.
	// +optional
	Userdata *string `json:"userdata,omitempty"`

	// Vendordata is data with a structure understood by the producer and consumer of the data.
	// +optional
	Vendordata *string `json:"vendordata,omitempty"`
}

Instance describes instance specific data. Instance specific data is typically dependent on the permanent OS that a piece of hardware runs. This data is often served by an instance metadata service such as Tinkerbell's Hegel. The core Tinkerbell stack does not leverage this data.

func (*Instance) DeepCopy

func (in *Instance) DeepCopy() *Instance

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

func (*Instance) DeepCopyInto

func (in *Instance) DeepCopyInto(out *Instance)

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

type MAC

type MAC string

MAC is a Media Access Control address. MACs must use lower case letters. +kubebuilder:validation:Pattern=`^([0-9a-f]{2}:){5}([0-9a-f]{2})$`

type Nameserver

type Nameserver string

Nameserver is an IP or hostname. +kubebuilder:validation:Pattern=`^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`

type Namespace added in v0.10.0

type Namespace struct {
	// Network defines the network namespace.
	// +optional
	Network *string `json:"network,omitempty"`

	// PID defines the PID namespace
	// +optional
	PID *int `json:"pid,omitempty"`
}

Namespace defines the Linux namespaces to use for the container. See https://man7.org/linux/man-pages/man7/namespaces.7.html.

func (*Namespace) DeepCopy added in v0.10.0

func (in *Namespace) DeepCopy() *Namespace

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

func (*Namespace) DeepCopyInto added in v0.10.0

func (in *Namespace) DeepCopyInto(out *Namespace)

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

type NetworkInterface

type NetworkInterface struct {
	// DHCP is the basic network information for serving DHCP requests. Required when DisbaleDHCP
	// is false.
	// +optional
	DHCP *DHCP `json:"dhcp,omitempty"`

	// DisableDHCP disables DHCP for this interface. Implies DisableNetboot.
	// +kubebuilder:default=false
	DisableDHCP bool `json:"disableDhcp,omitempty"`

	// DisableNetboot disables netbooting for this interface. The interface will still receive
	// network information specified by DHCP.
	// +kubebuilder:default=false
	DisableNetboot bool `json:"disableNetboot,omitempty"`
}

NetworkInterface is the desired configuration for a particular network interface.

func (*NetworkInterface) DeepCopy

func (in *NetworkInterface) DeepCopy() *NetworkInterface

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

func (*NetworkInterface) DeepCopyInto

func (in *NetworkInterface) DeepCopyInto(out *NetworkInterface)

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

func (NetworkInterface) IsDHCPEnabled

func (ni NetworkInterface) IsDHCPEnabled() bool

IsDHCPEnabled checks if DHCP is enabled for ni.

func (NetworkInterface) IsNetbootEnabled

func (ni NetworkInterface) IsNetbootEnabled() bool

IsNetbootEnabled checks if Netboot is enabled for ni.

type NetworkInterfaces

type NetworkInterfaces map[MAC]NetworkInterface

NetworkInterfaces maps a MAC address to a NetworkInterface.

func (NetworkInterfaces) DeepCopy

func (in NetworkInterfaces) DeepCopy() NetworkInterfaces

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

func (NetworkInterfaces) DeepCopyInto

func (in NetworkInterfaces) DeepCopyInto(out *NetworkInterfaces)

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

type OSIE

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

	Spec OSIESpec `json:"spec,omitempty"`
}

OSIE describes an Operating System Installation Environment. It is used by Tinkerbell to provision machines and should launch the Tink Worker component.

func (*OSIE) DeepCopy

func (in *OSIE) DeepCopy() *OSIE

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

func (*OSIE) DeepCopyInto

func (in *OSIE) DeepCopyInto(out *OSIE)

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

func (*OSIE) DeepCopyObject

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

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

type OSIEList

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

func (*OSIEList) DeepCopy

func (in *OSIEList) DeepCopy() *OSIEList

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

func (*OSIEList) DeepCopyInto

func (in *OSIEList) DeepCopyInto(out *OSIEList)

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

func (*OSIEList) DeepCopyObject

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

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

type OSIESpec

type OSIESpec struct {
	// KernelURL is a URL to a kernel image.
	KernelURL string `json:"kernelUrl,omitempty"`

	// InitrdURL is a URL to an initrd image.
	InitrdURL string `json:"initrdUrl,omitempty"`
}

func (*OSIESpec) DeepCopy

func (in *OSIESpec) DeepCopy() *OSIESpec

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

func (*OSIESpec) DeepCopyInto

func (in *OSIESpec) DeepCopyInto(out *OSIESpec)

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

type StorageDevice

type StorageDevice string

StorageDevice describes a storage device path that will be present in the OSIE. StorageDevices must be valid Linux paths. They should not contain partitions.

Good

/dev/sda
/dev/nvme0n1

Bad (contains partitions)

/dev/sda1
/dev/nvme0n1p1

Bad (invalid Linux path)

\dev\sda

+kubebuilder:validation:Pattern=`^(/[^/ ]*)+/?$`

type Template

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

	Spec TemplateSpec `json:"spec,omitempty"`
}

Template defines a set of actions to be run on a target machine. The template is rendered prior to execution where it is exposed to Hardware and user defined data. Most fields within the TemplateSpec may contain templates values excluding .TemplateSpec.Actions[].Name. See https://pkg.go.dev/text/template for more details.

func (*Template) DeepCopy

func (in *Template) DeepCopy() *Template

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

func (*Template) DeepCopyInto

func (in *Template) DeepCopyInto(out *Template)

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

func (*Template) DeepCopyObject

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

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

type TemplateList

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

func (*TemplateList) DeepCopy

func (in *TemplateList) DeepCopy() *TemplateList

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

func (*TemplateList) DeepCopyInto

func (in *TemplateList) DeepCopyInto(out *TemplateList)

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

func (*TemplateList) DeepCopyObject

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

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

type TemplateSpec

type TemplateSpec struct {
	// Actions defines the set of actions to be run on a target machine. Actions are run sequentially
	// in the order they are specified. At least 1 action must be specified. Names of actions
	// must be unique within a Template.
	// +kubebuilder:validation:MinItems=1
	Actions []Action `json:"actions,omitempty"`

	// Volumes to be mounted on all actions. If an action specifies the same volume it will take
	// precedence.
	// +optional
	Volumes []Volume `json:"volumes,omitempty"`

	// Env defines environment variables to be available in all actions. If an action specifies
	// the same environment variable it will take precedence.
	// +optional
	Env map[string]string `json:"env,omitempty"`
}

func (*TemplateSpec) DeepCopy

func (in *TemplateSpec) DeepCopy() *TemplateSpec

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

func (*TemplateSpec) DeepCopyInto

func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec)

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

type Timeserver

type Timeserver string

Timeserver is an IP or hostname. +kubebuilder:validation:Pattern=`^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$`

type Volume

type Volume string

Volume is a specification for mounting a volume in an action. Volumes take the form {SRC-VOLUME-NAME | SRC-HOST-DIR}:TGT-CONTAINER-DIR:OPTIONS. When specifying a VOLUME-NAME that does not exist it will be created for you. Examples:

Read-only bind mount bound to /data

/etc/data:/data:ro

Writable volume name bound to /data

shared_volume:/data

See https://docs.docker.com/storage/volumes/ for additional details.

type Workflow

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

	Spec   WorkflowSpec   `json:"spec,omitempty"`
	Status WorkflowStatus `json:"status,omitempty"`
}

Workflow describes a set of actions to be run on a specific Hardware. Workflows execute once and should be considered ephemeral.

func (*Workflow) DeepCopy

func (in *Workflow) DeepCopy() *Workflow

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

func (*Workflow) DeepCopyInto

func (in *Workflow) DeepCopyInto(out *Workflow)

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

func (*Workflow) DeepCopyObject

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

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

type WorkflowList

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

func (*WorkflowList) DeepCopy

func (in *WorkflowList) DeepCopy() *WorkflowList

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

func (*WorkflowList) DeepCopyInto

func (in *WorkflowList) DeepCopyInto(out *WorkflowList)

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

func (*WorkflowList) DeepCopyObject

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

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

type WorkflowSpec

type WorkflowSpec struct {
	// HardwareRef is a reference to a Hardware resource this workflow will execute on.
	HardwareRef corev1.LocalObjectReference `json:"hardwareRef,omitempty"`

	// TemplateRef is a reference to a Template resource used to render workflow actions.
	TemplateRef corev1.LocalObjectReference `json:"templateRef,omitempty"`

	// TemplateParams are a list of key-value pairs that are injected into templates at render
	// time. TemplateParams are exposed to templates using a top level .Params key.
	//
	// For example, TemplateParams = {"foo": "bar"}, the foo key can be accessed via .Params.foo.
	// +optional
	TemplateParams map[string]string `json:"templateParams,omitempty"`

	// TimeoutSeconds defines the time the workflow has to complete. The timer begins when the first
	// action is requested. When set to 0, no timeout is applied.
	// +kubebuilder:default=0
	// +kubebuilder:validation:Minimum=0
	TimeoutSeconds int64 `json:"timeout,omitempty"`
}

func (*WorkflowSpec) DeepCopy

func (in *WorkflowSpec) DeepCopy() *WorkflowSpec

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

func (*WorkflowSpec) DeepCopyInto

func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec)

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

type WorkflowState

type WorkflowState string

State describes the point in time state of a Workflow.

const (
	// WorkflowStatePending indicates the Workflow is awaiting dispatch to the agent.
	WorkflowStatePending WorkflowState = "Pending"

	// WorkflowStateScheduled indicates the Workflow has been dispatched to the agent but the agent
	// is yet to report the Workflow has started.
	WorkflowStateScheduled WorkflowState = "Scheduled"

	// WorkflowStateRunning indicates the Workflow has begun executing.
	WorkflowStateRunning WorkflowState = "Running"

	// WorkflowStateCancelling indicates the agent has been instructed to cancel the Workflow, but
	// the cancellation is yet to be completed.
	WorkflowStateCancelling WorkflowState = "Cancelling"

	// WorkflowStateSucceeded indicates all Actions have successfully completed.
	WorkflowStateSucceeded WorkflowState = "Succeeded"

	// WorkflowStateFailed indicates an Action failed.
	WorkflowStateFailed WorkflowState = "Failed"

	// WorkflowStateCanceled indicates the Workflow has been canceled.
	WorkflowStateCanceled WorkflowState = "Canceled"
)

type WorkflowStatus

type WorkflowStatus struct {
	// Actions is a list of action states.
	Actions []ActionStatus `json:"actions"`

	// StartedAt is the time the first action was requested. Nil indicates the Workflow has not
	// started.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`

	// LastTransition is the observed time when State transitioned last.
	LastTransition metav1.Time `json:"lastTransitioned,omitempty"`

	// State describes the current state of the Workflow.
	State WorkflowState `json:"state,omitempty"`

	// Conditions details a set of observations about the Workflow.
	// +optional
	Conditions Conditions `json:"conditions"`
}

func (*WorkflowStatus) DeepCopy

func (in *WorkflowStatus) DeepCopy() *WorkflowStatus

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

func (*WorkflowStatus) DeepCopyInto

func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus)

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