v1alpha1

package
v0.0.0-...-76c580c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 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=ironic.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"
)
View Source
const (
	FeatureHighAvailability featuregate.Feature = "HighAvailability"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "ironic.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
)
View Source
var (
	CurrentFeatureGate = featuregate.NewFeatureGate()
)

Functions

func SetDHCPDefaults

func SetDHCPDefaults(dhcp *DHCP)

func ValidateDHCP

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

func ValidateIronic

func ValidateIronic(ironic *IronicSpec, old *IronicSpec) 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 DeployRamdisk

type DeployRamdisk struct {
	// DisableDownloader tells the operator not to start the IPA downloader as the init container.
	// The user will be responsible for providing the right image to BareMetal Operator.
	// +optional
	DisableDownloader bool `json:"disableDownloader,omitempty"`

	// ExtraKernelParams 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
	ExtraKernelParams string `json:"extraKernelParams,omitempty"`

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

DeployRamdisk defines IPA ramdisk settings

func (*DeployRamdisk) DeepCopy

func (in *DeployRamdisk) DeepCopy() *DeployRamdisk

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

func (*DeployRamdisk) DeepCopyInto

func (in *DeployRamdisk) DeepCopyInto(out *DeployRamdisk)

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

type IPAddressManager

type IPAddressManager string
const (
	IPAddressManagerNone       IPAddressManager = ""
	IPAddressManagerKeepalived IPAddressManager = "keepalived"
)

type Images

type Images struct {
	// DeployRamdiskBranch is the branch of IPA to download. The main branch is used by default.
	// Not used if deployRamdisk.disableDownloader is true.
	// +optional
	DeployRamdiskBranch string `json:"deployRamdiskBranch,omitempty"`

	// DeployRamdiskDownloader is the image to be used at pod initialization to download the IPA ramdisk.
	// Not used if deployRamdisk.disableDownloader is true.
	// +optional
	DeployRamdiskDownloader string `json:"deployRamdiskDownloader,omitempty"`

	// Ironic is the Ironic image (including httpd).
	// +optional
	Ironic string `json:"ironic,omitempty"`

	// Keepalived is the Keepalived image.
	// Not used if networking.ipAddressManager is not set to keepalived.
	// +optional
	Keepalived string `json:"keepalived,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 InstalledVersion

type InstalledVersion struct {
	// Branch of Ironic that was installed.
	Branch string `json:"branch"`
}

InstalledVersion identifies which version of Ironic was installed.

func (*InstalledVersion) DeepCopy

func (in *InstalledVersion) DeepCopy() *InstalledVersion

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

func (*InstalledVersion) DeepCopyInto

func (in *InstalledVersion) DeepCopyInto(out *InstalledVersion)

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 {
	// CredentialsName is a reference to the secret with database credentials.
	// A new secret will be created if this field is empty.
	// +optional
	CredentialsName string `json:"credentialsName,omitempty"`

	// Image is the MariaDB image.
	// +optional
	Image string `json:"image,omitempty"`

	// TLSCertificateName is a reference to the secret with the database TLS certificate.
	// +optional
	TLSCertificateName string `json:"tlsCertificateName,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 {
	// APICredentialsName is a reference to the secret with Ironic API credentials.
	// A new secret will be created if this field is empty.
	// +optional
	APICredentialsName string `json:"apiCredentialsName,omitempty"`

	// DatabaseName is a reference to the IronicDatabase object.
	// If missing, a local SQLite database will be used. Must be provided for a highly available architecture.
	// +optional
	DatabaseName string `json:"databaseName,omitempty"`

	// DeployRamdisk defines settings for the provisioning/inspection ramdisk based on Ironic Python Agent.
	// +optional
	DeployRamdisk DeployRamdisk `json:"deployRamdisk,omitempty"`

	// HighAvailability 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 DatabaseName.
	// EXPERIMENTAL: do not use (validation will fail)!
	// +optional
	HighAvailability bool `json:"highAvailability,omitempty"`

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

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

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

	// NodeSelector is a selector which must be true for the Ironic pod to fit on a node.
	// Selector which must match a node's labels for the vmi to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// TLS defines TLS-related settings for various network interactions.
	// +optional
	TLS TLS `json:"tls,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"`

	// InstalledVersion identifies which version of Ironic was installed.
	// +optional
	InstalledVersion *InstalledVersion `json:"installedVersion,omitempty"`
}

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 highly available architecture.
	// +optional
	IPAddress string `json:"ipAddress,omitempty"`

	// Configures the way the provided IP address will be managed on the provided interface.
	// By default, the IP address is expected to be already present.
	// Use "keepalived" to start a Keepalived container managing the IP address.
	// Warning: keepalived is not compatible with the highly available architecture.
	// +kubebuilder:validation:Enum="";keepalived
	// +optional
	IPAddressManager IPAddressManager `json:"ipAddressManager,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.

type TLS

type TLS struct {
	// CertificateName is a reference to the secret with the TLS certificate.
	// +optional
	CertificateName string `json:"certificateName,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 HighAvailability is not set to true.
	// +optional
	DisableRPCHostValidation bool `json:"disableRPCHostValidation,omitempty"`
}

TLS defines the TLS settings.

func (*TLS) DeepCopy

func (in *TLS) DeepCopy() *TLS

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

func (*TLS) DeepCopyInto

func (in *TLS) DeepCopyInto(out *TLS)

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