v1alpha1

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the bmc v1alpha1 API group +kubebuilder:object:generate=true +groupName=bmc.tinkerbell.org

Index

Constants

This section is empty.

Variables

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

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

func FormatTaskName

func FormatTaskName(job Job, n int) string

FormatTaskName returns a Task name based on Job name.

Types

type Action

type Action struct {
	// PowerAction represents a baseboard management power operation.
	// +kubebuilder:validation:Enum=on;off;soft;status;cycle;reset
	PowerAction *PowerAction `json:"powerAction,omitempty"`

	// OneTimeBootDeviceAction represents a baseboard management one time set boot device operation.
	OneTimeBootDeviceAction *OneTimeBootDeviceAction `json:"oneTimeBootDeviceAction,omitempty"`

	// VirtualMediaAction represents a baseboard management virtual media insert/eject.
	VirtualMediaAction *VirtualMediaAction `json:"virtualMediaAction,omitempty"`
}

Action represents the action to be performed. A single task can only perform one type of action. For example either PowerAction or OneTimeBootDeviceAction. +kubebuilder:validation:MaxProperties:=1

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 BootDevice

type BootDevice string

BootDevice represents boot device of the Machine.

const (
	PXE   BootDevice = "pxe"
	Disk  BootDevice = "disk"
	BIOS  BootDevice = "bios"
	CDROM BootDevice = "cdrom"
	Safe  BootDevice = "safe"
)

type ConditionStatus

type ConditionStatus string

ConditionStatus represents the status of a Condition.

const (
	ConditionTrue  ConditionStatus = "True"
	ConditionFalse ConditionStatus = "False"
)

type Connection

type Connection struct {
	// Host is the host IP address or hostname of the Machine.
	// +kubebuilder:validation:MinLength=1
	Host string `json:"host"`

	// Port is the port number for connecting with the Machine.
	// +kubebuilder:default:=623
	// +optional
	Port int `json:"port"`

	// AuthSecretRef is the SecretReference that contains authentication information of the Machine.
	// The Secret must contain username and password keys. This is optional as it is not required when using
	// the RPC provider.
	// +optional
	AuthSecretRef corev1.SecretReference `json:"authSecretRef"`

	// InsecureTLS specifies trusted TLS connections.
	InsecureTLS bool `json:"insecureTLS"`

	// ProviderOptions contains provider specific options.
	// +optional
	ProviderOptions *ProviderOptions `json:"providerOptions,omitempty"`
}

Connection contains connection data for a Baseboard Management Controller.

func (*Connection) DeepCopy

func (in *Connection) DeepCopy() *Connection

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

func (*Connection) DeepCopyInto

func (in *Connection) DeepCopyInto(out *Connection)

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

type ExperimentalOpts added in v0.3.2

type ExperimentalOpts struct {
	// CustomRequestPayload must be in json.
	// +optional
	CustomRequestPayload string `json:"customRequestPayload"`
	// DotPath is the path to the json object where the bmclib RequestPayload{} struct will be embedded. For example: object.data.body
	// +optional
	DotPath string `json:"dotPath"`
}

ExperimentalOpts are options we're still learning about and should be used carefully.

func (*ExperimentalOpts) DeepCopy added in v0.3.2

func (in *ExperimentalOpts) DeepCopy() *ExperimentalOpts

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

func (*ExperimentalOpts) DeepCopyInto added in v0.3.2

func (in *ExperimentalOpts) DeepCopyInto(out *ExperimentalOpts)

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

type HMACAlgorithm added in v0.3.2

type HMACAlgorithm string

HMACAlgorithm is a type for HMAC algorithms.

type HMACOpts added in v0.3.2

type HMACOpts struct {
	// PrefixSigDisabled determines whether the algorithm will be prefixed to the signature. Example: sha256=abc123
	// +optional
	PrefixSigDisabled bool `json:"prefixSigDisabled"`
	// Secrets are a map of algorithms to secrets used for signing.
	// +optional
	Secrets HMACSecrets `json:"secrets"`
}

HMACOpts are the options used to create an HMAC signature.

