@Override
    public List<ManifestSnippet> handle(ServiceSpec serviceSpec, ManifestContext manifestContext) throws HyscaleException {
        if (!ManifestPredicates.getLoadBalancerPredicate(LBType.INGRESS).test(serviceSpec) && !ManifestPredicates.getLoadBalancerPredicate(LBType.ISTIO).test(serviceSpec)) {
            logger.debug("Load Balancer information found to be empty while processing service spec data.");
            return Collections.emptyList();
        }
        LoadBalancer loadBalancer = serviceSpec.get(HyscaleSpecFields.loadBalancer, LoadBalancer.class);
        LBType lbType = LBType.getByProvider(loadBalancer.getProvider());
        LBBuilderType lbBuilderType = LBBuilderType.getByType(lbType);
        ServiceMetadata serviceMetadata = new ServiceMetadata();
        serviceMetadata.setAppName(manifestContext.getAppName());
        serviceMetadata.setEnvName(manifestContext.getEnvName());
        String serviceName = serviceSpec.get(HyscaleSpecFields.name, String.class);
        serviceMetadata.setServiceName(serviceName);
        return lbBuilderType != null ? lbBuilderType.getBuilder().build(serviceMetadata, loadBalancer) : Collections.emptyList();
    }
Plugin for Generating the Manifests required for Load Balancing configuration specified in hspec.
manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/plugins/LoadBalancerHandler.java