v1alpha1

package
v0.0.0-...-356e0c6 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the metal3.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=metal3.io

Index

Constants

View Source
const (
	// Ready indicates that Ironic is fully available.
	IronicStatusReady IronicStatusConditionType = "Ready"

	IronicReasonFailed     = "DeploymentFailed"
	IronicReasonInProgress = "DeploymentInProgress"
	IronicReasonAvailable  = "DeploymentAvailable"

	IronicOperatorLabel = "metal3.io/ironic-standalone-operator"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "metal3.io", 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 SetDHCPDefaults

func SetDHCPDefaults(dhcp *DHCP)

func ValidateDHCP

func ValidateDHCP(ironic *IronicSpec, dhcp *DHCP) error

Types

type DHCP

type DHCP struct {
	// DNSAddress is the IP address of the DNS server to pass to hosts via DHCP.
	// Must not be set together with ServeDNS.
	// +optional
	DNSAddress string `json:"dnsAddress,omitempty"`

	// GatewayAddress is the IP address of the gateway to pass to hosts via DHCP.
	// +optional
	GatewayAddress string `json:"gatewayAddress,omitempty"`

	// Hosts is a set of DHCP host records to pass to dnsmasq.
	// Check the dnsmasq documentation on dhcp-host for an explanation of the format.
	// There is no API-side validation. Most users will leave this unset.
	// +optional
	Hosts []string `json:"hosts,omitempty"`

	// Ignore is set of dnsmasq tags to ignore and not provide any DHCP.
	// Check the dnsmasq documentation on dhcp-ignore for an explanation of the format.
	// There is no API-side validation. Most users will leave this unset.
	// +optional
	Ignore []string `json:"ignore,omitempty"`

	// NetworkCIDR is a CIRD of the provisioning network. Required.
	NetworkCIDR string `json:"networkCIDR,omitempty"`

	// RangeBegin is the first IP that can be given to hosts. Must be inside NetworkCIDR.
	// If not set, the 10th IP from NetworkCIDR is used (e.g. .10 for /24).
	// +optional
	RangeBegin string `json:"rangeBegin,omitempty"`

	// RangeEnd is the last IP that can be given to hosts. Must be inside NetworkCIDR.
	// If not set, the 2nd IP from the end of NetworkCIDR is used (e.g. .253 for /24).
	// +optional
	RangeEnd string `json:"rangeEnd,omitempty"`

	// ServeDNS is set to true to pass the provisioning host as the DNS server on the provisioning network.
	// Must not be set together with DNSAddress.
	// +optional
	ServeDNS bool `json:"serveDNS,omitempty"`
}

func (*DHCP) DeepCopy

func (in *DHCP) DeepCopy() *DHCP

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

func (*DHCP) DeepCopyInto

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

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

type Images

type Images struct {
	// AgentBranch is the branch of IPA to download. The main branch is used by default.
	// +optional
	AgentBranch string `json:"agentBranch,omitempty"`

	// AgentDownloadURL is the base URL from which IPA should be downloaded.
	// The default value should be good for most users.
	// +optional
	AgentDownloadURL string `json:"agentDownloadURL,omitempty"`

	// Ironic is the Ironic image (including httpd).
	// +kubebuilder:default=quay.io/metal3-io/ironic
	// +kubebuilder:validation:MinLength=1
	// +optional
	Ironic string `json:"ironic,omitempty"`

	// RamdiskDownloader is the image to be used at pod initialization to download the IPA ramdisk.
	// +kubebuilder:default=quay.io/metal3-io/ironic-ipa-downloader
	// +optional
	RamdiskDownloader string `json:"ramdiskDownloader,omitempty"`
}

func (*Images) DeepCopy

func (in *Images) DeepCopy() *Images

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

func (*Images) DeepCopyInto

func (in *Images) DeepCopyInto(out *Images)

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

type Inspection

type Inspection struct {
	// Collectors is a list of inspection collectors to enable.
	// See https://docs.openstack.org/ironic-python-agent/latest/admin/how_it_works.html#inspection-data for details.
	// +optional
	Collectors []string `json:"collectors,omitempty"`

	// List of interfaces to inspect for VLANs.
	// This can be interface names (to collect all VLANs using LLDP) or pairs <interface>.<vlan ID>.
	// +optional
	VLANInterfaces []string `json:"vlanInterfaces,omitempty"`
}

Inspection defines inspection settings

func (*Inspection) DeepCopy

func (in *Inspection) DeepCopy() *Inspection

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

func (*Inspection) DeepCopyInto

func (in *Inspection) DeepCopyInto(out *Inspection)

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

type Ironic

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

	Spec   IronicSpec   `json:"spec,omitempty"`
	Status IronicStatus `json:"status,omitempty"`
}

