Documentation ¶
Overview ¶
Package baremetal contains baremetal-specific structures for installer configuration and management.
Index ¶
Constants ¶
const Name string = "baremetal"
Name is the name for the baremetal platform.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BMC ¶
type BMC struct { Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` Address string `json:"address" validate:"required,uniqueField"` DisableCertificateVerification bool `json:"disableCertificateVerification"` }
BMC stores the information about a baremetal host's management controller.
type BootMode ¶
type BootMode string
BootMode puts the server in legacy (BIOS), UEFI secure boot or UEFI mode for booting. Secure boot is only enabled during the final instance boot. The default is UEFI. +kubebuilder:validation:Enum="";UEFI;UEFISecureBoot;legacy
type Host ¶
type Host struct { Name string `json:"name,omitempty" validate:"required,uniqueField"` BMC BMC `json:"bmc"` Role string `json:"role"` BootMACAddress string `json:"bootMACAddress" validate:"required,uniqueField"` HardwareProfile string `json:"hardwareProfile"` RootDeviceHints *RootDeviceHints `json:"rootDeviceHints,omitempty"` BootMode BootMode `json:"bootMode,omitempty"` NetworkConfig *apiextv1.JSON `json:"networkConfig,omitempty"` }
Host stores all the configuration data for a baremetal host.
func (*Host) CompareByRole ¶
CompareByRole allows to compare two hosts by the Role
type MachinePool ¶
type MachinePool struct { }
MachinePool stores the configuration for a machine pool installed on bare metal.
func (*MachinePool) Set ¶
func (l *MachinePool) Set(required *MachinePool)
Set sets the values from `required` to `a`.
type Metadata ¶
type Metadata struct { LibvirtURI string `json:"libvirtURI"` BootstrapProvisioningIP string `json:"bootstrapProvisioningIP"` ClusterProvisioningIP string `json:"provisioningHostIP"` }
Metadata contains baremetal metadata (e.g. for uninstalling the cluster).
type Platform ¶
type Platform struct { // LibvirtURI is the identifier for the libvirtd connection. It must be // reachable from the host where the installer is run. // Default is qemu:///system // // +kubebuilder:default="qemu:///system" // +optional LibvirtURI string `json:"libvirtURI,omitempty"` // ClusterProvisioningIP is the IP on the dedicated provisioning network // where the baremetal-operator pod runs provisioning services, // and an http server to cache some downloaded content e.g RHCOS/IPA images // +optional ClusterProvisioningIP string `json:"clusterProvisioningIP,omitempty"` // DeprecatedProvisioningHostIP is the deprecated version of clusterProvisioningIP. When the // baremetal platform was initially added to the installer, the JSON field for ClusterProvisioningIP // was incorrectly set to "provisioningHostIP." This field is here to allow backwards-compatibility. // +optional DeprecatedProvisioningHostIP string `json:"provisioningHostIP,omitempty"` // BootstrapProvisioningIP is the IP used on the bootstrap VM to // bring up provisioning services that are used to create the // control-plane machines // // +kubebuilder:validation:Format=ip // +optional BootstrapProvisioningIP string `json:"bootstrapProvisioningIP,omitempty"` // External bridge is used for external communication. // +optional ExternalBridge string `json:"externalBridge,omitempty"` // ExternalMACAddress is used to allow setting a static unicast MAC // address for the bootstrap host on the external network. Consider // using the QEMU vendor prefix `52:54:00`. If left blank, libvirt will // generate one for you. // +optional ExternalMACAddress string `json:"externalMACAddress,omitempty"` // ProvisioningNetwork is used to indicate if we will have a provisioning network, and how it will be managed. // +kubebuilder:default=Managed // +optional ProvisioningNetwork ProvisioningNetwork `json:"provisioningNetwork,omitempty"` // Provisioning bridge is used for provisioning nodes, on the host that // will run the bootstrap VM. // +optional ProvisioningBridge string `json:"provisioningBridge,omitempty"` // ProvisioningMACAddress is used to allow setting a static unicast MAC // address for the bootstrap host on the provisioning network. Consider // using the QEMU vendor prefix `52:54:00`. If left blank, libvirt will // generate one for you. // +optional ProvisioningMACAddress string `json:"provisioningMACAddress,omitempty"` // ProvisioningNetworkInterface is the name of the network interface on a control plane // baremetal host that is connected to the provisioning network. // +optional ProvisioningNetworkInterface string `json:"provisioningNetworkInterface"` // ProvisioningNetworkCIDR defines the network to use for provisioning. // +optional ProvisioningNetworkCIDR *ipnet.IPNet `json:"provisioningNetworkCIDR,omitempty"` // DeprecatedProvisioningDHCPExternal indicates that DHCP is provided by an external service. This parameter is // replaced by ProvisioningNetwork being set to "Unmanaged". // +optional DeprecatedProvisioningDHCPExternal bool `json:"provisioningDHCPExternal,omitempty"` // ProvisioningDHCPRange is used to provide DHCP services to hosts // for provisioning. // +optional ProvisioningDHCPRange string `json:"provisioningDHCPRange,omitempty"` // Hosts is the information needed to create the objects in Ironic. Hosts []*Host `json:"hosts"` // DefaultMachinePlatform is the default configuration used when // installing on bare metal for machine pools which do not define their own // platform configuration. // +optional DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"` // DeprecatedAPIVIP is the VIP to use for internal API communication // Deprecated: Use APIVIPs // // +kubebuilder:validation:Format=ip // +optional DeprecatedAPIVIP string `json:"apiVIP,omitempty"` // APIVIPs contains the VIP(s) to use for internal API communication. In // dual stack clusters it contains an IPv4 and IPv6 address, otherwise only // one VIP // // +kubebuilder:validation:MaxItems=2 // +kubebuilder:validation:UniqueItems=true // +kubebuilder:validation:Format=ip // +optional APIVIPs []string `json:"apiVIPs,omitempty"` // DeprecatedIngressVIP is the VIP to use for ingress traffic // Deprecated: Use IngressVIPs // // +kubebuilder:validation:Format=ip // +optional DeprecatedIngressVIP string `json:"ingressVIP,omitempty"` // IngressVIPs contains the VIP(s) to use for ingress traffic. In dual stack // clusters it contains an IPv4 and IPv6 address, otherwise only one VIP // // +kubebuilder:validation:MaxItems=2 // +kubebuilder:validation:UniqueItems=true // +kubebuilder:validation:Format=ip // +optional IngressVIPs []string `json:"ingressVIPs,omitempty"` // BootstrapOSImage is a URL to override the default OS image // for the bootstrap node. The URL must contain a sha256 hash of the image // e.g https://mirror.example.com/images/qemu.qcow2.gz?sha256=a07bd... // // +optional BootstrapOSImage string `json:"bootstrapOSImage,omitempty" validate:"omitempty,osimageuri,urlexist"` // ClusterOSImage is a URL to override the default OS image // for cluster nodes. The URL must contain a sha256 hash of the image // e.g https://mirror.example.com/images/metal.qcow2.gz?sha256=3b5a8... // // +optional ClusterOSImage string `json:"clusterOSImage,omitempty" validate:"omitempty,osimageuri,urlexist"` // BootstrapExternalStaticIP is the static IP address of the bootstrap node. // This can be useful in environments without a DHCP server. // +kubebuilder:validation:Format=ip // +optional BootstrapExternalStaticIP string `json:"bootstrapExternalStaticIP,omitempty"` // BootstrapExternalStaticGateway is the static network gateway of the bootstrap node. // This can be useful in environments without a DHCP server. // +kubebuilder:validation:Format=ip // +optional BootstrapExternalStaticGateway string `json:"bootstrapExternalStaticGateway,omitempty"` // LoadBalancer defines how the load balancer used by the cluster is configured. // LoadBalancer is available in TechPreview. // +optional LoadBalancer *configv1.BareMetalPlatformLoadBalancer `json:"loadBalancer,omitempty"` // BootstrapExternalStaticDNS is the static network DNS of the bootstrap node. // This can be useful in environments without a DHCP server. // +kubebuilder:validation:Format=ip // +optional BootstrapExternalStaticDNS string `json:"bootstrapExternalStaticDNS,omitempty"` }
Platform stores all the global configuration that all machinesets use.
type ProvisioningNetwork ¶
type ProvisioningNetwork string
ProvisioningNetwork determines how we will use the provisioning network. +kubebuilder:validation:Enum="";Managed;Unmanaged;Disabled
const ( // ManagedProvisioningNetwork indicates we should fully manage the provisioning network, including DHCP // services required for PXE-based provisioning. ManagedProvisioningNetwork ProvisioningNetwork = "Managed" // UnmanagedProvisioningNetwork indicates responsibility for managing the provisioning network is left to the // user. No DHCP server will be configured, however TFTP remains enabled if a user wants to use PXE-based provisioning. // However, they will need to configure external DHCP correctly with next-server definitions set to the relevant // provisioning IP's. UnmanagedProvisioningNetwork ProvisioningNetwork = "Unmanaged" // DisabledProvisioningNetwork indicates that no provisioning network will be used. Provisioning capabilities // will be limited to virtual media-based deployments only, and neither DHCP nor TFTP will be operated by the // cluster. DisabledProvisioningNetwork ProvisioningNetwork = "Disabled" )
type RootDeviceHints ¶
type RootDeviceHints struct { // A Linux device name like "/dev/vda". The hint must match the // actual value exactly. DeviceName string `json:"deviceName,omitempty"` // A SCSI bus address like 0:0:0:0. The hint must match the actual // value exactly. HCTL string `json:"hctl,omitempty"` // A vendor-specific device identifier. The hint can be a // substring of the actual value. Model string `json:"model,omitempty"` // The name of the vendor or manufacturer of the device. The hint // can be a substring of the actual value. Vendor string `json:"vendor,omitempty"` // Device serial number. The hint must match the actual value // exactly. SerialNumber string `json:"serialNumber,omitempty"` // The minimum size of the device in Gigabytes. // +kubebuilder:validation:Minimum=0 MinSizeGigabytes int `json:"minSizeGigabytes,omitempty"` // Unique storage identifier. The hint must match the actual value // exactly. WWN string `json:"wwn,omitempty"` // Unique storage identifier with the vendor extension // appended. The hint must match the actual value exactly. WWNWithExtension string `json:"wwnWithExtension,omitempty"` // Unique vendor storage identifier. The hint must match the // actual value exactly. WWNVendorExtension string `json:"wwnVendorExtension,omitempty"` // True if the device should use spinning media, false otherwise. Rotational *bool `json:"rotational,omitempty"` }
RootDeviceHints holds the hints for specifying the storage location for the root filesystem for the image.
func (*RootDeviceHints) MakeCRDHints ¶
func (source *RootDeviceHints) MakeCRDHints() *v1alpha1.RootDeviceHints
MakeCRDHints returns the hints in the format needed to pass to create a BareMetalHost resource.
func (*RootDeviceHints) MakeHintMap ¶
func (source *RootDeviceHints) MakeHintMap() map[string]string
MakeHintMap converts a RootDeviceHints instance into a string map suitable to pass to ironic.