public class DefaultContainerFactory extends Object implements ContainerFactory
Container
that will be started as part of a
Kubernetes Pod by launching the specified Docker image.Constructor and Description |
---|
DefaultContainerFactory(KubernetesDeployerProperties properties) |
Modifier and Type | Method and Description |
---|---|
io.fabric8.kubernetes.api.model.Container |
create(String appId,
org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request,
Integer port,
Integer instanceIndex,
boolean hostNetwork) |
protected List<String> |
createCommandArgs(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Create command arguments
|
protected io.fabric8.kubernetes.api.model.Probe |
createProbe(Integer externalPort,
String endpoint,
int timeout,
int initialDelay,
int period)
Create a readiness probe for the /health endpoint exposed by each module.
|
protected List<io.fabric8.kubernetes.api.model.VolumeMount> |
getVolumeMounts(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Volume mount deployment properties are specified in YAML format:
spring.cloud.deployer.kubernetes.volumeMounts=[{name: 'testhostpath', mountPath: '/test/hostPath'},
{name: 'testpvc', mountPath: '/test/pvc'}, {name: 'testnfs', mountPath: '/test/nfs'}]
Volume mounts can be specified as deployer properties as well as app deployment properties. |
public DefaultContainerFactory(KubernetesDeployerProperties properties)
public io.fabric8.kubernetes.api.model.Container create(String appId, org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request, Integer port, Integer instanceIndex, boolean hostNetwork)
create
in interface ContainerFactory
protected io.fabric8.kubernetes.api.model.Probe createProbe(Integer externalPort, String endpoint, int timeout, int initialDelay, int period)
protected List<String> createCommandArgs(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
protected List<io.fabric8.kubernetes.api.model.VolumeMount> getVolumeMounts(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
spring.cloud.deployer.kubernetes.volumeMounts=[{name: 'testhostpath', mountPath: '/test/hostPath'},
{name: 'testpvc', mountPath: '/test/pvc'}, {name: 'testnfs', mountPath: '/test/nfs'}]
Volume mounts can be specified as deployer properties as well as app deployment properties.
Deployment properties override deployer properties.request
- Copyright © 2017 Pivotal Software, Inc.. All rights reserved.