k8s/OpenShift Provider: Remove workingDir Attribute

For users to be able to specifiy a custom working dir for their
container nodes this change removes the hard-coded /tmp workingDir
attribute from the container specs.

The user-specified WORKDIR from the respective Dockerfile is then used.

Change-Id: I0e2c0ca5be0af2360f54336340a40fa37ffe1001
This commit is contained in:
Benjamin Schanzel 2020-10-21 10:28:17 +02:00
parent ee2bc79ae2
commit d4cf0572e6
3 changed files with 10 additions and 2 deletions

View File

@ -281,7 +281,6 @@ class KubernetesProvider(Provider, QuotaSupport):
'imagePullPolicy': label.image_pull,
'command': ["/bin/sh", "-c"],
'args': ["while true; do sleep 30; done;"],
'workingDir': '/tmp',
'env': label.env,
}

View File

@ -210,7 +210,6 @@ class OpenshiftProvider(Provider):
'imagePullPolicy': label.image_pull,
'command': ["/bin/sh", "-c"],
'args': ["while true; do sleep 30; done;"],
'workingDir': '/tmp',
'env': label.env,
}
if label.cpu or label.memory:

View File

@ -0,0 +1,10 @@
---
upgrade:
- |
The k8s and OpenShift providers do not longer set the workingDir attribute
of their container specs to /tmp.
For increased flexibility for the user, the working dir specified in the
container images Dockerfile is used as the default in container nodes.
Please note that this might often be the root dir ('/') if not specified
otherwise by the respective Dockerfiles WORKDIR directive.