Skip to content

Commit

Permalink
Merge pull request #974 from abays/manual_cloudinit
Browse files Browse the repository at this point in the history
[OSPK8-784] Allow user-provided cloud-init secrets for BMHs
  • Loading branch information
openshift-merge-bot[bot] authored Jan 15, 2024
2 parents e9c3957 + ad0a49b commit 0b15804
Show file tree
Hide file tree
Showing 3 changed files with 480 additions and 198 deletions.
6 changes: 3 additions & 3 deletions api/v1beta1/common_openstackbaremetalset.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ func VerifyBaremetalStatusHostRefs(
}

// VerifyBaremetalSetScaleUp -
func VerifyBaremetalSetScaleUp(log logr.Logger, instance *OpenStackBaremetalSet, allBmhs *metal3v1.BareMetalHostList, existingBmhs *metal3v1.BareMetalHostList) ([]string, error) {
func VerifyBaremetalSetScaleUp(log logr.Logger, instance *OpenStackBaremetalSet, allBmhs *metal3v1.BareMetalHostList, existingBmhs *metal3v1.BareMetalHostList) ([]metal3v1.BareMetalHost, error) {
// How many new BaremetalHost allocations do we need (if any)?
newBmhsNeededCount := instance.Spec.Count - len(existingBmhs.Items)
availableBaremetalHosts := []string{}
availableBaremetalHosts := []metal3v1.BareMetalHost{}

if newBmhsNeededCount > 0 {
// We have new replicas requested, so search for baremetalhosts that don't have consumerRef or Online set
Expand Down Expand Up @@ -162,7 +162,7 @@ func VerifyBaremetalSetScaleUp(log logr.Logger, instance *OpenStackBaremetalSet,

log.Info(fmt.Sprintf("Available BaremetalHost: %s", baremetalHost.ObjectMeta.Name))

availableBaremetalHosts = append(availableBaremetalHosts, baremetalHost.ObjectMeta.Name)
availableBaremetalHosts = append(availableBaremetalHosts, baremetalHost)
}

// If we can't satisfy the new requested replica count, explicitly state so
Expand Down
Loading

0 comments on commit 0b15804

Please sign in to comment.