summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-07-10 11:43:51 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2019-07-11 10:38:12 +0200
commit56eb9f6c0ee719d06a0cccce8f815922d35b3b05 (patch)
treed0d1533a6751a0e0e9f9bce00a2c277ba52a7a14 /config
parent92fac459533d5afeea3b302ca7634767e0ff110b (diff)
downloadgitlab-ce-56eb9f6c0ee719d06a0cccce8f815922d35b3b05.tar.gz
Add `db_spin` and refactor ChaosControllerimprove-chaos-controller
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/config/routes.rb b/config/routes.rb
index a42fc037227..6ddfaf741f1 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -106,11 +106,14 @@ Rails.application.routes.draw do
draw :jira_connect
end
- 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'
+ if ENV['GITLAB_CHAOS_SECRET'] || Rails.env.development?
+ resource :chaos, only: [] do
+ get :leakmem
+ get :cpu_spin
+ get :db_spin
+ get :sleep
+ get :kill
+ end
end
end