.withTerminationGracePeriodSeconds(5L) .withVolumes(volumes) .withImagePullSecrets(imagePullSecrets) .endSpec() .endTemplate()
.withTerminationGracePeriodSeconds(5L) .withVolumes(volumes) .withImagePullSecrets(imagePullSecrets) .endSpec() .endTemplate()
.withTolerations(getTolerations()) .withTerminationGracePeriodSeconds(Long.valueOf(templateTerminationGracePeriodSeconds)) .withImagePullSecrets(templateImagePullSecrets) .withSecurityContext(templateSecurityContext) .endSpec()
.withTolerations(getTolerations()) .withTerminationGracePeriodSeconds(Long.valueOf(templateTerminationGracePeriodSeconds)) .withImagePullSecrets(templateImagePullSecrets) .withSecurityContext(securityContext) .endSpec()
.withAffinity(getMergedAffinity()) .withTerminationGracePeriodSeconds(Long.valueOf(templateTerminationGracePeriodSeconds)) .withImagePullSecrets(templateImagePullSecrets) .withSecurityContext(templateSecurityContext) .endSpec()
.withNewSpec() .withContainers(container) .withImagePullSecrets(getImagePullSecrets(deploymentModel)) .withInitContainers(generateInitContainer(deploymentModel)) .withVolumes(populateVolume(deploymentModel))
private Job getJob(JobModel jobModel) { JobBuilder jobBuilder = new JobBuilder() .withNewMetadata() .withName(jobModel.getName()) .withNamespace(dataHolder.getNamespace()) .endMetadata() .withNewSpec() .withNewTemplate() .withNewSpec() .withRestartPolicy(jobModel.getRestartPolicy()) .withContainers(generateContainer(jobModel)) .withImagePullSecrets(getImagePullSecrets(jobModel)) .endSpec() .endTemplate() .endSpec(); return jobBuilder.build(); }