Skip to content

Add ability to configure GitLab Pages settings to Rails containers

Summary

Expose the ability to configured these charts to be aware of GitLab Pages.

Details

These charts can not currently deploy GitLab Pages while we await upstream changes there. There does exist a way to deploy external Pages.

In order for this to work, we need to be able to populate the several properties in gitlab.yml.erb which are not available at this time.

Example changes added to the exploratory environment:

+      ## GitLab Pages
       pages:
-        enabled: false
+        enabled: true
+        access_control: false
+        path: /var/opt/gitlab/gitlab-rails/shared/pages
+        host: pages.example.com
+        port: 80
+        https: false
+        external_http: ["1.1.1.1:80", "[2001::1]:80"]
+        external_https: ["1.1.1.1:443", "[2001::1]:443"]
+        artifacts_server: true
+        object_store:
+          enabled: true
+          remote_directory: pages # The bucket name
+          connection:
+            provider: AWS
+            aws_access_key_id: minio
+            aws_secret_access_key: gdk-minio
+            region: gdk
+            endpoint: 'http://10.126.0.2:9000'
+            path_style: true
  • Note that pages also supports consolidated object storage, so these settings are also needed

These were hard coded changes for development, but should be placed into properties. gitlab-org/gitlab shows this section of properties, which I have translated to our behaviors below:

global:
  appConfig:
    ## GitLab Pages
    pages:
      enabled: false
      access_control: false
      # `path` setting is not needed at this time, but may need to be present for now.
      path: /srv/gitlab/shared/pages
      host: example.com
      port: 80 # Set to 443 if you serve the pages with HTTPS
      https: false # Set to true if you serve the pages with HTTPS
      artifacts_server: true # Set to false if you want to disable online view of HTML artifacts
      external:
        http: ["1.1.1.1:80", "[2001::1]:80"] # If defined, enables custom domain support in GitLab Pages
        https: ["1.1.1.1:443", "[2001::1]:443"] # If defined, enables custom domain and certificate support in GitLab Pages

      # Secret that contains the shared secret key for verifying access for gitlab-pages.
      # This will be placed into `/etc/gitlab/pages/shared_secret`, and `secret_file` that.
      secret: gitlab-pages
      key: pages_shared_secret
      object_store:
        enabled: true
        remote_directory: pages
        connection:
          secret: pages-connection
          key: connection

Note: the above is a direct translation of these properties from gitlab.yml, and does not follow this chart's general preference for camel case over snake case

Current behavior

Unable to configure GitLab Pages settings for Rails containers

Expected behavior

To be able to configure the Rails containers to recognize pages settings.

Versions

Edited by Jason Plum