private LbServicesConfig.Tenants.Applications.Builder getAppConfig(ApplicationInfo app) {
        LbServicesConfig.Tenants.Applications.Builder ab = new LbServicesConfig.Tenants.Applications.Builder();

        // TODO: read active rotation from ApplicationClusterInfo
        ab.activeRotation(getActiveRotation(app));

        Set<ApplicationClusterInfo> applicationClusterInfos = app.getModel().applicationClusterInfo();
        List<LbServicesConfig.Tenants.Applications.Endpoints.Builder> endpointBuilder = applicationClusterInfos.stream()
                .sorted(Comparator.comparing(ApplicationClusterInfo::name))
                .map(ApplicationClusterInfo::endpoints)
                .flatMap(endpoints -> getEndpointConfig(endpoints).stream())
                .toList();
        ab.endpoints(endpointBuilder);
        return ab;
    }
Produces lb-services cfg

@author Vegard Havdal
configserver/src/main/java/com/yahoo/vespa/config/server/model/LbServicesProducer.java