Skip to content

Commit

Permalink
Add vSphere host vm group zonal
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpowermac committed Sep 12, 2024
1 parent c0b8931 commit b30d2ef
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ import (

"github.com/go-logr/logr"
"github.com/go-test/deep"
"k8s.io/apimachinery/pkg/runtime"

configv1 "github.com/openshift/api/config/v1"
machinev1 "github.com/openshift/api/machine/v1"
machinev1beta1 "github.com/openshift/api/machine/v1beta1"
"k8s.io/apimachinery/pkg/runtime"
)

// VSphereProviderConfig holds the provider spec of a VSphere Machine.
Expand Down Expand Up @@ -81,6 +82,10 @@ func (v VSphereProviderConfig) getWorkspaceFromFailureDomain(failureDomain *conf
workspace.Folder = fmt.Sprintf("/%s/vm/%s", workspace.Datacenter, v.infrastructure.Status.InfrastructureName)
}

if len(topology.AffinityGroup.VMGroup) > 0 {
workspace.VMGroup = topology.AffinityGroup.VMGroup
}

return workspace
}

Expand All @@ -106,6 +111,8 @@ func (v VSphereProviderConfig) Diff(other machinev1beta1.VSphereMachineProviderS
other.Template = v.providerConfig.Template
}

// todo: jcallen: I _think_ our issue is here.

return deep.Equal(v.providerConfig, other), nil
}

Expand Down

0 comments on commit b30d2ef

Please sign in to comment.