From 892c0e5e8b2926e00b0677ac67e7a7d7f1c970cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 07:16:40 +0000 Subject: [PATCH] Bump github.com/metal3-io/baremetal-operator/apis from 0.8.0 to 0.9.0 Bumps [github.com/metal3-io/baremetal-operator/apis](https://github.com/metal3-io/baremetal-operator) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/metal3-io/baremetal-operator/releases) - [Commits](https://github.com/metal3-io/baremetal-operator/compare/v0.8.0...v0.9.0) --- updated-dependencies: - dependency-name: github.com/metal3-io/baremetal-operator/apis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 9 +- go.sum | 16 +- .../metal3.io/v1alpha1/baremetalhost_types.go | 193 +++++++++++------- .../apis/metal3.io/v1alpha1/doc.go | 20 ++ .../v1alpha1/hostfirmwaresettings_types.go | 2 +- .../v1alpha1/hostupdatepolicy_types.go | 67 ++++++ .../v1alpha1/zz_generated.deepcopy.go | 90 +++++++- vendor/modules.txt | 10 +- 8 files changed, 315 insertions(+), 92 deletions(-) create mode 100644 vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/doc.go create mode 100644 vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/hostupdatepolicy_types.go diff --git a/go.mod b/go.mod index 10b78a73..a28dbb45 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,6 @@ module github.com/stolostron/siteconfig go 1.22.0 - toolchain go1.22.7 require ( @@ -10,10 +9,10 @@ require ( github.com/onsi/gomega v1.36.0 github.com/openshift/hive/apis v0.0.0-20240306163002-9c5806a63531 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.31.3 + k8s.io/api v0.31.4 k8s.io/apiextensions-apiserver v0.31.3 // indirect - k8s.io/apimachinery v0.31.3 - k8s.io/client-go v0.31.3 + k8s.io/apimachinery v0.31.4 + k8s.io/client-go v0.31.4 sigs.k8s.io/controller-runtime v0.19.3 ) @@ -24,7 +23,7 @@ require ( require ( github.com/go-task/slim-sprig v2.20.0+incompatible - github.com/metal3-io/baremetal-operator/apis v0.8.0 + github.com/metal3-io/baremetal-operator/apis v0.9.0 github.com/stretchr/testify v1.10.0 go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 diff --git a/go.sum b/go.sum index 0d8816e0..2c3006db 100644 --- a/go.sum +++ b/go.sum @@ -215,8 +215,8 @@ github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsI github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/metal3-io/baremetal-operator/apis v0.8.0 h1:dy1Z6IRdlRi8tsEww8M3CmOayWZE0yb+xJdNx065FJA= -github.com/metal3-io/baremetal-operator/apis v0.8.0/go.mod h1:eeCH0K7XD17AbEp479XtmYTF0QwOqNkoTCQf3bdZSzk= +github.com/metal3-io/baremetal-operator/apis v0.9.0 h1:D/2II9H4/+ldz5JO+zufBO5VqYjhrJlg89dFgWMKdoE= +github.com/metal3-io/baremetal-operator/apis v0.9.0/go.mod h1:gNPRYPdH/IjTHkmdyFWNLlpWvT+hyfjHH+9CEkdLcWY= github.com/metal3-io/baremetal-operator/pkg/hardwareutils v0.5.1 h1:X0+MWsJ+Gj/TAkmhGybvesvxk6zQKu3NQXzvC6l0iJs= github.com/metal3-io/baremetal-operator/pkg/hardwareutils v0.5.1/go.mod h1:399nvdaqoU9rTI25UdFw2EWcVjmJPpeZPIhfDAIx/XU= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -523,15 +523,15 @@ gorm.io/gorm v1.24.5/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= -k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= -k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/api v0.31.4 h1:I2QNzitPVsPeLQvexMEsj945QumYraqv9m74isPDKhM= +k8s.io/api v0.31.4/go.mod h1:d+7vgXLvmcdT1BCo79VEgJxHHryww3V5np2OYTr6jdw= k8s.io/apiextensions-apiserver v0.31.3 h1:+GFGj2qFiU7rGCsA5o+p/rul1OQIq6oYpQw4+u+nciE= k8s.io/apiextensions-apiserver v0.31.3/go.mod h1:2DSpFhUZZJmn/cr/RweH1cEVVbzFw9YBu4T+U3mf1e4= k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= -k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= -k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= +k8s.io/apimachinery v0.31.4 h1:8xjE2C4CzhYVm9DGf60yohpNUh5AEBnPxCryPBECmlM= +k8s.io/apimachinery v0.31.4/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.4 h1:t4QEXt4jgHIkKKlx06+W3+1JOwAFU/2OPiOo7H92eRQ= +k8s.io/client-go v0.31.4/go.mod h1:kvuMro4sFYIa8sulL5Gi5GFqUPvfH2O/dXuKstbaaeg= k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/baremetalhost_types.go b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/baremetalhost_types.go index 512b75c0..01e950ff 100644 --- a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/baremetalhost_types.go +++ b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/baremetalhost_types.go @@ -147,6 +147,10 @@ const ( // OperationalStatusDetached is the status value when the host is // marked unmanaged via the detached annotation. OperationalStatusDetached OperationalStatus = "detached" + + // OperationalStatusServicing is the status value when the host is + // undergoing servicing (e.g. checking firmware settings). + OperationalStatusServicing OperationalStatus = "servicing" ) // OperationalStatusAllowed represents the allowed values of OperationalStatus. @@ -179,6 +183,9 @@ const ( // DetachError is an error condition occurring when the // controller is unable to detatch the host from the provisioner. DetachError ErrorType = "detach error" + // ServicingError is an error condition occurring when + // service steps failed. + ServicingError ErrorType = "servicing error" ) // ErrorTypeAllowed represents the allowed values of ErrorType. @@ -233,7 +240,7 @@ const ( StateInspecting ProvisioningState = "inspecting" // StatePoweringOffBeforeDelete means we are in the process of - // powering off the node before it's deleted. + // powering off the host before it's deleted. StatePoweringOffBeforeDelete ProvisioningState = "powering off before delete" // StateDeleting means we are in the process of cleaning up the host @@ -245,8 +252,8 @@ const ( // the bare metal controller module on host. type BMCDetails struct { - // Address holds the URL for accessing the controller on the - // network. + // Address holds the URL for accessing the controller on the network. + // The scheme part designates the driver to use with the host. Address string `json:"address"` // The name of the secret containing the BMC credentials (requires @@ -263,43 +270,49 @@ type BMCDetails struct { // HardwareRAIDVolume defines the desired configuration of volume in hardware RAID. type HardwareRAIDVolume struct { - // Size (Integer) of the logical disk to be created in GiB. - // If unspecified or set be 0, the maximum capacity of disk will be used for logical disk. + // Size of the logical disk to be created in GiB. If unspecified or + // set be 0, the maximum capacity of disk will be used for logical + // disk. // +kubebuilder:validation:Minimum=0 SizeGibibytes *int `json:"sizeGibibytes,omitempty"` - // RAID level for the logical disk. The following levels are supported: 0;1;2;5;6;1+0;5+0;6+0. + // RAID level for the logical disk. The following levels are supported: + // 0, 1, 2, 5, 6, 1+0, 5+0, 6+0 (drivers may support only some of them). // +kubebuilder:validation:Enum="0";"1";"2";"5";"6";"1+0";"5+0";"6+0" Level string `json:"level" required:"true"` - // Name of the volume. Should be unique within the Node. If not specified, volume name will be auto-generated. + // Name of the volume. Should be unique within the Node. If not + // specified, the name will be auto-generated. // +kubebuilder:validation:MaxLength=64 Name string `json:"name,omitempty"` - // Select disks with only rotational or solid-state storage + // Select disks with only rotational (if set to true) or solid-state + // (if set to false) storage. By default, any disks can be picked. Rotational *bool `json:"rotational,omitempty"` - // Integer, number of physical disks to use for the logical disk. Defaults to minimum number of disks required - // for the particular RAID level. + // Integer, number of physical disks to use for the logical disk. + // Defaults to minimum number of disks required for the particular RAID + // level. // +kubebuilder:validation:Minimum=1 NumberOfPhysicalDisks *int `json:"numberOfPhysicalDisks,omitempty"` - // The name of the RAID controller to use + // The name of the RAID controller to use. Controller string `json:"controller,omitempty"` - // Optional list of physical disk names to be used for the Hardware RAID volumes. The disk names are interpreted - // by the Hardware RAID controller, and the format is hardware specific. + // Optional list of physical disk names to be used for the hardware RAID volumes. The disk names are interpreted + // by the hardware RAID controller, and the format is hardware specific. PhysicalDisks []string `json:"physicalDisks,omitempty"` } // SoftwareRAIDVolume defines the desired configuration of volume in software RAID. type SoftwareRAIDVolume struct { - // Size (Integer) of the logical disk to be created in GiB. + // Size of the logical disk to be created in GiB. // If unspecified or set be 0, the maximum capacity of disk will be used for logical disk. // +kubebuilder:validation:Minimum=0 SizeGibibytes *int `json:"sizeGibibytes,omitempty"` - // RAID level for the logical disk. The following levels are supported: 0;1;1+0. + // RAID level for the logical disk. The following levels are supported: + // 0, 1 and 1+0. // +kubebuilder:validation:Enum="0";"1";"1+0" Level string `json:"level" required:"true"` @@ -322,7 +335,7 @@ type RAIDConfig struct { // If there is only one Software RAID device, it has to be a RAID-1. // If there are two, the first one has to be a RAID-1, while the RAID level for the second one can be 0, 1, or 1+0. // As the first RAID device will be the deployment device, - // enforcing a RAID-1 reduces the risk of ending up with a non-booting node in case of a disk failure. + // enforcing a RAID-1 reduces the risk of ending up with a non-booting host in case of a disk failure. // Software RAID will always be deleted. // +kubebuilder:validation:MaxItems=2 // +optional @@ -333,17 +346,14 @@ type RAIDConfig struct { // FirmwareConfig contains the configuration that you want to configure BIOS settings in Bare metal server. type FirmwareConfig struct { // Supports the virtualization of platform hardware. - // This supports following options: true, false. // +kubebuilder:validation:Enum=true;false VirtualizationEnabled *bool `json:"virtualizationEnabled,omitempty"` // Allows a single physical processor core to appear as several logical processors. - // This supports following options: true, false. // +kubebuilder:validation:Enum=true;false SimultaneousMultithreadingEnabled *bool `json:"simultaneousMultithreadingEnabled,omitempty"` // SR-IOV support enables a hypervisor to create virtual instances of a PCI-express device, potentially increasing performance. - // This supports following options: true, false. // +kubebuilder:validation:Enum=true;false SriovEnabled *bool `json:"sriovEnabled,omitempty"` } @@ -359,13 +369,22 @@ type BareMetalHostSpec struct { // +optional Taints []corev1.Taint `json:"taints,omitempty"` - // How do we connect to the BMC? + // How do we connect to the BMC (Baseboard Management Controller) on + // the host? BMC BMCDetails `json:"bmc,omitempty"` - // RAID configuration for bare metal server + // RAID configuration for bare metal server. If set, the RAID settings + // will be applied before the host is provisioned. If not, the current + // settings will not be modified. Only one of the sub-fields + // hardwareRAIDVolumes and softwareRAIDVolumes can be set at the same + // time. RAID *RAIDConfig `json:"raid,omitempty"` - // BIOS configuration for bare metal server + // Firmware (BIOS) configuration for bare metal server. If set, the + // requested settings will be applied before the host is provisioned. + // Only some vendor drivers support this field. An alternative is to + // use HostFirmwareSettings resources that allow changing arbitrary + // values and support the generic Redfish-based drivers. Firmware *FirmwareConfig `json:"firmware,omitempty"` // What is the name of the hardware profile for this host? @@ -376,70 +395,86 @@ type BareMetalHostSpec struct { HardwareProfile string `json:"hardwareProfile,omitempty"` // Provide guidance about how to choose the device for the image - // being provisioned. + // being provisioned. The default is currently to use /dev/sda as + // the root device. RootDeviceHints *RootDeviceHints `json:"rootDeviceHints,omitempty"` - // Select the method of initializing the hardware during - // boot. Defaults to UEFI. + // Select the method of initializing the hardware during boot. + // Defaults to UEFI. Legacy boot should only be used for hardware that + // does not support UEFI correctly. Set to UEFISecureBoot to turn + // secure boot on automatically after provisioning. // +optional BootMode BootMode `json:"bootMode,omitempty"` - // Which MAC address will PXE boot? This is optional for some - // types, but required for libvirt VMs driven by vbmc. + // The MAC address of the NIC used for provisioning the host. In case + // of network boot, this is the MAC address of the PXE booting + // interface. The MAC address of the BMC must never be used here! // +kubebuilder:validation:Pattern=`[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}` BootMACAddress string `json:"bootMACAddress,omitempty"` - // Should the server be online? + // Should the host be powered on? If the host is currently in a stable + // state (e.g. provisioned), its power state will be forced to match + // this value. Online bool `json:"online"` // ConsumerRef can be used to store information about something // that is using a host. When it is not empty, the host is - // considered "in use". + // considered "in use". The common use case is a link to a Machine + // resource when the host is used by Cluster API. ConsumerRef *corev1.ObjectReference `json:"consumerRef,omitempty"` - // Image holds the details of the image to be provisioned. + // Image holds the details of the image to be provisioned. Populating + // the image will cause the host to start provisioning. Image *Image `json:"image,omitempty"` - // UserData holds the reference to the Secret containing the user - // data to be passed to the host before it boots. + // UserData holds the reference to the Secret containing the user data + // which is passed to the Config Drive and interpreted by the + // first-boot software such as cloud-init. The format of user data is + // specific to the first-boot software. UserData *corev1.SecretReference `json:"userData,omitempty"` // PreprovisioningNetworkDataName is the name of the Secret in the - // local namespace containing network configuration (e.g content of - // network_data.json) which is passed to the preprovisioning image, and to - // the Config Drive if not overridden by specifying NetworkData. + // local namespace containing network configuration which is passed to + // the preprovisioning image, and to the Config Drive if not overridden + // by specifying NetworkData. PreprovisioningNetworkDataName string `json:"preprovisioningNetworkDataName,omitempty"` // NetworkData holds the reference to the Secret containing network - // configuration (e.g content of network_data.json) which is passed - // to the Config Drive. + // configuration which is passed to the Config Drive and interpreted + // by the first boot software such as cloud-init. NetworkData *corev1.SecretReference `json:"networkData,omitempty"` // MetaData holds the reference to the Secret containing host metadata - // (e.g. meta_data.json) which is passed to the Config Drive. + // which is passed to the Config Drive. By default, metadata will be + // generated for the host, so most users do not need to set this field. MetaData *corev1.SecretReference `json:"metaData,omitempty"` - // Description is a human-entered text used to help identify the host + // Description is a human-entered text used to help identify the host. Description string `json:"description,omitempty"` - // ExternallyProvisioned means something else is managing the - // image running on the host and the operator should only manage - // the power status and hardware inventory inspection. If the - // Image field is filled in, this field is ignored. + // ExternallyProvisioned means something else has provisioned the + // image running on the host, and the operator should only manage + // the power status. This field is used for integration with already + // provisioned hosts and when pivoting hosts between clusters. If + // unsure, leave this field as false. ExternallyProvisioned bool `json:"externallyProvisioned,omitempty"` - // When set to disabled, automated cleaning will be avoided + // When set to disabled, automated cleaning will be skipped // during provisioning and deprovisioning. // +optional // +kubebuilder:default:=metadata // +kubebuilder:validation:Optional AutomatedCleaningMode AutomatedCleaningMode `json:"automatedCleaningMode,omitempty"` - // A custom deploy procedure. + // A custom deploy procedure. This is an advanced feature that allows + // using a custom deploy step provided by a site-specific deployment + // ramdisk. Most users will want to use "image" instead. Setting this + // field triggers provisioning. // +optional CustomDeploy *CustomDeploy `json:"customDeploy,omitempty"` - // CPU architecture of the host, e.g. "x86_64" or "aarch64". If unset, eventually populated by inspection. + // CPU architecture of the host, e.g. "x86_64" or "aarch64". If unset, + // eventually populated by inspection. // +optional Architecture string `json:"architecture,omitempty"` } @@ -478,7 +513,8 @@ type Image struct { // URL is a location of an image to deploy. URL string `json:"url"` - // Checksum is the checksum for the image. + // Checksum is the checksum for the image. Required for all formats + // except for "live-iso". Checksum string `json:"checksum,omitempty"` // ChecksumType is the checksum algorithm for the image, e.g md5, sha256 or sha512. @@ -486,11 +522,9 @@ type Image struct { // If missing, MD5 is used. If in doubt, use "auto". ChecksumType ChecksumType `json:"checksumType,omitempty"` - // DiskFormat contains the format of the image (raw, qcow2, ...). - // Needs to be set to raw for raw images streaming. - // Note live-iso means an iso referenced by the url will be live-booted - // and not deployed to disk, and in this case the checksum options - // are not required and if specified will be ignored. + // Format contains the format of the image (raw, qcow2, ...). + // When set to "live-iso", an ISO 9660 image referenced by the url will + // be live-booted and not deployed to disk. // +kubebuilder:validation:Enum=raw;qcow2;vdi;vmdk;live-iso DiskFormat *string `json:"format,omitempty"` } @@ -667,13 +701,19 @@ type BIOS struct { // HardwareDetails collects all of the information about hardware // discovered on the host. type HardwareDetails struct { + // System vendor information. SystemVendor HardwareSystemVendor `json:"systemVendor,omitempty"` - Firmware Firmware `json:"firmware,omitempty"` - RAMMebibytes int `json:"ramMebibytes,omitempty"` - NIC []NIC `json:"nics,omitempty"` - Storage []Storage `json:"storage,omitempty"` - CPU CPU `json:"cpu,omitempty"` - Hostname string `json:"hostname,omitempty"` + // System firmware information. + Firmware Firmware `json:"firmware,omitempty"` + // The host's amount of memory in Mebibytes. + RAMMebibytes int `json:"ramMebibytes,omitempty"` + // List of network interfaces for the host. + NIC []NIC `json:"nics,omitempty"` + // List of storage (disk, SSD, etc.) available to the host. + Storage []Storage `json:"storage,omitempty"` + // Details of the CPU(s) in the system. + CPU CPU `json:"cpu,omitempty"` + Hostname string `json:"hostname,omitempty"` } // HardwareSystemVendor stores details about the whole hardware system. @@ -694,9 +734,9 @@ type CredentialsStatus struct { type RebootMode string const ( - // RebootModeHard defined for hard reset of a node. + // RebootModeHard defined for hard reset of a host. RebootModeHard RebootMode = "hard" - // RebootModeSoft defined for soft reset of a node. + // RebootModeSoft defined for soft reset of a host. RebootModeSoft RebootMode = "soft" ) @@ -767,12 +807,12 @@ type BareMetalHostStatus struct { // after modifying this file // OperationalStatus holds the status of the host - // +kubebuilder:validation:Enum="";OK;discovered;error;delayed;detached + // +kubebuilder:validation:Enum="";OK;discovered;error;delayed;detached;servicing OperationalStatus OperationalStatus `json:"operationalStatus"` // ErrorType indicates the type of failure encountered when the // OperationalStatus is OperationalStatusError - // +kubebuilder:validation:Enum=provisioned registration error;registration error;inspection error;preparation error;provisioning error;power management error + // +kubebuilder:validation:Enum=provisioned registration error;registration error;inspection error;preparation error;provisioning error;power management error;servicing error ErrorType ErrorType `json:"errorType,omitempty"` // LastUpdated identifies when this status was last observed. @@ -784,21 +824,25 @@ type BareMetalHostStatus struct { HardwareProfile string `json:"hardwareProfile,omitempty"` // The hardware discovered to exist on the host. + // This field will be removed in the next API version in favour of the + // separate HardwareData resource. HardwareDetails *HardwareDetails `json:"hardware,omitempty"` // Information tracked by the provisioner. Provisioning ProvisionStatus `json:"provisioning"` - // the last credentials we were able to validate as working + // The last credentials we were able to validate as working. GoodCredentials CredentialsStatus `json:"goodCredentials,omitempty"` - // the last credentials we sent to the provisioning backend + // The last credentials we sent to the provisioning backend. TriedCredentials CredentialsStatus `json:"triedCredentials,omitempty"` - // the last error message reported by the provisioning subsystem + // The last error message reported by the provisioning subsystem. ErrorMessage string `json:"errorMessage"` - // indicator for whether or not the host is powered on + // The currently detected power state of the host. This field may get + // briefly out of sync with the actual state of the hardware while + // provisioning processes are running. PoweredOn bool `json:"poweredOn"` // OperationHistory holds information about operations performed @@ -812,26 +856,27 @@ type BareMetalHostStatus struct { // ProvisionStatus holds the state information for a single target. type ProvisionStatus struct { - // An indiciator for what the provisioner is doing with the host. + // An indicator for what the provisioner is doing with the host. State ProvisioningState `json:"state"` - // The machine's UUID from the underlying provisioning tool + // The hosts's ID from the underlying provisioning tool (e.g. the + // Ironic node UUID). ID string `json:"ID"` // Image holds the details of the last image successfully // provisioned to the host. Image Image `json:"image,omitempty"` - // The RootDevicehints set by the user + // The root device hints used to provision the host. RootDeviceHints *RootDeviceHints `json:"rootDeviceHints,omitempty"` - // BootMode indicates the boot mode used to provision the node + // BootMode indicates the boot mode used to provision the host. BootMode BootMode `json:"bootMode,omitempty"` - // The Raid set by the user + // The RAID configuration that has been applied. RAID *RAIDConfig `json:"raid,omitempty"` - // The Bios set by the user + // The firmware settings that have been applied. Firmware *FirmwareConfig `json:"firmware,omitempty"` // Custom deploy procedure applied to the host. @@ -991,6 +1036,10 @@ func (host *BareMetalHost) WasProvisioned() bool { // We have an image provisioned. return true } + if host.Status.Provisioning.CustomDeploy != nil { + // We have a custom deploy provisioned. + return true + } return false } diff --git a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/doc.go b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/doc.go new file mode 100644 index 00000000..b5c2caa0 --- /dev/null +++ b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1alpha1 contains API Schema definitions for the metal3.io v1alpha1 API group +// +kubebuilder:object:generate=true +// +k8s:openapi-gen=true +// +groupName=metal3.io +package v1alpha1 diff --git a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/hostfirmwaresettings_types.go b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/hostfirmwaresettings_types.go index ab0b823c..16f14857 100644 --- a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/hostfirmwaresettings_types.go +++ b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/hostfirmwaresettings_types.go @@ -48,7 +48,7 @@ type HostFirmwareSettingsSpec struct { // Settings are the desired firmware settings stored as name/value pairs. // +patchStrategy=merge - Settings DesiredSettingsMap `json:"settings" required:"true"` + Settings DesiredSettingsMap `json:"settings" patchStrategy:"merge" required:"true"` } // HostFirmwareSettingsStatus defines the observed state of HostFirmwareSettings. diff --git a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/hostupdatepolicy_types.go b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/hostupdatepolicy_types.go new file mode 100644 index 00000000..7da82b4b --- /dev/null +++ b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/hostupdatepolicy_types.go @@ -0,0 +1,67 @@ +/* +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// HostUpdatePolicy enumerates the allowed host update policies. +type UpdatePolicy string + +const ( + HostUpdatePolicyOnPreparing UpdatePolicy = "onPreparing" + HostUpdatePolicyOnReboot UpdatePolicy = "onReboot" +) + +// HostUpdatePolicySpec defines the desired state of HostUpdatePolicy. +type HostUpdatePolicySpec struct { + // Defines policy for changing firmware settings + // +optional + // +kubebuilder:validation:Enum="onPreparing";"onReboot" + FirmwareSettings UpdatePolicy `json:"firmwareSettings,omitempty"` + + // Defines policy for updating firmware + // +optional + // +kubebuilder:validation:Enum="onPreparing";"onReboot" + FirmwareUpdates UpdatePolicy `json:"firmwareUpdates,omitempty"` +} + +// HostUpdatePolicyStatus defines the observed state of HostUpdatePolicy. +type HostUpdatePolicyStatus struct{} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// HostUpdatePolicy is the Schema for the hostupdatepolicy API. +type HostUpdatePolicy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec HostUpdatePolicySpec `json:"spec,omitempty"` + Status HostUpdatePolicyStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// HostUpdatePolicyList contains a list of HostUpdatePolicy. +type HostUpdatePolicyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []HostUpdatePolicy `json:"items"` +} + +func init() { + SchemeBuilder.Register(&HostUpdatePolicy{}, &HostUpdatePolicyList{}) +} diff --git a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/zz_generated.deepcopy.go index e5a09153..47f4ee2a 100644 --- a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* @@ -1075,6 +1074,95 @@ func (in *HostFirmwareSettingsStatus) DeepCopy() *HostFirmwareSettingsStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HostUpdatePolicy) DeepCopyInto(out *HostUpdatePolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostUpdatePolicy. +func (in *HostUpdatePolicy) DeepCopy() *HostUpdatePolicy { + if in == nil { + return nil + } + out := new(HostUpdatePolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HostUpdatePolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HostUpdatePolicyList) DeepCopyInto(out *HostUpdatePolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HostUpdatePolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostUpdatePolicyList. +func (in *HostUpdatePolicyList) DeepCopy() *HostUpdatePolicyList { + if in == nil { + return nil + } + out := new(HostUpdatePolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HostUpdatePolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HostUpdatePolicySpec) DeepCopyInto(out *HostUpdatePolicySpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostUpdatePolicySpec. +func (in *HostUpdatePolicySpec) DeepCopy() *HostUpdatePolicySpec { + if in == nil { + return nil + } + out := new(HostUpdatePolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HostUpdatePolicyStatus) DeepCopyInto(out *HostUpdatePolicyStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostUpdatePolicyStatus. +func (in *HostUpdatePolicyStatus) DeepCopy() *HostUpdatePolicyStatus { + if in == nil { + return nil + } + out := new(HostUpdatePolicyStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Image) DeepCopyInto(out *Image) { *out = *in diff --git a/vendor/modules.txt b/vendor/modules.txt index b014eb60..b1196629 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -147,8 +147,8 @@ github.com/lib/pq/scram github.com/mailru/easyjson/buffer github.com/mailru/easyjson/jlexer github.com/mailru/easyjson/jwriter -# github.com/metal3-io/baremetal-operator/apis v0.8.0 -## explicit; go 1.22 +# github.com/metal3-io/baremetal-operator/apis v0.9.0 +## explicit; go 1.22.4 github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1 # github.com/metal3-io/baremetal-operator/pkg/hardwareutils v0.5.1 ## explicit; go 1.20 @@ -411,7 +411,7 @@ gorm.io/gorm/clause gorm.io/gorm/logger gorm.io/gorm/schema gorm.io/gorm/utils -# k8s.io/api v0.31.3 +# k8s.io/api v0.31.4 ## explicit; go 1.22.0 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -474,7 +474,7 @@ k8s.io/api/storagemigration/v1alpha1 ## explicit; go 1.22.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 -# k8s.io/apimachinery v0.31.3 +# k8s.io/apimachinery v0.31.4 ## explicit; go 1.22.0 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors @@ -530,7 +530,7 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/client-go v0.31.3 +# k8s.io/client-go v0.31.4 ## explicit; go 1.22.0 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1