Skip to content

Commit

Permalink
CHE-249: Setting workspace Pod terminationGracePeriodSeconds to zero
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
  • Loading branch information
ibuziuk committed Jul 24, 2017
1 parent 849456b commit 7bc8a5e
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -174,6 +174,8 @@ public class OpenShiftConnector extends DockerConnector {
private static final int OPENSHIFT_WAIT_POD_DELAY = 1000;
private static final int OPENSHIFT_IMAGESTREAM_WAIT_DELAY = 2000;
private static final int OPENSHIFT_IMAGESTREAM_MAX_WAIT_COUNT = 30;
private static final long OPENSHIFT_POD_TERMINATION_GRACE_PERIOD = 0;

private static final String OPENSHIFT_POD_STATUS_RUNNING = "Running";
private static final String OPENSHIFT_VOLUME_STORAGE_CLASS = "volume.beta.kubernetes.io/storage-class";
private static final String OPENSHIFT_VOLUME_STORAGE_CLASS_NAME = "che-workspace";
Expand Down Expand Up @@ -1160,6 +1162,7 @@ private void createOpenShiftDeployment(String deploymentName,
PodSpec podSpec = new PodSpecBuilder()
.withContainers(container)
.withVolumes(getVolumesFrom(volumes))
.withTerminationGracePeriodSeconds(OPENSHIFT_POD_TERMINATION_GRACE_PERIOD)
.build();

Deployment deployment = new DeploymentBuilder()
Expand Down

0 comments on commit 7bc8a5e

Please sign in to comment.