INFRA-2615 | Abhishek | Allow ingress grouping if hasGrpcPort

This commit is contained in:
Abhishek Katiyar
2024-01-09 21:09:25 +05:30
parent 351b40ae3a
commit aec60affa9
2 changed files with 2 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ local lbFunction = function(lbObject) {
slowStartDuration: if 'slowStartDuration' in lbObject then lbObject.slowStartDuration else 0,
accessPolicies: if 'accessPolicies' in lbObject then lbObject.accessPolicies else [],
extraSecurityGroups: if 'extraSecurityGroups' in lbObject then lbObject.extraSecurityGroups else [],
hasGrpcPort: if 'hasGrpcPort' in lbObject then lbObject.hasGrpcPort else false,
accessLog: if 'accessLog' in lbObject then lbObject.accessLog else namespace_values.loadBalancer.annotations.accessLog,
webAcl: if 'webAcl' in lbObject then lbObject.webAcl else namespace_values.loadBalancer.annotations.webAcl,
groupOrder: if 'groupOrder' in lbObject then lbObject.groupOrder else '100',

View File

@@ -105,7 +105,7 @@ local ingress_annotations(lbObject, clusterAnnotationValues, exposePortToLb=fals
'alb.ingress.kubernetes.io/group.name': std.join('-', [ingressName, namespace]),
'alb.ingress.kubernetes.io/group.order': lbObject.groupOrder,
} else {})
+ (if (std.objectHas(lbObject, "groupName") && (lbObject.groupName != null )) then {
+ (if lbObject.hasGrpcPort then {
'alb.ingress.kubernetes.io/group.name': std.join('-', [ingressName, namespace]),
} else {}),
}[lbObject.type];