bmc

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package bmc contains API GroupVersion definition for the BMC v1alpha1 API. +kubebuilder:object:generate=true +groupName=bmc.tinkerbell.org +versionName:=v1alpha1

Index

Constants

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

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

	// VirtualMediaCD represents a virtual CD-ROM.
	VirtualMediaCD VirtualMediaKind = "CD"
)

Variables

View Source
var GroupVersion = schema.GroupVersion{Group: "bmc.tinkerbell.org", Version: "v1alpha1"}

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.
	// +kubebuilder:deprecatedversion:warning="oneTimeBootDeviceAction is deprecated and will be removed in a future release. Use bootDevice instead."
	OneTimeBootDeviceAction *OneTimeBootDeviceAction `json:"oneTimeBootDeviceAction,omitempty"`

	// BootDevice is the device to set as the first boot device on the Machine.
	BootDevice *BootDeviceConfig `json:"bootDevice,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.

func (BootDevice) String added in v0.19.0

func (b BootDevice) String() string

type BootDeviceConfig added in v0.19.0

type BootDeviceConfig struct {
	// Device is the name of the device to set as the first boot device.
	Device BootDevice `json:"device,omitempty"`

	// Persistent indicates whether the boot device should be set persistently as the first boot device.
	Persistent bool `json:"persistent,omitempty"`

	// EFIBoot indicates whether the boot device should be set to efiboot mode.
	EFIBoot bool `json:"efiBoot,omitempty"`
}

BootDeviceConfig represents the configuration for setting a boot device.

func (*BootDeviceConfig) DeepCopy added in v0.19.0

func (in *BootDeviceConfig) DeepCopy() *BootDeviceConfig

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

func (*BootDeviceConfig) DeepCopyInto added in v0.19.0

func (in *BootDeviceConfig) DeepCopyInto(out *BootDeviceConfig)

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

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

type ExperimentalOpts struct {
	// CustomRequestPayload must be in json.
	// +optional
	CustomRequestPayload string `json:"customRequestPayload,omitempty"`
	// 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,omitempty"`
}

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

func (*ExperimentalOpts) DeepCopy

func (in *ExperimentalOpts) DeepCopy() *ExperimentalOpts

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

func (*ExperimentalOpts) DeepCopyInto

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

type HMACAlgorithm string

HMACAlgorithm is a type for HMAC algorithms.

type HMACOpts

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

HMACOpts are the options used to create an HMAC signature.

func (*HMACOpts) DeepCopy

func (in *HMACOpts) DeepCopy() *HMACOpts

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

func (*HMACOpts) DeepCopyInto

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

type HMACSecrets map[HMACAlgorithm][]corev1.SecretReference

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

func (HMACSecrets) DeepCopy

func (in HMACSecrets) DeepCopy() HMACSecrets

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

func (HMACSecrets) DeepCopyInto

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

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

IPMITOOLOptions contains the ipmitool provider specific options.

func (*IPMITOOLOptions) DeepCopy

func (in *IPMITOOLOptions) DeepCopy() *IPMITOOLOptions

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

func (*IPMITOOLOptions) DeepCopyInto

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

type IntelAMTOptions struct {
	// Port that intelAMT will use for calls.
	// +optional
	Port int `json:"port,omitempty"`

	// HostScheme determines whether to use http or https for intelAMT calls.
	// +optional
	// +kubebuilder:validation:Enum=http;https
	// +kubebuilder:default:=http
	HostScheme string `json:"hostScheme,omitempty"`
}

IntelAMTOptions contains the intelAMT provider specific options.

func (*IntelAMTOptions) DeepCopy

func (in *IntelAMTOptions) DeepCopy() *IntelAMTOptions

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

func (*IntelAMTOptions) DeepCopyInto

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

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

func (in *MachineRef) DeepCopy() *MachineRef

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

func (*MachineRef) DeepCopyInto

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"`
}

OneTimeBootDeviceAction represents a single operation to set the machine's one-time boot device via the BMC. Deprecated. Will be removed in a future release. Use BootDeviceConfig instead.

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.