Ironic is the Schema for the ironics API

func (*Ironic) DeepCopy

func (in *Ironic) DeepCopy() *Ironic

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

func (*Ironic) DeepCopyInto

func (in *Ironic) DeepCopyInto(out *Ironic)

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

func (*Ironic) DeepCopyObject

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

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

func (*Ironic) Default

func (r *Ironic) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Ironic) SetupWebhookWithManager

func (r *Ironic) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Ironic) ValidateCreate

func (r *Ironic) ValidateCreate() (warnings admission.Warnings, err error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Ironic) ValidateDelete

func (r *Ironic) ValidateDelete() (warnings admission.Warnings, err error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Ironic) ValidateUpdate

func (r *Ironic) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type IronicDatabase

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

	Spec   IronicDatabaseSpec   `json:"spec,omitempty"`
	Status IronicDatabaseStatus `json:"status,omitempty"`
}

IronicDatabase is the Schema for the ironicdatabases API

func (*IronicDatabase) DeepCopy

func (in *IronicDatabase) DeepCopy() *IronicDatabase

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

func (*IronicDatabase) DeepCopyInto

func (in *IronicDatabase) DeepCopyInto(out *IronicDatabase)

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

func (*IronicDatabase) DeepCopyObject

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

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

func (*IronicDatabase) Default

func (r *IronicDatabase) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*IronicDatabase) SetupWebhookWithManager

func (r *IronicDatabase) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*IronicDatabase) ValidateCreate

func (r *IronicDatabase) ValidateCreate() (warnings admission.Warnings, err error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*IronicDatabase) ValidateDelete

func (r *IronicDatabase) ValidateDelete() (warnings admission.Warnings, err error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*IronicDatabase) ValidateUpdate

func (r *IronicDatabase) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type IronicDatabaseList

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

IronicDatabaseList contains a list of IronicDatabase

func (*IronicDatabaseList) DeepCopy

func (in *IronicDatabaseList) DeepCopy() *IronicDatabaseList

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

func (*IronicDatabaseList) DeepCopyInto

func (in *IronicDatabaseList) DeepCopyInto(out *IronicDatabaseList)

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

func (*IronicDatabaseList) DeepCopyObject

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

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

type IronicDatabaseSpec

type IronicDatabaseSpec struct {
	// CredentialsSecretRef is a reference to the secret with database credentials.
	// A new secret will be created if this field is empty.
	// +optional
	CredentialsRef corev1.LocalObjectReference `json:"credentialsRef,omitempty"`

	// Image is the MariaDB image.
	// +kubebuilder:default=quay.io/metal3-io/mariadb
	// +kubebuilder:validation:MinLength=1
	// +optional
	Image string `json:"image,omitempty"`

	// TLSSecretName is a reference to the secret with the database TLS certificate.
	// +optional
	TLSRef corev1.LocalObjectReference `json:"tlsRef,omitempty"`
}

IronicDatabaseSpec defines the desired state of IronicDatabase

func (*IronicDatabaseSpec) DeepCopy

func (in *IronicDatabaseSpec) DeepCopy() *IronicDatabaseSpec

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

func (*IronicDatabaseSpec) DeepCopyInto

func (in *IronicDatabaseSpec) DeepCopyInto(out *IronicDatabaseSpec)

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

type IronicDatabaseStatus

