Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the bmc v1alpha1 API group +kubebuilder:object:generate=true +groupName=bmc.tinkerbell.org
Index ¶
- Variables
- func FormatTaskName(job Job, n int) string
- type Action
- type BootDevice
- type ConditionStatus
- type Connection
- type Job
- func (in *Job) DeepCopy() *Job
- func (in *Job) DeepCopyInto(out *Job)
- func (in *Job) DeepCopyObject() runtime.Object
- func (j *Job) HasCondition(cType JobConditionType, cStatus ConditionStatus) bool
- func (j *Job) SetCondition(cType JobConditionType, status ConditionStatus, opts ...JobSetConditionOption)
- type JobCondition
- type JobConditionType
- type JobList
- type JobSetConditionOption
- type JobSpec
- type JobStatus
- type Machine
- type MachineCondition
- type MachineConditionType
- type MachineList
- type MachineRef
- type MachineSetConditionOption
- type MachineSpec
- type MachineStatus
- type OneTimeBootDeviceAction
- type PowerAction
- type PowerState
- type Task
- type TaskCondition
- type TaskConditionType
- type TaskList
- type TaskSetConditionOption
- type TaskSpec
- type TaskStatus
Constants ¶
This section is empty.
Variables ¶
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 ¶
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"`
}
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action.
func (*Action) DeepCopyInto ¶
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
Port int `json:"port"`
// AuthSecretRef is the SecretReference that contains authentication information of the Machine.
// The Secret must contain username and password keys.
AuthSecretRef corev1.SecretReference `json:"authSecretRef"`
// InsecureTLS specifies trusted TLS connections.
InsecureTLS bool `json:"insecureTLS"`
}
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 Job ¶
type Job struct {
metav1.TypeMeta `json:",inline"`
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Job.
func (*Job) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Job) DeepCopyObject ¶
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:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Job `json:"items"`
}
JobList contains a list of Job
func (*JobList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobList.
func (*JobList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JobList) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobSpec.
func (*JobSpec) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobStatus.
func (*JobStatus) DeepCopyInto ¶
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:",inline"`
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine.
func (*Machine) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Machine) DeepCopyObject ¶
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:",inline"`
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
// +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 ¶
func (in *OneTimeBootDeviceAction) DeepCopy() *OneTimeBootDeviceAction
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" )
type Task ¶
type Task struct {
metav1.TypeMeta `json:",inline"`
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.
func (*Task) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Task) DeepCopyObject ¶
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:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Task `json:"items"`
}
TaskList contains a list of Task
func (*TaskList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskList.
func (*TaskList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TaskList) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.
func (*TaskSpec) DeepCopyInto ¶
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.