public class AbstractKubernetesDeployer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected io.fabric8.kubernetes.client.KubernetesClient |
client |
protected ContainerFactory |
containerFactory |
protected org.apache.commons.logging.Log |
logger |
protected KubernetesDeployerProperties |
properties |
protected static String |
SPRING_APP_KEY |
protected static String |
SPRING_DEPLOYMENT_KEY |
protected static String |
SPRING_GROUP_KEY |
protected static String |
SPRING_MARKER_KEY |
protected static String |
SPRING_MARKER_VALUE |
| Constructor and Description |
|---|
AbstractKubernetesDeployer() |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.cloud.deployer.spi.app.AppStatus |
buildAppStatus(String id,
io.fabric8.kubernetes.api.model.PodList podList,
io.fabric8.kubernetes.api.model.ServiceList services) |
protected Map<String,String> |
createIdMap(String appId,
org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Creates a map of labels for a given ID.
|
protected io.fabric8.kubernetes.api.model.PodSpec |
createPodSpec(String appId,
org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request,
Integer port,
boolean neverRestart)
Create a PodSpec to be used for app and task deployments
|
protected org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo |
createRuntimeEnvironmentInfo(Class spiClass,
Class implementationClass)
Create the RuntimeEnvironmentInfo.
|
protected ImagePullPolicy |
deduceImagePullPolicy(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Get the image pull policy for the deployment request.
|
protected Map<String,io.fabric8.kubernetes.api.model.Quantity> |
deduceResourceLimits(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Get the resource limits for the deployment request.
|
protected Map<String,io.fabric8.kubernetes.api.model.Quantity> |
deduceResourceRequests(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Get the resource requests for the deployment request.
|
protected boolean |
getHostNetwork(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Get the hostNetwork setting for the deployment request.
|
protected String |
getStatefulSetStorage(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request) |
protected String |
getStatefulSetStorageClassName(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request) |
protected List<io.fabric8.kubernetes.api.model.Volume> |
getVolumes(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Volume deployment properties are specified in YAML format:
spring.cloud.deployer.kubernetes.volumes=[{name: testhostpath, hostPath: { path: '/test/override/hostPath' }},
{name: 'testpvc', persistentVolumeClaim: { claimName: 'testClaim', readOnly: 'true' }},
{name: 'testnfs', nfs: { server: '10.0.0.1:111', path: '/test/nfs' }}]
Volumes can be specified as deployer properties as well as app deployment properties. |
protected void |
logPossibleDownloadResourceMessage(org.springframework.core.io.Resource resource) |
protected static final String SPRING_DEPLOYMENT_KEY
protected static final String SPRING_GROUP_KEY
protected static final String SPRING_APP_KEY
protected static final String SPRING_MARKER_KEY
protected static final String SPRING_MARKER_VALUE
protected final org.apache.commons.logging.Log logger
protected ContainerFactory containerFactory
protected io.fabric8.kubernetes.client.KubernetesClient client
protected KubernetesDeployerProperties properties
protected org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo createRuntimeEnvironmentInfo(Class spiClass, Class implementationClass)
spiClass - the SPI interface classimplementationClass - the SPI implementation classprotected Map<String,String> createIdMap(String appId, org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
appId - the application idrequest - The AppDeploymentRequestprotected org.springframework.cloud.deployer.spi.app.AppStatus buildAppStatus(String id, io.fabric8.kubernetes.api.model.PodList podList, io.fabric8.kubernetes.api.model.ServiceList services)
protected io.fabric8.kubernetes.api.model.PodSpec createPodSpec(String appId, org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request, Integer port, boolean neverRestart)
appId - the app IDrequest - app deployment requestport - port to use for app or null if noneneverRestart - use restart policy of Neverprotected List<io.fabric8.kubernetes.api.model.Volume> getVolumes(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
spring.cloud.deployer.kubernetes.volumes=[{name: testhostpath, hostPath: { path: '/test/override/hostPath' }},
{name: 'testpvc', persistentVolumeClaim: { claimName: 'testClaim', readOnly: 'true' }},
{name: 'testnfs', nfs: { server: '10.0.0.1:111', path: '/test/nfs' }}]
Volumes can be specified as deployer properties as well as app deployment properties.
Deployment properties override deployer properties.request - the AppDeploymentRequestprotected Map<String,io.fabric8.kubernetes.api.model.Quantity> deduceResourceLimits(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
Falls back to the server properties if not present in the deployment request.
request - The deployment properties.protected ImagePullPolicy deduceImagePullPolicy(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
request - The deployment request.protected Map<String,io.fabric8.kubernetes.api.model.Quantity> deduceResourceRequests(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
request - The deployment properties.protected String getStatefulSetStorageClassName(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
protected String getStatefulSetStorage(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
protected boolean getHostNetwork(org.springframework.cloud.deployer.spi.core.AppDeploymentRequest request)
request - The deployment request.protected void logPossibleDownloadResourceMessage(org.springframework.core.io.Resource resource)
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.