public PodTemplateSpec done(){ return function.apply(builder.build()); }
public PodTemplateSpec getPodTemplate(ResourceConfig config, List<ImageConfiguration> images) { return new PodTemplateSpecBuilder() .withMetadata(createPodMetaData(config)) .withSpec(createPodSpec(config, images)) .build(); }
public void appendInitContainer(PodTemplateSpecBuilder builder, Container initContainer) { String name = initContainer.getName(); Container existing = getInitContainer(builder, name); if (existing != null) { if (existing.equals(initContainer)) { log.warn("Trying to add init-container %s a second time. Ignoring ....", name); return; } else { throw new IllegalArgumentException( String.format("PodSpec %s already contains a different init container with name %s but can not add a second one with the same name. " + "Please choose a different name for the init container", builder.build().getMetadata().getName(), name)); } } ensureSpec(builder); builder.editSpec().addToInitContainers(initContainer).endSpec(); }
public void appendInitContainer(PodTemplateSpecBuilder builder, Container initContainer) { String name = initContainer.getName(); Container existing = getInitContainer(builder, name); if (existing != null) { if (existing.equals(initContainer)) { log.warn("Trying to add init-container %s a second time. Ignoring ....", name); return; } else { throw new IllegalArgumentException( String.format("PodSpec %s already contains a different init container with name %s but can not add a second one with the same name. " + "Please choose a different name for the init container", builder.build().getMetadata().getName(), name)); } } ensureSpec(builder); builder.editSpec().addToInitContainers(initContainer).endSpec(); }
PodTemplateSpec template = podTemplateSpecBuilder.build(); Deployment deployment = new DeploymentBuilder() .withNewMetadata()
PodTemplateSpec template = podTemplateSpecBuilder.build(); DeploymentConfig deployment = new DeploymentConfigBuilder() .withNewMetadata()