func (PowerAction) String added in v0.19.0

func (p PowerAction) String() string

type PowerState

type PowerState string

PowerState represents power state of a Machine.

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

type ProviderName

type ProviderName string

ProviderName is the bmclib specific provider name. Names are case insensitive. +kubebuilder:validation:Pattern=(?i)^(ipmitool|asrockrack|gofish|IntelAMT|dell|supermicro|openbmc)$

func (ProviderName) String

func (p ProviderName) String() string

type ProviderOptions

type ProviderOptions struct {
	// PreferredOrder allows customizing the order that BMC providers are called.
	// Providers added to this list will be moved to the front of the default order.
	// Provider names are case insensitive.
	// The default order is: ipmitool, asrockrack, gofish, intelamt, dell, supermicro, openbmc.
	// +optional
	PreferredOrder []ProviderName `json:"preferredOrder,omitempty"`
	// IntelAMT contains the options to customize the IntelAMT provider.
	// +optional
	IntelAMT *IntelAMTOptions `json:"intelAMT,omitempty"`

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

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

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

ProviderOptions hold provider specific configurable options.

func (*ProviderOptions) DeepCopy

func (in *ProviderOptions) DeepCopy() *ProviderOptions

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

func (*ProviderOptions) DeepCopyInto

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

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,omitempty"`
	// Request is the options used to create the rpc HTTP request.
	// +optional
	Request *RequestOpts `json:"request,omitempty"`
	// Signature is the options used for adding an HMAC signature to an HTTP request.
	// +optional
	Signature *SignatureOpts `json:"signature,omitempty"`
	// HMAC is the options used to create a HMAC signature.
	// +optional
	HMAC *HMACOpts `json:"hmac,omitempty"`
	// Experimental options.
	// +optional
	Experimental *ExperimentalOpts `json:"experimental,omitempty"`
}

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

func (*RPCOptions) DeepCopy

func (in *RPCOptions) DeepCopy() *RPCOptions

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

func (*RPCOptions) DeepCopyInto

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

type RedfishOptions struct {
	// Port that redfish will use for calls.
	// +optional
	Port int `json:"port,omitempty"`
	// UseBasicAuth for redfish calls. The default is false which means token based auth is used.
	// +optional
	UseBasicAuth bool `json:"useBasicAuth,omitempty"`
	// SystemName is the name of the system to use for redfish calls.
	// With redfish implementations that manage multiple systems via a single endpoint, this allows for specifying the system to manage.
	// +optional
	SystemName string `json:"systemName,omitempty"`
}

RedfishOptions contains the redfish provider specific options.

func (*RedfishOptions) DeepCopy

func (in *RedfishOptions) DeepCopy() *RedfishOptions

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

func (*RedfishOptions) DeepCopyInto

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

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

RequestOpts are the options used when creating an HTTP request.

func (*RequestOpts) DeepCopy

func (in *RequestOpts) DeepCopy() *RequestOpts

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

func (*RequestOpts) DeepCopyInto

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

type SignatureOpts struct {
	// HeaderName is the header name that should contain the signature(s). Example: X-BMCLIB-Signature
	// +optional
	HeaderName string `json:"headerName,omitempty"`
	// 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,omitempty"`
	// 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,omitempty"`
}

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

func (*SignatureOpts) DeepCopy

func (in *SignatureOpts) DeepCopy() *SignatureOpts

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

func (*SignatureOpts) DeepCopyInto

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

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 represents the kind of virtual media.
	Kind VirtualMediaKind `json:"kind"`
}

VirtualMediaAction represents a virtual media action.

func (*VirtualMediaAction) DeepCopy

func (in *VirtualMediaAction) DeepCopy() *VirtualMediaAction

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

func (*VirtualMediaAction) DeepCopyInto

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

type VirtualMediaKind string

VirtualMediaKind represents the kind of virtual media.

func (VirtualMediaKind) String added in v0.19.0

func (v VirtualMediaKind) String() string

Jump to

Keyboard shortcuts

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