Skip to content

Commit 8ed9aba

Browse files
committed
GCP: The CAPG bootstrap machine IP should be set according to the publish strategy
** The default bootstrap machine IP is set to private. When the publish strategy is set to external this value should be True to indicate a public ip address.
1 parent b8d5671 commit 8ed9aba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/asset/machines/gcp/gcpmachines.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ func GenerateBootstrapMachines(name string, installConfig *installconfig.Install
6464
// Identify this as a bootstrap machine
6565
bootstrapGCPMachine.Labels["install.openshift.io/bootstrap"] = ""
6666

67+
bootstrapMachineIsPublic := installConfig.Config.Publish == types.ExternalPublishingStrategy
68+
bootstrapGCPMachine.Spec.PublicIP = ptr.To(bootstrapMachineIsPublic)
69+
6770
result = append(result, &asset.RuntimeFile{
6871
File: asset.File{Filename: fmt.Sprintf("10_inframachine_%s.yaml", bootstrapGCPMachine.Name)},
6972
Object: bootstrapGCPMachine,

0 commit comments

Comments
 (0)