Skip to content

Commit

Permalink
Merge pull request #8062 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…7932-to-release-4.15

[release-4.15] OCPBUGS-29929: GCP Destroy cleanup correct zones/records
  • Loading branch information
openshift-merge-bot[bot] committed May 2, 2024
2 parents e29d44b + 3a95a85 commit 147d242
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/asset/cluster/gcp/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ import (

// Metadata converts an install configuration to GCP metadata.
func Metadata(config *types.InstallConfig) *gcp.Metadata {
// leave the private zone domain blank when not using a pre-created private zone
privateZoneDomain := fmt.Sprintf("%s.", config.ClusterDomain())
if config.GCP.Network == "" || config.GCP.NetworkProjectID == "" {
privateZoneDomain = ""
}

return &gcp.Metadata{
Region: config.Platform.GCP.Region,
ProjectID: config.Platform.GCP.ProjectID,
NetworkProjectID: config.Platform.GCP.NetworkProjectID,
PrivateZoneDomain: fmt.Sprintf("%s.", config.ClusterDomain()),
PrivateZoneDomain: privateZoneDomain,
}
}

0 comments on commit 147d242

Please sign in to comment.