func (*HMACOpts) DeepCopy added in v0.3.2

func (in *HMACOpts) DeepCopy() *HMACOpts

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

func (*HMACOpts) DeepCopyInto added in v0.3.2

func (in *HMACOpts) DeepCopyInto(out *HMACOpts)

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

type HMACSecrets added in v0.3.2

type HMACSecrets map[HMACAlgorithm][]corev1.SecretReference

HMACSecrets holds per Algorithm slice secrets. These secrets will be used to create HMAC signatures.

func (HMACSecrets) DeepCopy added in v0.3.2

func (in HMACSecrets) DeepCopy() HMACSecrets

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

func (HMACSecrets) DeepCopyInto added in v0.3.2

func (in HMACSecrets) DeepCopyInto(out *HMACSecrets)

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

type IPMITOOLOptions added in v0.3.2

type IPMITOOLOptions struct {
	// Port that ipmitool will use for calls.
	// +optional
	Port int `json:"port"`
	// CipherSuite that ipmitool will use for calls.
	// +optional
	CipherSuite string `json:"cipherSuite"`
}

IPMITOOLOptions contains the ipmitool provider specific options.

func (*IPMITOOLOptions) DeepCopy added in v0.3.2

func (in *IPMITOOLOptions) DeepCopy() *IPMITOOLOptions

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

func (*IPMITOOLOptions) DeepCopyInto added in v0.3.2

func (in *IPMITOOLOptions) DeepCopyInto(out *IPMITOOLOptions)

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

type IntelAMTOptions added in v0.3.2

type IntelAMTOptions struct {
	// Port that intelAMT will use for calls.
	Port int `json:"port"`
}

IntelAMTOptions contains the intelAMT provider specific options.

func (*IntelAMTOptions) DeepCopy added in v0.3.2

func (in *IntelAMTOptions) DeepCopy() *IntelAMTOptions

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

func (*IntelAMTOptions) DeepCopyInto added in v0.3.2

func (in *IntelAMTOptions) DeepCopyInto(out *IntelAMTOptions)

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

type Job

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

	Spec   JobSpec   `json:"spec,omitempty"`
	Status JobStatus `json:"status,omitempty"`
}

Job is the Schema for the bmcjobs API.

func (*Job) DeepCopy

func (in *Job) DeepCopy() *Job

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

func (*Job) DeepCopyInto

func (in *Job) DeepCopyInto(out *Job)

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

func (*Job) DeepCopyObject

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

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

func (*Job) HasCondition

func (j *Job) HasCondition(cType JobConditionType, cStatus ConditionStatus) bool

HasCondition checks if the cType condition is present with status cStatus on a bmj.

func (*Job) SetCondition

func (j *Job) SetCondition(cType JobConditionType, status ConditionStatus, opts ...JobSetConditionOption)

SetCondition applies the cType condition to bmj. If the condition already exists, it is updated.

type JobCondition

