Skip to content

Commit

Permalink
Merge pull request #2969 from stbenjam/profile-name
Browse files Browse the repository at this point in the history
Bug 1796996: baremetal: map hardware profile to baremetal-operator default
  • Loading branch information
openshift-merge-robot committed Feb 1, 2020
2 parents 86361a7 + 0d13b2d commit 8bb7d52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/asset/machines/baremetal/hosts.go
Expand Up @@ -2,6 +2,7 @@ package baremetal

import (
"fmt"
"github.com/metal3-io/baremetal-operator/pkg/hardware"

machineapi "github.com/openshift/cluster-api/pkg/apis/machine/v1beta1"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -52,6 +53,11 @@ func Hosts(config *types.InstallConfig, machines []machineapi.Machine) (*HostSet
}
settings.Secrets = append(settings.Secrets, secret)

// Map string 'default' to hardware.DefaultProfileName
if host.HardwareProfile == "default" {
host.HardwareProfile = hardware.DefaultProfileName
}

newHost := baremetalhost.BareMetalHost{
TypeMeta: metav1.TypeMeta{
APIVersion: baremetalhost.SchemeGroupVersion.String(),
Expand Down

0 comments on commit 8bb7d52

Please sign in to comment.