Skip to content

Commit 23f0b19

Browse files
author
Maisem Ali
committed
Support LoadBalancer Service types in addition to NodePort.
1 parent c07f4af commit 23f0b19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/appmanager/appManager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ func (appMgr *Manager) updatePoolMembersForNodePort(
15271527
rsCfg *ResourceConfig,
15281528
index int,
15291529
) (bool, string, string) {
1530-
if svc.Spec.Type == v1.ServiceTypeNodePort {
1530+
if svc.Spec.Type == v1.ServiceTypeNodePort || svc.Spec.Type == v1.ServiceTypeLoadBalancer {
15311531
for _, portSpec := range svc.Spec.Ports {
15321532
if portSpec.Port == svcKey.ServicePort {
15331533
log.Debugf("Service backend matched %+v: using node port %v",
@@ -1539,7 +1539,7 @@ func (appMgr *Manager) updatePoolMembersForNodePort(
15391539
}
15401540
return true, "", ""
15411541
} else {
1542-
msg := fmt.Sprintf("Requested service backend '%+v' not of NodePort type",
1542+
msg := fmt.Sprintf("Requested service backend '%+v' not of NodePort or LoadBalancer type",
15431543
svcKey.ServiceName)
15441544
log.Debug(msg)
15451545
return false, "IncorrectBackendServiceType", msg

0 commit comments

Comments
 (0)