Fix issue with Network name
@@ -636,7 +636,12 @@ func RegionalGCLBForVIP(ctx context.Context, c cloud.Cloud, gclb *GCLB, params *
var rfrs []*compute.ForwardingRule
for _, rfr := range allRFRs {
- if rfr.IPAddress == params.VIP && rfr.Network == params.Network {
+ netResID, err := cloud.ParseResourceURL(rfr.Network)
+ if err != nil {
+ klog.Warningf("Error parsing Network (%q): %v", rfr.Network, err)
+ return err
+ }
+ if rfr.IPAddress == params.VIP && netResID.Key.Name == params.Network {
rfrs = append(rfrs, rfr)
}
}