type JobCondition struct {
	// Type of the Job condition.
	Type JobConditionType `json:"type"`

	// Status is the status of the Job condition.
	// Can be True or False.
	Status ConditionStatus `json:"status"`

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

func (*JobCondition) DeepCopy

func (in *JobCondition) DeepCopy() *JobCondition

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

func (*JobCondition) DeepCopyInto

func (in *JobCondition) DeepCopyInto(out *JobCondition)

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

type JobConditionType

type JobConditionType string

JobConditionType represents the condition of the BMC Job.

const (
	// JobCompleted represents successful completion of the BMC Job tasks.
	JobCompleted JobConditionType = "Completed"
	// JobFailed represents failure in BMC job execution.
	JobFailed JobConditionType = "Failed"
	// JobRunning represents a currently executing BMC job.
	JobRunning JobConditionType = "Running"
)

type JobList

type JobList struct {
	metav1.TypeMeta `json:""`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Job `json:"items"`
}

JobList contains a list of Job.

func (*JobList) DeepCopy

func (in *JobList) DeepCopy() *JobList

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

func (*JobList) DeepCopyInto

func (in *JobList) DeepCopyInto(out *JobList)

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

func (*JobList) DeepCopyObject

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

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

type JobSetConditionOption

type JobSetConditionOption func(*JobCondition)

+kubebuilder:object:generate=false

func WithJobConditionMessage

func WithJobConditionMessage(m string) JobSetConditionOption

WithJobConditionMessage sets message m to the JobCondition.

type JobSpec

type JobSpec struct {
	// MachineRef represents the Machine resource to execute the job.
	// All the tasks in the job are executed for the same Machine.
	MachineRef MachineRef `json:"machineRef"`

	// Tasks represents a list of baseboard management actions to be executed.
	// The tasks are executed sequentially. Controller waits for one task to complete before executing the next.
	// If a single task fails, job execution stops and sets condition Failed.
	// Condition Completed is set only if all the tasks were successful.
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:UniqueItems=false
	Tasks []Action `json:"tasks"`
}

JobSpec defines the desired state of Job.

func (*JobSpec) DeepCopy

func (in *JobSpec) DeepCopy() *JobSpec

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

func (*JobSpec) DeepCopyInto

func (in *JobSpec) DeepCopyInto(out *JobSpec)

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

type JobStatus

type JobStatus struct {
	// Conditions represents the latest available observations of an object's current state.
	// +optional
	Conditions []JobCondition `json:"conditions,omitempty"`

	// StartTime represents time when the Job controller started processing a job.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime represents time when the job was completed.
	// The completion time is only set when the job finishes successfully.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
}

JobStatus defines the observed state of Job.

func (*JobStatus) DeepCopy

func (in *JobStatus) DeepCopy() *JobStatus

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

func (*JobStatus) DeepCopyInto

func (in *JobStatus) DeepCopyInto(out *JobStatus)

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

type Machine

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

	Spec   MachineSpec   `json:"spec,omitempty"`
	Status MachineStatus `json:"status,omitempty"`
}

Machine is the Schema for the machines API.

func (*Machine) DeepCopy

func (in *Machine) DeepCopy() *Machine

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

func (*Machine) DeepCopyInto

func (in *Machine) DeepCopyInto(out *Machine)

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

func (*Machine) DeepCopyObject

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

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

func (*Machine) SetCondition

func (bm *Machine) SetCondition(cType MachineConditionType, status ConditionStatus, opts ...MachineSetConditionOption)

SetCondition applies the cType condition to bm. If the condition already exists, it is updated.

type MachineCondition

