Skip to content

Commit

Permalink
AV-221733 update publicIP on pool member update
Browse files Browse the repository at this point in the history
  • Loading branch information
arihantg authored Nov 7, 2024
1 parent 5e90fc2 commit d95baad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gslb/nodes/avi_model_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@ func BuildGSMemberObjFromMeta(metaObj k8sobjects.MetaObject, gsFqdn string, gsDo

weight := int32(-1)
priority := int32(-1)
publicIP := ""
cname := metaObj.GetCluster()
ns := metaObj.GetNamespace()
objType := metaObj.GetType()
Expand All @@ -902,7 +903,12 @@ func BuildGSMemberObjFromMeta(metaObj k8sobjects.MetaObject, gsFqdn string, gsDo
if priority == -1 {
priority = int32(GetObjTrafficPriority(ns, cname))
}

// determine the GS member's PublicIP
for _, c := range ghRules.PublicIP {
if c.Cluster == cname {
publicIP = c.IP
}
}
paths, err := metaObj.GetPaths()
if err != nil {
// for LB type services and passthrough routes
Expand Down Expand Up @@ -938,6 +944,7 @@ func BuildGSMemberObjFromMeta(metaObj k8sobjects.MetaObject, gsFqdn string, gsDo
SyncVIPOnly: syncVIPOnly,
IsPassthrough: metaObj.IsPassthrough(),
TLS: tls,
PublicIP: publicIP,
Tenant: metaObj.GetTenant(),
}, nil
}
Expand Down

0 comments on commit d95baad

Please sign in to comment.