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(ContainerConfiguration containerConfiguration)
Creates a
Container using configuration from the provided ContainerConfiguration. |
protected List<String> |
createCommandArgs(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Create command arguments
|
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:
|
public DefaultContainerFactory(KubernetesDeployerProperties properties)
public io.fabric8.kubernetes.api.model.Container create(ContainerConfiguration containerConfiguration)
ContainerFactoryContainer using configuration from the provided ContainerConfiguration.create in interface ContainerFactorycontainerConfiguration - the ContainerConfigurationContainerprotected List<String> createCommandArgs(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
request - the AppDeploymentRequestprotected 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 - the AppDeploymentRequestCopyright © 2020 Pivotal Software, Inc.. All rights reserved.