rufio

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true

Index

Constants

View Source
const (
	// On represents that a Machine is powered on.
	On PowerState = "on"
	// Off represents that a Machine is powered off.
	Off PowerState = "off"
	// Unknown represents that a Machine's power state is unknown.
	Unknown PowerState = "unknown"
	// PXE is the boot device name for PXE booting a machine.
	PXE string = "pxe"
)

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

This section is empty.

Types

type ConditionStatus

type ConditionStatus string

ConditionStatus represents the status of a Condition.

const (
	// ConditionTrue represents that a Machine is contactable.
	ConditionTrue ConditionStatus = "True"
	// ConditionFalse represents that a Machine is not contactable.
	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"`
	// 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

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

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"`
	// CipherSuite that ipmitool will use for calls.
	// +optional
	CipherSuite string `json:"cipherSuite"`
}

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.
	Port int `json:"port"`
}

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

type MachineSetConditionOption func(*MachineCondition)

MachineSetConditionOption is a function that manipulates a 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 PowerState

type PowerState string

PowerState represents power state of a Machine.

type ProviderOptions

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

ProviderOptions contains all the provider specific 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"`
	// 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

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.
	Port int `json:"port"`
}

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

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

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.

Jump to

Keyboard shortcuts

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