From c601faf83634b52721f7b91c443be8b0b15af1f6 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 11 Aug 2024 16:43:23 -0500 Subject: [PATCH] Add /status/:code --- app.rb | 6 ++++++ kustomize/app/rollout.yaml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app.rb b/app.rb index 8fdcc12..d20fa06 100644 --- a/app.rb +++ b/app.rb @@ -2,6 +2,7 @@ require "bundler/setup" require "sinatra" require "sinatra/json" require "sinatra/cookies" +require "sinatra/multi_route" require "time" require "fileutils" require "json" @@ -355,3 +356,8 @@ get "/_cat/cookies" do end end end + +route :delete, :get, :patch, :post, :put, "/status/:code" do + code = params[:code] + status code.between? 100, 599 +end diff --git a/kustomize/app/rollout.yaml b/kustomize/app/rollout.yaml index d278c20..cab749d 100644 --- a/kustomize/app/rollout.yaml +++ b/kustomize/app/rollout.yaml @@ -4,7 +4,7 @@ kind: Rollout metadata: name: toy spec: - replicas: 5 + replicas: 4 strategy: canary: steps: