private Map<String, Object> getContext(ServiceMetadata serviceMetadata, LoadBalancer loadBalancer) {
        Map<String, Object> context = new HashMap<>();
        context.put(INGRESS_NAME,ManifestResource.INGRESS.getName(serviceMetadata));
        context.put(APP_NAME,serviceMetadata.getAppName());
        context.put(SERVICE_NAME,serviceMetadata.getServiceName());
        context.put(ENV_NAME,serviceMetadata.getEnvName());
        if(loadBalancer.getClassName()!= null && !loadBalancer.getClassName().isBlank()){
            context.put(INGRESS_CLASS,loadBalancer.getClassName());
            context.put(FRONTEND_ENTRY_POINTS,"http,https");
            context.put(REDIRECT_ENTRY_POINTS,"https");
        }
        if(loadBalancer.getTlsSecret()!= null && !loadBalancer.getTlsSecret().isBlank()){
            context.put(FRONTEND_ENTRY_POINTS,"http");
            context.put(REDIRECT_ENTRY_POINTS,null);
        }
        if(loadBalancer.getHeaders()!=null ){
            StringBuilder sb = new StringBuilder();
            loadBalancer.getHeaders().forEach((key,value) -> sb.append(key).append(ToolConstants.COLON).append(value).append(ToolConstants.HEADER_CONCATENATOR));
            sb.deleteCharAt(sb.lastIndexOf("|"));
            context.put(HEADERS_EXPRESSION,sb);
        }
        return context;
    }
Builds Metadata for Traefik Ingress resource yaml
manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/builder/TraefikMetaDataBuilder.java