Search in sources :

Example 16 with TemplatedResource

use of com.netflix.spinnaker.halyard.core.resource.v1.TemplatedResource in project halyard by spinnaker.

the class ApacheSpinnakerProfileFactory method getBindings.

@Override
protected Map<String, Object> getBindings(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
    TemplatedResource resource = new StringResource(SSL_TEMPLATE);
    Map<String, Object> bindings = new HashMap<>();
    UiSecurity uiSecurity = deploymentConfiguration.getSecurity().getUiSecurity();
    ApacheSsl apacheSsl = uiSecurity.getSsl();
    bindings.put("cert-file", apacheSsl.getSslCertificateFile());
    bindings.put("key-file", apacheSsl.getSslCertificateKeyFile());
    String ssl = resource.setBindings(bindings).toString();
    bindings.clear();
    bindings.put("ssl", ssl);
    bindings.put("deck-host", endpoints.getServices().getDeck().getHost());
    bindings.put("deck-port", endpoints.getServices().getDeck().getPort() + "");
    return bindings;
}
Also used : StringResource(com.netflix.spinnaker.halyard.core.resource.v1.StringResource) UiSecurity(com.netflix.spinnaker.halyard.config.model.v1.security.UiSecurity) HashMap(java.util.HashMap) ApacheSsl(com.netflix.spinnaker.halyard.config.model.v1.security.ApacheSsl) TemplatedResource(com.netflix.spinnaker.halyard.core.resource.v1.TemplatedResource)

Aggregations

TemplatedResource (com.netflix.spinnaker.halyard.core.resource.v1.TemplatedResource)16 HashMap (java.util.HashMap)12 StringReplaceJarResource (com.netflix.spinnaker.halyard.core.resource.v1.StringReplaceJarResource)11 RemoteAction (com.netflix.spinnaker.halyard.core.RemoteAction)6 ArtifactService (com.netflix.spinnaker.halyard.deploy.services.v1.ArtifactService)5 GenerateService (com.netflix.spinnaker.halyard.deploy.services.v1.GenerateService)5 SpinnakerRuntimeSettings (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings)5 Collectors (java.util.stream.Collectors)5 JinjaJarResource (com.netflix.spinnaker.halyard.core.resource.v1.JinjaJarResource)4 DeploymentDetails (com.netflix.spinnaker.halyard.deploy.deployment.v1.DeploymentDetails)4 SpinnakerService (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.SpinnakerService)4 Strings (io.fabric8.utils.Strings)4 Autowired (org.springframework.beans.factory.annotation.Autowired)4 Component (org.springframework.stereotype.Component)4 ArtifactSourcesConfig (com.netflix.spinnaker.halyard.config.config.v1.ArtifactSourcesConfig)3 BillOfMaterials (com.netflix.spinnaker.halyard.core.registry.v1.BillOfMaterials)3 HasServiceSettings (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.HasServiceSettings)3 ServiceSettings (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings)3 KubernetesSharedServiceSettings (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.kubernetes.KubernetesSharedServiceSettings)3 LocalServiceProvider (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.local.LocalServiceProvider)3