Skip to content

Commit f9c729b

Browse files
author
Corneil du Plessis
committed
Update ContainerProperties to match k8s PodSpec.
Updated tests to use old and new names. Deprecated old names. Fixes spring-attic#477
1 parent 324b59c commit f9c729b

File tree

5 files changed

+1755
-1665
lines changed

5 files changed

+1755
-1665
lines changed

spring-cloud-deployer-kubernetes/src/main/java/org/springframework/cloud/deployer/spi/kubernetes/DefaultContainerFactory.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,13 @@ public Container create(ContainerConfiguration containerConfiguration) {
168168
envFromSources.addAll(deploymentPropertiesResolver.getSecretRefs(deploymentProperties));
169169

170170
ContainerBuilder container = new ContainerBuilder();
171-
container.withName(containerConfiguration.getAppId()).withImage(image).withEnv(envVars).withEnvFrom(envFromSources)
172-
.withArgs(appArgs).withVolumeMounts(deploymentPropertiesResolver.getVolumeMounts(deploymentProperties));
171+
container.withName(containerConfiguration.getAppId())
172+
.withImage(image)
173+
.withEnv(envVars)
174+
.withEnvFrom(envFromSources)
175+
.withArgs(appArgs)
176+
.withImagePullPolicy(deploymentPropertiesResolver.getImagePullPolicy(deploymentProperties))
177+
.withVolumeMounts(deploymentPropertiesResolver.getVolumeMounts(deploymentProperties));
173178

174179
Set<Integer> ports = new HashSet<>();
175180

0 commit comments

Comments
 (0)