private Map<String, Profile> processProfiles(File spinnakerStaging, List<Profile> profiles) { for (Profile profile : profiles) { profile.writeStagedFile(spinnakerStaging.toString()); } Map<String, Profile> profileMap = new HashMap<>(); for (Profile profile : profiles) { profileMap.put(profile.getName(), profile); } return profileMap; }
private Map<String, Profile> processProfiles(File spinnakerStaging, List<Profile> profiles) { for (Profile profile : profiles) { profile.writeStagedFile(spinnakerStaging.toString()); } Map<String, Profile> profileMap = new HashMap<>(); for (Profile profile : profiles) { profileMap.put(profile.getName(), profile); } return profileMap; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); // Due to a "feature" in how spring merges profiles, list entries (including requiredGroupMembership) are // merged rather than overwritten. Including the base profile will prevent fiat-enabled setups from deploying // anything since the deploying account will be restricted from performing any operations profiles = profiles.stream().filter(p -> !p.getName().equals("clouddriver.yml")).collect(Collectors.toList()); String filename = "clouddriver-bootstrap.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); Profile profile = clouddriverBootstrapProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints); profiles.add(profile); return profiles; } }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); // Due to a "feature" in how spring merges profiles, list entries (including requiredGroupMembership) are // merged rather than overwritten. Including the base profile will prevent fiat-enabled setups from deploying // anything since the deploying account will be restricted from performing any operations profiles = profiles.stream().filter(p -> !p.getName().equals("clouddriver.yml")).collect(Collectors.toList()); String filename = "clouddriver-bootstrap.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); Profile profile = clouddriverBootstrapProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints); profiles.add(profile); return profiles; } }
profiles.put(profile.getName(), profile); requiredFiles.addAll(profile.getRequiredFiles());
profiles.put(profile.getName(), profile); requiredFiles.addAll(profile.getRequiredFiles());
String secretName = secretName(profile.getName(), version); String mountPoint = Paths.get(profile.getOutputFile()).toString(); Path stagedFile = Paths.get(profile.getStagedFile(stagingPath)); String secretName = secretName("profile-" + profile.getName(), version); Path stagedFile = Paths.get(profile.getStagedFile(stagingPath)); VaultConfigMount vaultConfigMount = VaultConfigMount.fromLocalFile(stagedFile.toFile(), mountPoint);
String secretName = secretName(profile.getName(), version); String mountPoint = Paths.get(profile.getOutputFile()).toString(); Path stagedFile = Paths.get(profile.getStagedFile(stagingPath)); String secretName = secretName("profile-" + profile.getName(), version); Path stagedFile = Paths.get(profile.getStagedFile(stagingPath)); VaultConfigMount vaultConfigMount = VaultConfigMount.fromLocalFile(stagedFile.toFile(), mountPoint);