@Override
    protected Map<String, Object> getContext(ServiceMetadata serviceMetadata, LoadBalancer loadBalancer) {
        Map<String, Object> map = new HashMap<>();
        String serviceName = serviceMetadata.getServiceName();
        String envName = serviceMetadata.getEnvName();
        List<String> hosts = new ArrayList<>();
        hosts.add(loadBalancer.getHost());
        map.put(ManifestGenConstants.HOSTS, hosts);
        List<String> gateways = new ArrayList<>();
        gateways.add(getGatewayName(serviceName, envName));
        map.put(GATEWAYS, gateways);
        map.put(HEADERS, loadBalancer.getHeaders() != null ? loadBalancer.getHeaders().entrySet() : null);
        map.put(ManifestGenConstants.LOADBALANCER, loadBalancer);
        map.put("serviceName", serviceMetadata.getServiceName());
        map.put(MATCH_TYPE, DEFAULT_MATCH_TYPE);
        return map;
    }
This class generates istio virtual service yaml.
manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/builder/VirtualServiceBuilder.java