diff --git a/CHANGELOG.md b/CHANGELOG.md index 75233c1067376524087996cf61f9ce21f08ffa32_Q0hBTkdFTE9HLm1k..3f35bb348ea3aea7f0d27d01c6eae84844c2ff6a_Q0hBTkdFTE9HLm1k 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ The latest version of this file can be found at the master branch of the omnibus-gitlab repository. +10.4.1 + +- Add GitLab pages status page configuration + 10.4.0 - Upgrade Ruby version to 2.3.6 diff --git a/files/gitlab-config-template/gitlab.rb.template b/files/gitlab-config-template/gitlab.rb.template index 75233c1067376524087996cf61f9ce21f08ffa32_ZmlsZXMvZ2l0bGFiLWNvbmZpZy10ZW1wbGF0ZS9naXRsYWIucmIudGVtcGxhdGU=..3f35bb348ea3aea7f0d27d01c6eae84844c2ff6a_ZmlsZXMvZ2l0bGFiLWNvbmZpZy10ZW1wbGF0ZS9naXRsYWIucmIudGVtcGxhdGU= 100644 --- a/files/gitlab-config-template/gitlab.rb.template +++ b/files/gitlab-config-template/gitlab.rb.template @@ -1029,6 +1029,9 @@ ##! Configure to expose GitLab Pages on external IP address, serving the HTTPS # gitlab_pages['external_https'] = [] +##! Configure to enable health check endpoint on GitLab Pages +# gitlab_pages['status_uri'] = "/@status" + # gitlab_pages['listen_proxy'] = "localhost:8090" # gitlab_pages['redirect_http'] = true # gitlab_pages['use_http2'] = true diff --git a/files/gitlab-cookbooks/gitlab/attributes/default.rb b/files/gitlab-cookbooks/gitlab/attributes/default.rb index 75233c1067376524087996cf61f9ce21f08ffa32_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRsYWIvYXR0cmlidXRlcy9kZWZhdWx0LnJi..3f35bb348ea3aea7f0d27d01c6eae84844c2ff6a_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRsYWIvYXR0cmlidXRlcy9kZWZhdWx0LnJi 100644 --- a/files/gitlab-cookbooks/gitlab/attributes/default.rb +++ b/files/gitlab-cookbooks/gitlab/attributes/default.rb @@ -546,6 +546,7 @@ default['gitlab']['gitlab-pages']['use_http2'] = true default['gitlab']['gitlab-pages']['dir'] = "/var/opt/gitlab/gitlab-pages" default['gitlab']['gitlab-pages']['log_directory'] = "/var/log/gitlab/gitlab-pages" +default['gitlab']['gitlab-pages']['status_uri'] = nil default['gitlab']['gitlab-pages']['artifacts_server'] = true default['gitlab']['gitlab-pages']['artifacts_server_url'] = nil default['gitlab']['gitlab-pages']['artifacts_server_timeout'] = 10 diff --git a/files/gitlab-cookbooks/gitlab/templates/default/sv-gitlab-pages-run.erb b/files/gitlab-cookbooks/gitlab/templates/default/sv-gitlab-pages-run.erb index 75233c1067376524087996cf61f9ce21f08ffa32_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRsYWIvdGVtcGxhdGVzL2RlZmF1bHQvc3YtZ2l0bGFiLXBhZ2VzLXJ1bi5lcmI=..3f35bb348ea3aea7f0d27d01c6eae84844c2ff6a_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRsYWIvdGVtcGxhdGVzL2RlZmF1bHQvc3YtZ2l0bGFiLXBhZ2VzLXJ1bi5lcmI= 100644 --- a/files/gitlab-cookbooks/gitlab/templates/default/sv-gitlab-pages-run.erb +++ b/files/gitlab-cookbooks/gitlab/templates/default/sv-gitlab-pages-run.erb @@ -33,6 +33,9 @@ \ -pages-domain="<%= node['gitlab']['gitlab-pages']['domain'] %>" \ -pages-root="<%= node['gitlab']['gitlab-pages']['pages_root'] %>" \ + <% if node['gitlab']['gitlab-pages']['status_uri'] %> + -pages-status="<%= node['gitlab']['gitlab-pages']['status_uri'] %>" \ + <% end %> \ -redirect-http=<%= node['gitlab']['gitlab-pages']['redirect_http'] %> \ -use-http2=<%= node['gitlab']['gitlab-pages']['use_http2'] %> \ diff --git a/spec/chef/recipes/gitlab-pages_spec.rb b/spec/chef/recipes/gitlab-pages_spec.rb index 75233c1067376524087996cf61f9ce21f08ffa32_c3BlYy9jaGVmL3JlY2lwZXMvZ2l0bGFiLXBhZ2VzX3NwZWMucmI=..3f35bb348ea3aea7f0d27d01c6eae84844c2ff6a_c3BlYy9jaGVmL3JlY2lwZXMvZ2l0bGFiLXBhZ2VzX3NwZWMucmI= 100644 --- a/spec/chef/recipes/gitlab-pages_spec.rb +++ b/spec/chef/recipes/gitlab-pages_spec.rb @@ -31,6 +31,7 @@ expect(chef_run).not_to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-root-cert}) expect(chef_run).not_to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-root-key}) expect(chef_run).not_to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-metrics-address}) + expect(chef_run).not_to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-status-uri}) end end @@ -46,7 +47,8 @@ redirect_http: true, cert: '/etc/gitlab/pages.crt', artifacts_server_url: "https://gitlab.elsewhere.com/api/v5", - artifacts_server_timeout: 60 + artifacts_server_timeout: 60, + status_uri: '/@status' } ) end @@ -68,6 +70,7 @@ expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-root-key}) expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-artifacts-server="https://gitlab.elsewhere.com/api/v5"}) expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-artifacts-server-timeout=60}) + expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-pages-status="/@status"}) end end