Skip to content

Commit 708042d

Browse files
committed
OCPBUGS-34915: Add network tags to CAPG control plane machines
1 parent acd8593 commit 708042d

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

pkg/asset/machines/gcp/gcpmachines.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ func createGCPMachine(name string, installConfig *installconfig.InstallConfig, i
115115
osImage = mpool.OSImage.Name
116116
}
117117

118-
// TODO tags aren't currently being set in GCPMachine which only has
119-
// AdditionalNetworkTags []string
120-
121118
masterSubnet := installConfig.Config.Platform.GCP.ControlPlaneSubnet
122119
if masterSubnet == "" {
123120
masterSubnet = gcptypes.DefaultSubnetName(infraID, masterRole)
@@ -131,12 +128,13 @@ func createGCPMachine(name string, installConfig *installconfig.InstallConfig, i
131128
},
132129
},
133130
Spec: capg.GCPMachineSpec{
134-
InstanceType: mpool.InstanceType,
135-
Subnet: ptr.To(masterSubnet),
136-
AdditionalLabels: getLabelsFromInstallConfig(installConfig, infraID),
137-
Image: ptr.To(osImage),
138-
RootDeviceType: ptr.To(capg.DiskType(mpool.OSDisk.DiskType)),
139-
RootDeviceSize: mpool.OSDisk.DiskSizeGB,
131+
InstanceType: mpool.InstanceType,
132+
Subnet: ptr.To(masterSubnet),
133+
AdditionalLabels: getLabelsFromInstallConfig(installConfig, infraID),
134+
Image: ptr.To(osImage),
135+
RootDeviceType: ptr.To(capg.DiskType(mpool.OSDisk.DiskType)),
136+
RootDeviceSize: mpool.OSDisk.DiskSizeGB,
137+
AdditionalNetworkTags: mpool.Tags,
140138
},
141139
}
142140
gcpMachine.SetGroupVersionKind(capg.GroupVersion.WithKind("GCPMachine"))

0 commit comments

Comments
 (0)