@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); for (Map.Entry<Type, ServiceSettings> entry : endpoints.getAllServiceSettings().entrySet()) { ServiceSettings settings = entry.getValue(); Type type = entry.getKey(); if (!settings.getSidecar() && settings.getEnabled()) { String serviceName = type.getCanonicalName(); String profileName = consulClientService(serviceName); String profilePath = Paths.get(CLIENT_OUTPUT_PATH, serviceName + ".json").toString(); ProfileFactory factory = consulServiceProfileFactoryBuilder.build(type, settings); result.add(factory.getProfile(profileName, profilePath, deploymentConfiguration, endpoints)); } } String profileName = clientProfileName; String profilePath = Paths.get(CLIENT_OUTPUT_PATH, profileName.split("/")[1]).toString(); result.add(consulClientProfileFactory.getProfile(profileName, profilePath, deploymentConfiguration, endpoints)); return result; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); for (Map.Entry<Type, ServiceSettings> entry : endpoints.getAllServiceSettings().entrySet()) { ServiceSettings settings = entry.getValue(); Type type = entry.getKey(); if (!settings.getSidecar() && settings.getEnabled()) { String serviceName = type.getCanonicalName(); String profileName = consulClientService(serviceName); String profilePath = Paths.get(CLIENT_OUTPUT_PATH, serviceName + ".json").toString(); ProfileFactory factory = consulServiceProfileFactoryBuilder.build(type, settings); result.add(factory.getProfile(profileName, profilePath, deploymentConfiguration, endpoints)); } } String profileName = clientProfileName; String profilePath = Paths.get(CLIENT_OUTPUT_PATH, profileName.split("/")[1]).toString(); result.add(consulClientProfileFactory.getProfile(profileName, profilePath, deploymentConfiguration, endpoints)); return result; }