type MachineCondition struct {
	// Type of the Machine condition.
	Type MachineConditionType `json:"type"`

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

	// LastUpdateTime of the condition.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`

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

MachineCondition defines an observed condition of a Machine.

func (*MachineCondition) DeepCopy

func (in *MachineCondition) DeepCopy() *MachineCondition

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

func (*MachineCondition) DeepCopyInto

func (in *MachineCondition) DeepCopyInto(out *MachineCondition)

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

type MachineConditionType

type MachineConditionType string

MachineConditionType represents the condition of the Machine.

const (
	// Contactable defines that a connection can be made to the Machine.
	Contactable MachineConditionType = "Contactable"
)

type MachineList

type MachineList struct {
	metav1.TypeMeta `json:""`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Machine `json:"items"`
}

MachineList contains a list of Machines.

func (*MachineList) DeepCopy

func (in *MachineList) DeepCopy() *MachineList

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

func (*MachineList) DeepCopyInto

func (in *MachineList) DeepCopyInto(out *MachineList)

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

func (*MachineList) DeepCopyObject

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

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

type MachineRef added in v0.2.0

type MachineRef struct {
	// Name of the Machine.
	Name string `json:"name"`

	// Namespace the Machine resides in.
	Namespace string `json:"namespace"`
}

MachineRef is used to reference a Machine object.

func (*MachineRef) DeepCopy added in v0.2.1

func (in *MachineRef) DeepCopy() *MachineRef

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

func (*MachineRef) DeepCopyInto added in v0.2.1

func (in *MachineRef) DeepCopyInto(out *MachineRef)

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

type MachineSetConditionOption

type MachineSetConditionOption func(*MachineCondition)

+kubebuilder:object:generate=false

func WithMachineConditionMessage

func WithMachineConditionMessage(m string) MachineSetConditionOption

WithMachineConditionMessage sets message m to the MachineCondition.

type MachineSpec

type MachineSpec struct {
	// Connection contains connection data for a Baseboard Management Controller.
	Connection Connection `json:"connection"`
}

MachineSpec defines desired machine state.

func (*MachineSpec) DeepCopy

func (in *MachineSpec) DeepCopy() *MachineSpec

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

func (*MachineSpec) DeepCopyInto

func (in *MachineSpec) DeepCopyInto(out *MachineSpec)

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

type MachineStatus

type MachineStatus struct {
	// Power is the current power state of the Machine.
	// +kubebuilder:validation:Enum=on;off;unknown
	// +optional
	Power PowerState `json:"powerState,omitempty"`

	// Conditions represents the latest available observations of an object's current state.
	// +optional
	Conditions []MachineCondition `json:"conditions,omitempty"`
}

MachineStatus defines the observed state of Machine.

func (*MachineStatus) DeepCopy

func (in *MachineStatus) DeepCopy() *MachineStatus

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

func (*MachineStatus) DeepCopyInto

func (in *MachineStatus) DeepCopyInto(out *MachineStatus)

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

type OneTimeBootDeviceAction

type OneTimeBootDeviceAction struct {
	// Devices represents the boot devices, in order for setting one time boot.
	// Currently only the first device in the slice is used to set one time boot.
	Devices []BootDevice `json:"device"`

	// EFIBoot instructs the machine to use EFI boot.
	EFIBoot bool `json:"efiBoot,omitempty"`
}

OnTimeBootDeviceAction represents a baseboard management one time set boot device operation.

func (*OneTimeBootDeviceAction) DeepCopy

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

func (*OneTimeBootDeviceAction) DeepCopyInto

func (in *OneTimeBootDeviceAction) DeepCopyInto(out *OneTimeBootDeviceAction)

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

type PowerAction

type PowerAction string

PowerAction represents the power control operation on the baseboard management.

const (
	PowerOn      PowerAction = "on"
	PowerHardOff PowerAction = "off"
	PowerSoftOff PowerAction = "soft"
	PowerCycle   PowerAction = "cycle"
	PowerReset   PowerAction = "reset"
	PowerStatus  PowerAction = "status"
)

func (PowerAction) Ptr

func (p PowerAction) Ptr() *PowerAction

Pointer provides an easy way to retrieve the power action as a pointer for use in job tasks.

type PowerState

type PowerState string

PowerState represents power state of a Machine.

const (
	On      PowerState = "on"
	Off     PowerState = "off"
	Unknown PowerState = "unknown"
)

type ProviderOptions added in v0.3.2

type ProviderOptions struct {
	// IntelAMT contains the options to customize the IntelAMT provider.
	// +optional
	IntelAMT *IntelAMTOptions `json:"intelAMT"`

	// IPMITOOL contains the options to customize the Ipmitool provider.
	// +optional
	IPMITOOL *IPMITOOLOptions `json:"ipmitool"`

	// Redfish contains the options to customize the Redfish provider.
	// +optional
	Redfish *RedfishOptions `json:"redfish"`

	// RPC contains the options to customize the RPC provider.
	// +optional
	RPC *RPCOptions `json:"rpc"`
}

func (*ProviderOptions) DeepCopy added in v0.3.2

func (in *ProviderOptions) DeepCopy() *ProviderOptions

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

func (*ProviderOptions) DeepCopyInto added in v0.3.2

func (in *ProviderOptions) DeepCopyInto(out *ProviderOptions)

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

type RPCOptions added in v0.3.2

type RPCOptions struct {
	// ConsumerURL is the URL where an rpc consumer/listener is running
	// and to which we will send and receive all notifications.
	ConsumerURL string `json:"consumerURL"`
	// LogNotificationsDisabled determines whether responses from rpc consumer/listeners will be logged or not.
	// +optional
	LogNotificationsDisabled bool `json:"logNotificationsDisabled"`
	// Request is the options used to create the rpc HTTP request.
	// +optional
	Request *RequestOpts `json:"request"`
	// Signature is the options used for adding an HMAC signature to an HTTP request.
	// +optional
	Signature *SignatureOpts `json:"signature"`
	// HMAC is the options used to create a HMAC signature.
	// +optional
	HMAC *HMACOpts `json:"hmac"`
	// Experimental options.
	// +optional
	Experimental *ExperimentalOpts `json:"experimental"`
}

RPCOptions defines the configurable options to use when sending rpc notifications.

func (*RPCOptions) DeepCopy added in v0.3.2

func (in *RPCOptions) DeepCopy() *RPCOptions

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

func (*RPCOptions) DeepCopyInto added in v0.3.2

func (in *RPCOptions) DeepCopyInto(out *RPCOptions)

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

type RedfishOptions added in v0.3.2

type RedfishOptions struct {
	// Port that redfish will use for calls.
	Port int `json:"port"`
}

RedfishOptions contains the redfish provider specific options.

func (*RedfishOptions) DeepCopy added in v0.3.2

func (in *RedfishOptions) DeepCopy() *RedfishOptions

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

func (*RedfishOptions) DeepCopyInto added in v0.3.2

func (in *RedfishOptions) DeepCopyInto(out *RedfishOptions)

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

type RequestOpts added in v0.3.2

type RequestOpts struct {
	// HTTPContentType is the content type to use for the rpc request notification.
	// +optional
	HTTPContentType string `json:"httpContentType"`
	// HTTPMethod is the HTTP method to use for the rpc request notification.
	// +optional
	HTTPMethod string `json:"httpMethod"`
	// StaticHeaders are predefined headers that will be added to every request.
	// +optional
	StaticHeaders http.Header `json:"staticHeaders"`
	// TimestampFormat is the time format for the timestamp header.
	// +optional
	TimestampFormat string `json:"timestampFormat"`
	// TimestampHeader is the header name that should contain the timestamp. Example: X-BMCLIB-Timestamp
	// +optional
	TimestampHeader string `json:"timestampHeader"`
}

RequestOpts are the options used when creating an HTTP request.

func (*RequestOpts) DeepCopy added in v0.3.2

func (in *RequestOpts) DeepCopy() *RequestOpts

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

func (*RequestOpts) DeepCopyInto added in v0.3.2

func (in *RequestOpts) DeepCopyInto(out *RequestOpts)

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

type SignatureOpts added in v0.3.2

type SignatureOpts struct {
	// HeaderName is the header name that should contain the signature(s). Example: X-BMCLIB-Signature
	// +optional
	HeaderName string `json:"headerName"`
	// AppendAlgoToHeaderDisabled decides whether to append the algorithm to the signature header or not.
	// Example: X-BMCLIB-Signature becomes X-BMCLIB-Signature-256
	// When set to true, a header will be added for each algorithm. Example: X-BMCLIB-Signature-256 and X-BMCLIB-Signature-512
	// +optional
	AppendAlgoToHeaderDisabled bool `json:"appendAlgoToHeaderDisabled"`
	// IncludedPayloadHeaders are headers whose values will be included in the signature payload. Example: X-BMCLIB-My-Custom-Header
	// All headers will be deduplicated.
	// +optional
	IncludedPayloadHeaders []string `json:"includedPayloadHeaders"`
}

SignatureOpts are the options used for adding an HMAC signature to an HTTP request.

func (*SignatureOpts) DeepCopy added in v0.3.2

func (in *SignatureOpts) DeepCopy() *SignatureOpts

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

func (*SignatureOpts) DeepCopyInto added in v0.3.2

func (in *SignatureOpts) DeepCopyInto(out *SignatureOpts)

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

type Task

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

	Spec   TaskSpec   `json:"spec,omitempty"`
	Status TaskStatus `json:"status,omitempty"`
}

