Configure the GitLab chart with external GitLab Pages
This document intends to provide documentation on how to configure this Helm chart with a GitLab Pages instance, configured outside of the cluster using a Linux package. Issue 418259 proposes adding documentation for a Linux package instance with an external GitLab Pages using the Helm chart.
Requirements
- External Object Storage, as recommended for production instances, should be used.
- Base64 encoded form of a 32-bytes-long API secret key for Pages to interact with GitLab Pages.
Known limitations
- GitLab Pages Access Control is not supported out of the box.
Configure external GitLab Pages instance
-
Install GitLab using the Linux package.
-
Edit
/etc/gitlab/gitlab.rb
file and replace its contents with the following snippet. Update the values below to match your configuration:roles ['pages_role'] # Root domain where Pages will be served. pages_external_url '<Pages root domain>' # Example: 'http://pages.example.io' # Information regarding GitLab instance gitlab_pages['gitlab_server'] = '<GitLab URL>' # Example: 'https://gitlab.example.com' gitlab_pages['api_secret_key'] = '<Base64 encoded form of API secret key>'
-
Apply the changes by running
sudo gitlab-ctl reconfigure
.
Configure the chart
-
Create a bucket named
gitlab-pages
in the object storage for storing Pages deployments. -
Create a secret
gitlab-pages-api-key
with the Base64 encoded form of API secret key as value.kubectl create secret generic gitlab-pages-api-key --from-literal="shared_secret=<Base 64 encoded API Secret Key>"
-
Refer the following configuration snippet and add necessary entries to your values file.
global: pages: path: '/srv/gitlab/shared/pages' host: <Pages root domain> port: '80' # Set to 443 if Pages is served over HTTPS https: false # Set to true if Pages is served over HTTPS artifactsServer: true objectStore: enabled: true bucket: 'gitlab-pages' apiSecret: secret: gitlab-pages-api-key key: shared_secret extraEnv: PAGES_UPDATE_LEGACY_STORAGE: true # Bypass automatic disabling of disk storage
By setting
PAGES_UPDATE_LEGACY_STORAGE
environment variable to true, the feature flagpages_update_legacy_storage
is enabled which deploys Pages to local disk. When you migrate to object storage, do remember to remove this variable. -
Deploy the chart using this configuration.
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support