@Override public boolean isEnabled(DeploymentConfiguration deploymentConfiguration) { return deploymentConfiguration.getCanary().isEnabled(); }
@Override public boolean isEnabled(DeploymentConfiguration deploymentConfiguration) { return deploymentConfiguration.getCanary().isEnabled(); }
protected Optional<Profile> generateAwsProfile(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints, String spinnakerHome) { String name = "aws/kayenta-credentials" + spinnakerHome.replace("/", "_"); Canary canary = deploymentConfiguration.getCanary(); if (canary.isEnabled()) { AwsCanaryServiceIntegration awsCanaryServiceIntegration = (AwsCanaryServiceIntegration)getServiceIntegrationByClass(canary, AwsCanaryServiceIntegration.class); // TODO(lwander/duftler): Seems like this approach leaves us open to potential collision between kayenta aws // accounts, and front50 and clouddriver configuration. if (awsCanaryServiceIntegration.isS3Enabled()) { Optional<AwsCanaryAccount> optionalAwsCanaryAccount = awsCanaryServiceIntegration.getAccounts() .stream() .filter(a -> !StringUtils.isEmpty(a.getAccessKeyId()) && !StringUtils.isEmpty(a.getSecretAccessKey())) .findFirst(); if (optionalAwsCanaryAccount.isPresent()) { AwsCanaryAccount awsCanaryAccount = optionalAwsCanaryAccount.get(); String outputFile = awsCredentialsProfileFactoryBuilder.getOutputFile(spinnakerHome); awsCredentialsProfileFactoryBuilder.setProfileName(StringUtils.isNotBlank(awsCanaryAccount.getProfileName()) ? awsCanaryAccount.getProfileName() : "default"); return Optional.of(awsCredentialsProfileFactoryBuilder .setArtifact(SpinnakerArtifact.KAYENTA) .setAccessKeyId(awsCanaryAccount.getAccessKeyId()) .setSecretAccessKey(awsCanaryAccount.getSecretAccessKey()) .build() .getProfile(name, outputFile, deploymentConfiguration, endpoints)); } } } return Optional.empty(); }
protected Optional<Profile> generateAwsProfile(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints, String spinnakerHome) { String name = "aws/kayenta-credentials" + spinnakerHome.replace("/", "_"); Canary canary = deploymentConfiguration.getCanary(); if (canary.isEnabled()) { AwsCanaryServiceIntegration awsCanaryServiceIntegration = (AwsCanaryServiceIntegration)getServiceIntegrationByClass(canary, AwsCanaryServiceIntegration.class); // TODO(lwander/duftler): Seems like this approach leaves us open to potential collision between kayenta aws // accounts, and front50 and clouddriver configuration. if (awsCanaryServiceIntegration.isS3Enabled()) { Optional<AwsCanaryAccount> optionalAwsCanaryAccount = awsCanaryServiceIntegration.getAccounts() .stream() .filter(a -> !StringUtils.isEmpty(a.getAccessKeyId()) && !StringUtils.isEmpty(a.getSecretAccessKey())) .findFirst(); if (optionalAwsCanaryAccount.isPresent()) { AwsCanaryAccount awsCanaryAccount = optionalAwsCanaryAccount.get(); String outputFile = awsCredentialsProfileFactoryBuilder.getOutputFile(spinnakerHome); awsCredentialsProfileFactoryBuilder.setProfileName(StringUtils.isNotBlank(awsCanaryAccount.getProfileName()) ? awsCanaryAccount.getProfileName() : "default"); return Optional.of(awsCredentialsProfileFactoryBuilder .setArtifact(SpinnakerArtifact.KAYENTA) .setAccessKeyId(awsCanaryAccount.getAccessKeyId()) .setSecretAccessKey(awsCanaryAccount.getSecretAccessKey()) .build() .getProfile(name, outputFile, deploymentConfiguration, endpoints)); } } } return Optional.empty(); }
@Override public ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { return new Settings().setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setEnabled(deploymentConfiguration.getCanary().isEnabled()); }
@Override public ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { return new Settings().setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setEnabled(deploymentConfiguration.getCanary().isEnabled()); }
@Override protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { super.setProfile(profile, deploymentConfiguration, endpoints); profile.appendContents(profile.getBaseContents()); Canary canary = deploymentConfiguration.getCanary(); if (canary.isEnabled()) { List<String> files = new ArrayList<>(backupRequiredFiles(canary, deploymentConfiguration.getName())); KayentaConfigWrapper kayentaConfig = new KayentaConfigWrapper(endpoints.getServiceSettings(Type.KAYENTA), canary); profile.appendContents(yamlToString(kayentaConfig)).setRequiredFiles(files); } }
@Override protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { super.setProfile(profile, deploymentConfiguration, endpoints); profile.appendContents(profile.getBaseContents()); Canary canary = deploymentConfiguration.getCanary(); if (canary.isEnabled()) { List<String> files = new ArrayList<>(backupRequiredFiles(canary, deploymentConfiguration.getName())); KayentaConfigWrapper kayentaConfig = new KayentaConfigWrapper(endpoints.getServiceSettings(Type.KAYENTA), canary); profile.appendContents(yamlToString(kayentaConfig)).setRequiredFiles(files); } }
@Override public ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { return new Settings().setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setHost(getDefaultHost()) .setEnabled(deploymentConfiguration.getCanary().isEnabled()); }
@Override public ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { return new Settings() .setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setHost(getDefaultHost()) .setEnabled(deploymentConfiguration.getCanary().isEnabled()); }
@Override public ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { return new Settings().setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setHost(getDefaultHost()) .setEnabled(deploymentConfiguration.getCanary().isEnabled()); }
@Override public ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { return new Settings() .setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setHost(getDefaultHost()) .setEnabled(deploymentConfiguration.getCanary().isEnabled()); }
@Override public Settings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { Settings settings = new Settings(); settings.setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setAddress(buildAddress()) .setLocation("us-central1-f") .setEnabled(deploymentConfiguration.getCanary().isEnabled()); return settings; } }
@Override public Settings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { Settings settings = new Settings(); settings.setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setAddress(buildAddress()) .setLocation("us-central1-f") .setEnabled(deploymentConfiguration.getCanary().isEnabled()); return settings; } }
@Override public Settings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { KubernetesSharedServiceSettings kubernetesSharedServiceSettings = new KubernetesSharedServiceSettings(deploymentConfiguration); Settings settings = new Settings(); String location = kubernetesSharedServiceSettings.getDeployLocation(); settings.setAddress(buildAddress(location)) .setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setLocation(location) .setEnabled(deploymentConfiguration.getCanary().isEnabled()); return settings; }
@Override public Settings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { KubernetesSharedServiceSettings kubernetesSharedServiceSettings = new KubernetesSharedServiceSettings(deploymentConfiguration); Settings settings = new Settings(); String location = kubernetesSharedServiceSettings.getDeployLocation(); settings.setAddress(buildAddress(location)) .setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setLocation(location) .setEnabled(deploymentConfiguration.getCanary().isEnabled()); return settings; }
if (n.isEnabled()) { if (!configurationAndObjectStoresAreConfigured) { p.addProblem(Problem.Severity.WARNING, "There is no account of type CONFIGURATION_STORE and OBJECT_STORE configured.")
if (n.isEnabled()) { if (!configurationAndObjectStoresAreConfigured) { p.addProblem(Problem.Severity.WARNING, "There is no account of type CONFIGURATION_STORE and OBJECT_STORE configured.")