diff --git a/nodepool/driver/kubernetes/provider.py b/nodepool/driver/kubernetes/provider.py index 6a82fdd4b..78603207d 100644 --- a/nodepool/driver/kubernetes/provider.py +++ b/nodepool/driver/kubernetes/provider.py @@ -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, } diff --git a/nodepool/driver/openshift/provider.py b/nodepool/driver/openshift/provider.py index 8228a9407..f39a59d8e 100644 --- a/nodepool/driver/openshift/provider.py +++ b/nodepool/driver/openshift/provider.py @@ -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: diff --git a/releasenotes/notes/k8s-provider-remove-default-workdir-21df518c822b2914.yaml b/releasenotes/notes/k8s-provider-remove-default-workdir-21df518c822b2914.yaml new file mode 100644 index 000000000..9859d4be3 --- /dev/null +++ b/releasenotes/notes/k8s-provider-remove-default-workdir-21df518c822b2914.yaml @@ -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.