Skip to content

Add extraVolumes and extraVolumeMounts to Gitlab Pages

Silvester Wainaina requested to merge add-extravolumes-to-pages into master

What does this MR do?

This MR adds support for extraVolumes and extraVolumeMounts to Gitlab pages. You can do this by adding this configuration to the page's configuration and enabling GitLab pages global.pages.enabled=true

extraVolumes: |
   - name: example-volume
     persistentVolumeClaim:
       claimName: gitlab-pages

 extraVolumeMounts: |
   - name: example-volume
     mountPath: /etc/example

This creates a volume in the pages deployment

 volumes:
  - name: example-volume
    persistentVolumeClaim:
      claimName: gitlab-pages
  - configMap:
      defaultMode: 420
      name: gitlab-gitlab-pages

And a volume mount

volumeMounts:
    - mountPath: /etc/example
      name: example-volume
    - mountPath: /etc/gitlab-pages/templates
      name: pages-config
    - mountPath: /etc/gitlab-secrets
      name: pages-secrets
      readOnly: true

Related issues

Closes #2583 (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
Edited by DJ Mountney

Merge request reports