From aec60affa9fecb3bd8e015f14230ad204fa6d455 Mon Sep 17 00:00:00 2001 From: Abhishek Katiyar Date: Tue, 9 Jan 2024 21:09:25 +0530 Subject: [PATCH] INFRA-2615 | Abhishek | Allow ingress grouping if hasGrpcPort --- templates/deployment_manifest.jsonnet | 1 + templates/ingress.jsonnet | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/deployment_manifest.jsonnet b/templates/deployment_manifest.jsonnet index 568da600..8066c1c0 100644 --- a/templates/deployment_manifest.jsonnet +++ b/templates/deployment_manifest.jsonnet @@ -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', diff --git a/templates/ingress.jsonnet b/templates/ingress.jsonnet index 2bda18fb..c52da064 100644 --- a/templates/ingress.jsonnet +++ b/templates/ingress.jsonnet @@ -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];