@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver-ro.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); profiles.add(getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints)); return profiles; }
@Override protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { super.setProfile(profile, deploymentConfiguration, endpoints); // We need to make modifications to this deployment configuration, but can't use helpful objects // like the accountService on a clone. Therefore, we'll make the modifications in place and // restore to the original state when the modifications are written out. Providers originalProviders = deploymentConfiguration.getProviders().cloneNode(Providers.class); Providers modifiedProviders = deploymentConfiguration.getProviders(); DeploymentEnvironment deploymentEnvironment = deploymentConfiguration.getDeploymentEnvironment(); if (deploymentEnvironment.getBootstrapOnly() != null && deploymentEnvironment.getBootstrapOnly()) { String bootstrapAccountName = deploymentEnvironment.getAccountName(); removeBootstrapOnlyAccount(modifiedProviders, deploymentConfiguration.getName(), bootstrapAccountName); } Artifacts artifacts = deploymentConfiguration.getArtifacts(); List<String> files = backupRequiredFiles(modifiedProviders, deploymentConfiguration.getName()); files.addAll(backupRequiredFiles(artifacts, deploymentConfiguration.getName())); if (deploymentConfiguration.getProviders() != null) { processProviders(deploymentConfiguration.getProviders()); } profile.appendContents(yamlToString(modifiedProviders)) .appendContents(yamlToString(new ArtifactWrapper(artifacts))) .appendContents(profile.getBaseContents()) .setRequiredFiles(files); deploymentConfiguration.setProviders(originalProviders); }
@Override protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { super.setProfile(profile, deploymentConfiguration, endpoints); // We need to make modifications to this deployment configuration, but can't use helpful objects // like the accountService on a clone. Therefore, we'll make the modifications in place and // restore to the original state when the modifications are written out. Providers originalProviders = deploymentConfiguration.getProviders().cloneNode(Providers.class); Providers modifiedProviders = deploymentConfiguration.getProviders(); DeploymentEnvironment deploymentEnvironment = deploymentConfiguration.getDeploymentEnvironment(); if (deploymentEnvironment.getBootstrapOnly() != null && deploymentEnvironment.getBootstrapOnly()) { String bootstrapAccountName = deploymentEnvironment.getAccountName(); removeBootstrapOnlyAccount(modifiedProviders, deploymentConfiguration.getName(), bootstrapAccountName); } Artifacts artifacts = deploymentConfiguration.getArtifacts(); List<String> files = backupRequiredFiles(modifiedProviders, deploymentConfiguration.getName()); files.addAll(backupRequiredFiles(artifacts, deploymentConfiguration.getName())); if (deploymentConfiguration.getProviders() != null) { processProviders(deploymentConfiguration.getProviders()); } profile.appendContents(yamlToString(modifiedProviders)) .appendContents(yamlToString(new ArtifactWrapper(artifacts))) .appendContents(profile.getBaseContents()) .setRequiredFiles(files); deploymentConfiguration.setProviders(originalProviders); }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver-caching.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); profiles.add(getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints)); return profiles; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); Profile profile = getClouddriverProfileFactory().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); String filename = "clouddriver-rw.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); profiles.add(getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints)); return profiles; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver-ro.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); profiles.add(getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints)); return profiles; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver-ro-deck.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); profiles.add(getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints)); return profiles; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver-rw.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); profiles.add(getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints)); return profiles; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver-caching.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); profiles.add(getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints)); return profiles; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver-ro-deck.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); profiles.add(getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints)); return profiles; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "clouddriver.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); Profile profile = getClouddriverProfileFactory().getProfile(filename, path, deploymentConfiguration, endpoints); profiles.add(profile); return profiles; }