Skip to content

Customize size constraint for the the emptyDir definition of shared-tmp.

Currently the gitlab-workhorse and webservice containers have a shared-tmp folder that is defined:

          volumeMounts:
            - name: workhorse-config
              mountPath: '/var/opt/gitlab/templates'
            - name: workhorse-secrets
              mountPath: '/etc/gitlab'
              readOnly: true
            - name: shared-upload-directory
              mountPath: /srv/gitlab/public/uploads/tmp
              readOnly: false
            - name: shared-tmp
              mountPath: '/tmp'
              readOnly: false

In gitlab-com/gl-infra/k8s-workloads/gitlab-com!1037 (merged), we attempted to add a temporary volume /tmp/gitlab with a 10 GB limit. However, this caused a production incident (gitlab-com/gl-infra/production#5194 (closed)), resulting in 400 errors for the reasons described in gitlab-org/gitlab#336609 (comment 632813416).

To avoid needing an extra mount, ideally we'd add support for customizing sizeLimit.

Related issues:

  1. #1651 (closed)
  2. gitlab-org/gitlab#336609 (closed)
Edited by Stan Hu