Skip to content

Webservice: implement configurable emptyDirs

Jason Plum requested to merge 2816-emptydir-configs into master

What does this MR do?

Implement that ability to control the emptyDir definitions for shared-tmp and shared-upload-directory within the Webservice chart, per the needs of #2816 (closed) In this case we allow the user to configure an arbitrary emptyDir configuration.

Testing

Using yaml file:

gitlab:
  webservice:
    enabled: true
    sharedTmpDir:
      sizeLimit: 1G
    sharedUploadDir:
      sizeLimit: 1G

Results in an successfully built Deployment spec for the webservice.


Setting an invalid key results in a successful deployment, though the key appears ignored entirely, it doesn't show up in the deployed Deployment object.


Setting a valid medium key with an invalid value results in a successful deployment, though the configuration will fail to rollout properly. Example:

gitlab:
  webservice:
    enabled: true
    sharedTmpDir:
      sizeLimit: 1G
      medium: bar

Describing a Pod stuck in the Init phase will have the following event log:

MountVolume.SetUp failed for volume "shared-tmp" : unknown storage medium "bar"


Setting a valid sizeLimit key with an invalid value results in a failed deployment. Helm will bubble up the error from the kubectl patching procedure. Example:

gitlab:
  webservice:
    enabled: true
    sharedTmpDir:
      sizeLimit: foobar

error found in #10 byte of ...|":"foobar"},"name":"|..., bigger context ...|s":30,"volumes":[{"emptyDir":{"sizeLimit":"foobar"},"name":"shared-tmp"},{"emptyDir":{"medium":"Memo|...


An upgrade to transition between the current default branch and this change works well.

Related issues

Closes #2816 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened

Closes #2816 (closed)

Edited by John Skarbek

Merge request reports

Loading