From 40998b2336619d6a5c4a2d5917e99ea6782f770e 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 | 7 +++++++ kustomize/app/rollout.yaml | 1 + 2 files changed, 8 insertions(+) diff --git a/app.rb b/app.rb index 8fdcc12..398c9b3 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,9 @@ get "/_cat/cookies" do end end end + +route :delete, :get, :patch, :post, :put, "/status/:code" do + # hello + code = params[:code] + status if code.between?(100, 599) +end diff --git a/kustomize/app/rollout.yaml b/kustomize/app/rollout.yaml index d278c20..e47c57a 100644 --- a/kustomize/app/rollout.yaml +++ b/kustomize/app/rollout.yaml @@ -28,6 +28,7 @@ spec: containers: - name: toy image: git.kill0.net/ryanc/toy:latest + imagePullPolicy: Always ports: - name: web containerPort: 4567