From cfe3cfb370ca112c5cab2af3550cf68c2ec6042d Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Thu, 1 Nov 2018 12:56:32 +0000 Subject: Adding chaos to GitLab through chaos endpoints --- config/routes.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index 37c7f98ec98..4764b85cc30 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -82,6 +82,8 @@ Rails.application.routes.draw do draw :operations draw :instance_statistics + + get '/chaos/sleep' => 'chaos#sleep' end draw :api -- cgit v1.2.3 From 83dc8f1c666419434a23e467508061b6897fdfb6 Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Thu, 1 Nov 2018 13:16:21 +0000 Subject: Leak memory, spin cpu and kill the process --- config/routes.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index 4764b85cc30..d214356f3e9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -83,7 +83,10 @@ Rails.application.routes.draw do draw :operations draw :instance_statistics + get '/chaos/leakmem' => 'chaos#leakmem' + get '/chaos/cpuspin' => 'chaos#cpuspin' get '/chaos/sleep' => 'chaos#sleep' + get '/chaos/kill' => 'chaos#kill' end draw :api -- cgit v1.2.3 From 847c81b755b6b4146eb3fa3d5912f3d573739bd1 Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Thu, 1 Nov 2018 17:20:34 +0000 Subject: Add documentation, secure routes, etc --- config/routes.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index d214356f3e9..d4c19a03ff8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -83,10 +83,12 @@ Rails.application.routes.draw do draw :operations draw :instance_statistics - get '/chaos/leakmem' => 'chaos#leakmem' - get '/chaos/cpuspin' => 'chaos#cpuspin' - get '/chaos/sleep' => 'chaos#sleep' - get '/chaos/kill' => 'chaos#kill' + if ENV['GITLAB_ENABLE_CHAOS_ENDPOINTS'] + get '/chaos/leakmem' => 'chaos#leakmem' + get '/chaos/cpuspin' => 'chaos#cpuspin' + get '/chaos/sleep' => 'chaos#sleep' + get '/chaos/kill' => 'chaos#kill' + end end draw :api -- cgit v1.2.3