@Delegate(excludes = HasServiceSettings.class) public DistributedLogCollector getLogCollector() { return getLogCollectorFactory().build(this); }
@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(true); return settings; }
@Override public Jedis connectToPrimaryService(AccountDeploymentDetails<KubernetesAccount> details, SpinnakerRuntimeSettings runtimeSettings) { ServiceSettings settings = runtimeSettings.getServiceSettings(this); List<String> command = Arrays.stream(connectCommand(details, runtimeSettings).split(" ")).collect(Collectors.toList()); JobRequest request = new JobRequest().setTokenizedCommand(command); String jobId = getJobExecutor().startJob(request); // Wait for the proxy to spin up. DaemonTaskHandler.safeSleep(TimeUnit.SECONDS.toMillis(5)); JobStatus status = getJobExecutor().updateJob(jobId); // This should be a long-running job. if (status.getState() == JobStatus.State.COMPLETED) { throw new HalException(Problem.Severity.FATAL, "Unable to establish a proxy against Redis:\n" + status.getStdOut() + "\n" + status.getStdErr()); } return new Jedis("localhost", settings.getPort()); }
@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(true); return settings; }
@Override public Jedis connectToPrimaryService(AccountDeploymentDetails<KubernetesAccount> details, SpinnakerRuntimeSettings runtimeSettings) { ServiceSettings settings = runtimeSettings.getServiceSettings(this); List<String> command = Arrays.stream(connectCommand(details, runtimeSettings).split(" ")).collect(Collectors.toList()); JobRequest request = new JobRequest().setTokenizedCommand(command); String jobId = getJobExecutor().startJob(request); // Wait for the proxy to spin up. DaemonTaskHandler.safeSleep(TimeUnit.SECONDS.toMillis(5)); JobStatus status = getJobExecutor().updateJob(jobId); // This should be a long-running job. if (status.getState() == JobStatus.State.COMPLETED) { throw new HalException(Problem.Severity.FATAL, "Unable to establish a proxy against Redis:\n" + status.getStdOut() + "\n" + status.getStdErr()); } return new Jedis("localhost", settings.getPort()); }
@Delegate(excludes = HasServiceSettings.class) public DistributedLogCollector getLogCollector() { return getLogCollectorFactory().build(this); }