export function isIngressRouted()

in src/strategyHelpers/blueGreen/ingressBlueGreenHelper.ts [65:84]


export function isIngressRouted(
   ingressObject: any,
   serviceNameMap: Map<string, string>
): boolean {
   let isIngressRouted: boolean = false
   // check if ingress targets a service in the given manifests
   JSON.parse(JSON.stringify(ingressObject), (key, value) => {
      isIngressRouted =
         isIngressRouted ||
         (key === 'service' &&
            value.hasOwnProperty('name') &&
            serviceNameMap.has(value.name))
      isIngressRouted =
         isIngressRouted || (key === 'serviceName' && serviceNameMap.has(value))

      return value
   })

   return isIngressRouted
}