type IronicDatabaseStatus struct {
	// Conditions describe the state of the Ironic deployment.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

IronicDatabaseStatus defines the observed state of IronicDatabase

func (*IronicDatabaseStatus) DeepCopy

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

func (*IronicDatabaseStatus) DeepCopyInto

func (in *IronicDatabaseStatus) DeepCopyInto(out *IronicDatabaseStatus)

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

type IronicList

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

IronicList contains a list of Ironic

func (*IronicList) DeepCopy

func (in *IronicList) DeepCopy() *IronicList

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

func (*IronicList) DeepCopyInto

func (in *IronicList) DeepCopyInto(out *IronicList)

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

func (*IronicList) DeepCopyObject

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

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

type IronicSpec

type IronicSpec struct {
	// CredentialsRef is a reference to the secret with Ironic API credentials.
	// A new secret will be created if this field is empty.
	// +optional
	CredentialsRef corev1.LocalObjectReference `json:"credentialsRef,omitempty"`

	// DatabaseRef defines database settings for Ironic.
	// If missing, a local SQLite database will be used. Must be provided for a distributed architecture.
	// +optional
	DatabaseRef corev1.LocalObjectReference `json:"databaseRef,omitempty"`

	// DisableVirtualMediaTLS turns off TLS on the virtual media server,
	// which may be required for hardware that cannot accept HTTPS links.
	// +optional
	DisableVirtualMediaTLS bool `json:"disableVirtualMediaTLS,omitempty"`

	// DisableRPCHostValidation turns off TLS host validation for JSON RPC connections between Ironic instances.
	// This reduces the security of TLS. Only use if you're unable to provide TLS certificates valid for JSON RPC.
	// Has no effect if Distributed is not set to true.
	// +optional
	DisableRPCHostValidation bool `json:"disableRPCHostValidation,omitempty"`

	// Distributed causes Ironic to be deployed as a DaemonSet on control plane nodes instead of a deployment with 1 replica.
	// Requires database to be installed and linked to DatabaseRef.
	// EXPERIMENTAL: do not use (validation will fail)!
	// +optional
	Distributed bool `json:"distributed,omitempty"`

	// Images is a collection of container images to deploy from.
	Images Images `json:"images,omitempty"`

	// Inspection defines inspection settings
	Inspection Inspection `json:"inspection,omitempty"`

	// Networking defines networking settings for Ironic.
	// +optional
	Networking Networking `json:"networking,omitempty"`

	// TLSSecretName is a reference to the secret with the database TLS certificate.
	// +optional
	TLSRef corev1.LocalObjectReference `json:"tlsRef,omitempty"`

	// RamdiskExtraKernelParams is a string with kernel parameters to pass to the provisioning/inspection ramdisk.
	// Will not take effect if the host uses a pre-built ISO (either through its PreprovisioningImage or via the DEPLOY_ISO_URL baremetal-operator parameter).
	// +optional
	RamdiskExtraKernelParams string `json:"ramdiskExtraKernelParams,omitempty"`

	// RamdiskSSHKey is the contents of the public key to inject into the ramdisk for debugging purposes.
	// +optional
	RamdiskSSHKey string `json:"ramdiskSSHKey,omitempty"`
}

IronicSpec defines the desired state of Ironic

func (*IronicSpec) DeepCopy

func (in *IronicSpec) DeepCopy() *IronicSpec

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

func (*IronicSpec) DeepCopyInto

func (in *IronicSpec) DeepCopyInto(out *IronicSpec)

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

type IronicStatus

type IronicStatus struct {
	// Conditions describe the state of the Ironic deployment.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

IronicStatus defines the observed state of Ironic

func (*IronicStatus) DeepCopy

func (in *IronicStatus) DeepCopy() *IronicStatus

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

func (*IronicStatus) DeepCopyInto

func (in *IronicStatus) DeepCopyInto(out *IronicStatus)

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

type IronicStatusConditionType

type IronicStatusConditionType string

type Networking

type Networking struct {
	// APIPort is the public port used for Ironic.
	// +kubebuilder:default=6385
	// +kubebuilder:validation:Minimum=1
	// +optional
	APIPort int32 `json:"apiPort,omitempty"`

	// BindInterface makes Ironic API bound to only one interface.
	// +optional
	BindInterface bool `json:"bindInterface,omitempty"`

	// DHCP is a configuration of DHCP for the network boot service (dnsmasq).
	// The service is only deployed when this is set.
	DHCP *DHCP `json:"dhcp,omitempty"`

	// ExternalIP is used for accessing API and the image server from remote hosts.
	// This settings only applies to virtual media deployments. The IP will not be accessed from the cluster itself.
	// +optional
	ExternalIP string `json:"externalIP,omitempty"`

	// ImageServerPort is the public port used for serving images.
	// +kubebuilder:default=6180
	// +kubebuilder:validation:Minimum=1
	// +optional
	ImageServerPort int32 `json:"imageServerPort,omitempty"`

	// ImageServerTLSPort is the public port used for serving virtual media images over TLS.
	// +kubebuilder:default=6183
	// +kubebuilder:validation:Minimum=1
	// +optional
	ImageServerTLSPort int32 `json:"imageServerTLSPort,omitempty"`

	// Interface is a Linux network device to listen on.
	// Detected from IPAddress if missing.
	// +optional
	Interface string `json:"interface,omitempty"`

	// IPAddress is the main IP address to listen on and use for communication.
	// Detected from Interface if missing. Cannot be provided for a distributed architecture.
	// +optional
	IPAddress string `json:"ipAddress,omitempty"`

	// MACAddresses can be provided to make the start script pick the interface matching any of these addresses.
	// Only set if no other options can be used.
	// +optional
	MACAddresses []string `json:"macAddresses,omitempty"`
}

Networking defines networking settings for Ironic

func (*Networking) DeepCopy

func (in *Networking) DeepCopy() *Networking

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

func (*Networking) DeepCopyInto

func (in *Networking) DeepCopyInto(out *Networking)

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