Task is the Schema for the Task API.

func (*Task) DeepCopy

func (in *Task) DeepCopy() *Task

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

func (*Task) DeepCopyInto

func (in *Task) DeepCopyInto(out *Task)

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

func (*Task) DeepCopyObject

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

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

func (*Task) HasCondition

func (t *Task) HasCondition(cType TaskConditionType, cStatus ConditionStatus) bool

HasCondition checks if the cType condition is present with status cStatus on a bmt.

func (*Task) SetCondition

func (t *Task) SetCondition(cType TaskConditionType, status ConditionStatus, opts ...TaskSetConditionOption)

SetCondition applies the cType condition to bmt. If the condition already exists, it is updated.

type TaskCondition

type TaskCondition struct {
	// Type of the Task condition.
	Type TaskConditionType `json:"type"`

	// Status is the status of the Task condition.
	// Can be True or False.
	Status ConditionStatus `json:"status"`

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

func (*TaskCondition) DeepCopy

func (in *TaskCondition) DeepCopy() *TaskCondition

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

func (*TaskCondition) DeepCopyInto

func (in *TaskCondition) DeepCopyInto(out *TaskCondition)

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

type TaskConditionType

type TaskConditionType string

TaskConditionType represents the condition type on for Tasks.

const (
	// TaskCompleted represents successful completion of the Task.
	TaskCompleted TaskConditionType = "Completed"
	// TaskFailed represents failure in Task execution.
	TaskFailed TaskConditionType = "Failed"
)

type TaskList

type TaskList struct {
	metav1.TypeMeta `json:""`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Task `json:"items"`
}

TaskList contains a list of Task.

func (*TaskList) DeepCopy

func (in *TaskList) DeepCopy() *TaskList

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

func (*TaskList) DeepCopyInto

func (in *TaskList) DeepCopyInto(out *TaskList)

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

func (*TaskList) DeepCopyObject

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

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

type TaskSetConditionOption

type TaskSetConditionOption func(*TaskCondition)

+kubebuilder:object:generate=false

func WithTaskConditionMessage

func WithTaskConditionMessage(m string) TaskSetConditionOption

WithTaskConditionMessage sets message m to the TaskCondition.

type TaskSpec

type TaskSpec struct {
	// Task defines the specific action to be performed.
	Task Action `json:"task"`

	// Connection represents the Machine connectivity information.
	Connection Connection `json:"connection,omitempty"`
}

TaskSpec defines the desired state of Task.

func (*TaskSpec) DeepCopy

func (in *TaskSpec) DeepCopy() *TaskSpec

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

func (*TaskSpec) DeepCopyInto

func (in *TaskSpec) DeepCopyInto(out *TaskSpec)

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

type TaskStatus

type TaskStatus struct {
	// Conditions represents the latest available observations of an object's current state.
	// +optional
	Conditions []TaskCondition `json:"conditions,omitempty"`

	// StartTime represents time when the Task started processing.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime represents time when the task was completed.
	// The completion time is only set when the task finishes successfully.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
}

TaskStatus defines the observed state of Task.

func (*TaskStatus) DeepCopy

func (in *TaskStatus) DeepCopy() *TaskStatus

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

func (*TaskStatus) DeepCopyInto

func (in *TaskStatus) DeepCopyInto(out *TaskStatus)

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

type VirtualMediaAction added in v0.3.0

type VirtualMediaAction struct {
	// mediaURL represents the URL of the image to be inserted into the virtual media, or empty to
	// eject media.
	MediaURL string `json:"mediaURL,omitempty"`

	Kind VirtualMediaKind `json:"kind"`
}

VirtualMediaAction represents a virtual media action.

func (*VirtualMediaAction) DeepCopy added in v0.3.0

func (in *VirtualMediaAction) DeepCopy() *VirtualMediaAction

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

func (*VirtualMediaAction) DeepCopyInto added in v0.3.0

func (in *VirtualMediaAction) DeepCopyInto(out *VirtualMediaAction)

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

type VirtualMediaKind added in v0.3.0

type VirtualMediaKind string
const (
	// VirtualMediaCD represents a virtual CD-ROM.
	VirtualMediaCD VirtualMediaKind = "CD"
)

Jump to

Keyboard shortcuts

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