From 48302618f584df22a90b0cf8615dced5b972e0fb Mon Sep 17 00:00:00 2001 From: Christopher J Schaefer Date: Wed, 29 Jan 2025 04:19:23 -0600 Subject: [PATCH] Infrastructure: Fix machine placement target defaults (#2151) Make sure that the optional fields for the VPCMachinePlacementTarget definition are configured properly for JSON serialization. Related: https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/issues/2150 --- api/v1beta2/types.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/v1beta2/types.go b/api/v1beta2/types.go index 238ef78d9..5f2226d7b 100644 --- a/api/v1beta2/types.go +++ b/api/v1beta2/types.go @@ -416,9 +416,10 @@ type VPCMachinePlacementTarget struct { // DedicatedHostGroup defines the Dedicated Host Group to use when placing a VPC Machine (Instance). // +optional - DedicatedHostGroup *VPCResource `json:"dedicatedHostGroup"` + DedicatedHostGroup *VPCResource `json:"dedicatedHostGroup,omitempty"` // PlacementGroup defines the Placement Group to use when placing a VPC Machine (Instance). + // +optional PlacementGroup *VPCResource `json:"placementGroup,omitempty"` }