File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,24 @@ def get_istio_api_gateway_elb_arn(client_elb):
2525 elb_tags = client_elb .describe_tags (ResourceArns = [elb_arn ])["TagDescriptions" ][0 ][
2626 "Tags"
2727 ]
28+
29+ is_from_cluster = False
30+ is_api_load_balancer = False
2831 for tag in elb_tags :
32+ if (
33+ tag ["Key" ] == "cortex.dev/cluster-name"
34+ and tag ["Value" ] == os .environ ["CORTEX_CLUSTER_NAME" ]
35+ ):
36+ is_from_cluster = True
2937 if (
3038 tag ["Key" ] == "kubernetes.io/service-name"
3139 and tag ["Value" ] == "istio-system/ingressgateway-apis"
3240 ):
33- return elb_arn
41+ is_api_load_balancer = True
42+
43+ if is_from_cluster and is_api_load_balancer :
44+ return elb_arn
45+
3446 raise Exception ("Could not find ingressgateway-apis ELB" )
3547
3648
You can’t perform that action at this time.
0 commit comments