UNCLASSIFIED - NO CUI

Skip to content

Add Conditional for AuthorizationPolicy to Prevent Duplicate Creation

Bug

Description

When attempting to create Helm releases passthrough-ingressgateway and public-ingressgateway, I saw AuthorizationPolicy allow-ingress-gateway-authz-policy trying to get created twice in the same istio-gateway namespace, failing installation of one of the Helm releases.

I would add a conditional to the template to check if an AuthorizationPolicy resource named allow-ingress-gateway-authz-policy does not already exist in the istio-gateway namespace (within the security.istio.io/v1 API): {{- if not (lookup "security.istio.io/v1" "AuthorizationPolicy" "istio-gateway" "allow-ingress-gateway-authz-policy") }}

BigBang Version

2.54.0