diff --git a/CHANGELOG.md b/CHANGELOG.md index fab0b1c765330192d55b20c99194fee63f15b876_Q0hBTkdFTE9HLm1k..4aa96adc8d069f0077bad636d412e137b22467da_Q0hBTkdFTE9HLm1k 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,4 +4,5 @@ omnibus-gitlab repository. 10.4.1 + - Update gitlab-monitor to 2.5.0 @@ -7,4 +8,6 @@ - Update gitlab-monitor to 2.5.0 +- Add GitLab pages status page configuration + 10.4.0 diff --git a/files/gitlab-config-template/gitlab.rb.template b/files/gitlab-config-template/gitlab.rb.template index fab0b1c765330192d55b20c99194fee63f15b876_ZmlsZXMvZ2l0bGFiLWNvbmZpZy10ZW1wbGF0ZS9naXRsYWIucmIudGVtcGxhdGU=..4aa96adc8d069f0077bad636d412e137b22467da_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 fab0b1c765330192d55b20c99194fee63f15b876_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRsYWIvYXR0cmlidXRlcy9kZWZhdWx0LnJi..4aa96adc8d069f0077bad636d412e137b22467da_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 fab0b1c765330192d55b20c99194fee63f15b876_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRsYWIvdGVtcGxhdGVzL2RlZmF1bHQvc3YtZ2l0bGFiLXBhZ2VzLXJ1bi5lcmI=..4aa96adc8d069f0077bad636d412e137b22467da_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 fab0b1c765330192d55b20c99194fee63f15b876_c3BlYy9jaGVmL3JlY2lwZXMvZ2l0bGFiLXBhZ2VzX3NwZWMucmI=..4aa96adc8d069f0077bad636d412e137b22467da_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