Merge pull request #792 from navi-infra/INFRA-2644-1
INFRA-2644 | Abhishek | Ignore secondary port for existing load balancers
This commit is contained in:
@@ -126,11 +126,20 @@ local loadbalancerWithAllPorts = [
|
||||
if port.port != null
|
||||
];
|
||||
|
||||
# this is to ensure only in case of new load balancers,( which will not have groupName as empty string ), exposed ingress is created
|
||||
local isOldALB(lbObject) = lbObject.groupName == '' ;
|
||||
|
||||
local filteredLoadBalancerWithAllPorts = [
|
||||
lbObject
|
||||
for lbObject in loadbalancerWithAllPorts
|
||||
if !isOldALB(lbObject) || (isOldALB(lbObject) && !lbObject.exposeToLoadBalancer)
|
||||
];
|
||||
|
||||
std.map(
|
||||
//Generate ingress objects based on above filtered configurations
|
||||
function(lbIndex) {
|
||||
config:: {
|
||||
lbObject: loadbalancerWithAllPorts[lbIndex],
|
||||
lbObject: filteredLoadBalancerWithAllPorts[lbIndex],
|
||||
subnetScheme: load_balancer_util.subnet_scheme($.config.lbObject.accessPolicies),
|
||||
serviceName: if isflinkJob then (deployment_manifest.name + '-rest') else chart.full_service_name(deployment_manifest.name),
|
||||
servicePort: $.config.lbObject.port,
|
||||
@@ -176,5 +185,5 @@ std.map(
|
||||
},
|
||||
},
|
||||
|
||||
std.range(0, std.length(loadbalancerWithAllPorts) - 1)
|
||||
std.range(0, std.length(filteredLoadBalancerWithAllPorts) - 1)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user