I want to use the k8s java client to create the below spec. The |-
is causing a problem
spec:
containers:
- args:
- |-
trap 'touch /usr/share/pod/done' EXIT
a/run.sh | tee /b/log/job.log
This is the code I currently have
PodTemplateSpecFluent.SpecNested<JobSpecFluent.TemplateNested<JobFluent.SpecNested<JobBuilder>>> topBuilder = new JobBuilder()
.withApiVersion("batch/v1")
...
.addNewVolume()
.withName("identity-certs")
.withNewEmptyDir()
.endEmptyDir()
.endVolume()
.addNewContainer()
.withName("deployer")
.withCommand("/bin/sh", "-c")
.withArgs("trap 'touch /usr/share/pod/done' EXIT && a/run.sh | tee /b/log/job.log")
.withEnv(Arrays.asList(
I somehow am not able to recreate the same spec with the |-
. Any ideas?