cspec.set("args", args); cspec.put("workingDir", it.getWorkingDir()); cspec.put("tty", it.getTty()); cspec.put("imagePullPolicy", it.getImagePullPolicy()); cspec.put("image", it.getImage());
List<String> command = template.getCommand() == null ? parent.getCommand() : template.getCommand(); List<String> args = template.getArgs() == null ? parent.getArgs() : template.getArgs(); Boolean tty = template.getTty() != null ? template.getTty() : parent.getTty(); Map<String, Quantity> requests = combineResources(parent, template, ResourceRequirements::getRequests); Map<String, Quantity> limits = combineResources(parent, template, ResourceRequirements::getLimits);
public ContainerFluentImpl(Container instance){ this.withArgs(instance.getArgs()); this.withCommand(instance.getCommand()); this.withEnv(instance.getEnv()); this.withImage(instance.getImage()); this.withImagePullPolicy(instance.getImagePullPolicy()); this.withLifecycle(instance.getLifecycle()); this.withLivenessProbe(instance.getLivenessProbe()); this.withName(instance.getName()); this.withPorts(instance.getPorts()); this.withReadinessProbe(instance.getReadinessProbe()); this.withResources(instance.getResources()); this.withSecurityContext(instance.getSecurityContext()); this.withStdin(instance.getStdin()); this.withStdinOnce(instance.getStdinOnce()); this.withTerminationMessagePath(instance.getTerminationMessagePath()); this.withTty(instance.getTty()); this.withVolumeMounts(instance.getVolumeMounts()); this.withWorkingDir(instance.getWorkingDir()); }
public ContainerBuilder(ContainerFluent<?> fluent,Container instance,Boolean validationEnabled){ this.fluent = fluent; fluent.withArgs(instance.getArgs()); fluent.withCommand(instance.getCommand()); fluent.withEnv(instance.getEnv()); fluent.withImage(instance.getImage()); fluent.withImagePullPolicy(instance.getImagePullPolicy()); fluent.withLifecycle(instance.getLifecycle()); fluent.withLivenessProbe(instance.getLivenessProbe()); fluent.withName(instance.getName()); fluent.withPorts(instance.getPorts()); fluent.withReadinessProbe(instance.getReadinessProbe()); fluent.withResources(instance.getResources()); fluent.withSecurityContext(instance.getSecurityContext()); fluent.withStdin(instance.getStdin()); fluent.withStdinOnce(instance.getStdinOnce()); fluent.withTerminationMessagePath(instance.getTerminationMessagePath()); fluent.withTty(instance.getTty()); fluent.withVolumeMounts(instance.getVolumeMounts()); fluent.withWorkingDir(instance.getWorkingDir()); this.validationEnabled = validationEnabled; } public ContainerBuilder(Container instance){
public ContainerBuilder(Container instance,Boolean validationEnabled){ this.fluent = this; this.withArgs(instance.getArgs()); this.withCommand(instance.getCommand()); this.withEnv(instance.getEnv()); this.withImage(instance.getImage()); this.withImagePullPolicy(instance.getImagePullPolicy()); this.withLifecycle(instance.getLifecycle()); this.withLivenessProbe(instance.getLivenessProbe()); this.withName(instance.getName()); this.withPorts(instance.getPorts()); this.withReadinessProbe(instance.getReadinessProbe()); this.withResources(instance.getResources()); this.withSecurityContext(instance.getSecurityContext()); this.withStdin(instance.getStdin()); this.withStdinOnce(instance.getStdinOnce()); this.withTerminationMessagePath(instance.getTerminationMessagePath()); this.withTty(instance.getTty()); this.withVolumeMounts(instance.getVolumeMounts()); this.withWorkingDir(instance.getWorkingDir()); this.validationEnabled = validationEnabled; }