Skip to content
Snippets Groups Projects

WIP: gitlab-pages: Allow external_http and external_https to be arrays

This change is backwards-compatible - if they're set to strings instead, the configuration should remain unchanged.

I'm afraid I'm brand-new to omnibus (and chef!) and haven't been able to work out how to run more than the spec/ tests in the time I've allocated for this

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
131 131 host: <%= @pages_host %>
132 132 port: <%= @pages_port %>
133 133 https: <%= @pages_https %>
134 external_http: <%= @pages_external_http %>
135 external_https: <%= @pages_external_https %>
134 external_http: <%= @pages_external_http.inspect %>
135 external_https: <%= @pages_external_https.inspect %>
  • I am a bit worried how will this actually be passed to GitLab rails app given that I don't remember how external_http(s) is parsed/used in GitLab. I think that there is only support for strings and I am not sure how it will behave with strings like "[1.2.3.4,4.5.6.7]". @ayufan You are following the development of the dependent MR's, can you comment?

  • Good catch, I didn't think to look at usages of these two nodes in gitlab-ee itself!

    BTW, I'm relying on this snippet to cause the generated gitlab.yml to look like this:

    production:
      gitlab:
        pages:
          external_http: ["1.1.1.1:80", "[2001::1]:80"]
          external_https: ["1.1.1.1:443", "[2001::1]:443"]  

    ...which is to say, the value you get by calling Gitlab.config.pages.external_https would be a Ruby array containing two strings, rather than the string ["1.1.1.1:80", "[2001::1]:80"].

    I've had a look through the repository and there are a few sites that would misbehave if given an empty array instead of nil / false; I can't see any sites that use the truthy values except to say "gitlab pages can serve https", or "gitlab pages is present", etc.

    I'll add a commit to https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/383 to fix it up tomorrow, if I get the chance.

  • We only need this values for the purpose of saying that client supports custom domain, and support custom certificate. Anything that gets passed and is .present? should be fine there :)

  • Looks awesomely good! :thumbsup:

  • We just updated our Gitlab CE today and had to manually modify /opt/gitlab/service/gitlab-pages/run in order to have gitlab-pages listening on both IPv4 and IPv6.

    This MR seems to perfectly meet our needs! :slight_smile: :thumbsup:

  • Nick Thomas mentioned in merge request !1383 (merged)

    mentioned in merge request !1383 (merged)

  • closed

  • Please register or sign in to reply
    Loading