Compare commits
3 Commits
eaf642ca49
...
02f5cb55c4
Author | SHA1 | Date | |
---|---|---|---|
02f5cb55c4 | |||
87156eda3d | |||
22b9593ab1 |
7
app.rb
7
app.rb
@ -2,6 +2,7 @@ require "bundler/setup"
|
|||||||
require "sinatra"
|
require "sinatra"
|
||||||
require "sinatra/json"
|
require "sinatra/json"
|
||||||
require "sinatra/cookies"
|
require "sinatra/cookies"
|
||||||
|
require "sinatra/multi_route"
|
||||||
require "time"
|
require "time"
|
||||||
require "fileutils"
|
require "fileutils"
|
||||||
require "json"
|
require "json"
|
||||||
@ -355,3 +356,9 @@ get "/_cat/cookies" do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
route :delete, :get, :patch, :post, :put, "/status/:code" do
|
||||||
|
# hello
|
||||||
|
code = Integer(params[:code])
|
||||||
|
status code if code.between? 100, 599
|
||||||
|
end
|
||||||
|
@ -5,5 +5,6 @@ namespace: toy
|
|||||||
resources:
|
resources:
|
||||||
- secret.yaml
|
- secret.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
|
- rollout.yaml
|
||||||
- services.yaml
|
- services.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
---
|
---
|
||||||
kind: Deployment
|
apiVersion: argoproj.io/v1alpha1
|
||||||
apiVersion: apps/v1
|
kind: Rollout
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
|
||||||
reloader.stakater.com/auto: "true"
|
|
||||||
name: toy
|
name: toy
|
||||||
labels:
|
|
||||||
app: toy
|
|
||||||
spec:
|
spec:
|
||||||
replicas: 3
|
replicas: 5
|
||||||
|
strategy:
|
||||||
|
canary:
|
||||||
|
steps:
|
||||||
|
- setWeight: 20
|
||||||
|
- pause: {}
|
||||||
|
- setWeight: 40
|
||||||
|
- pause: {duration: 10}
|
||||||
|
- setWeight: 60
|
||||||
|
- pause: {duration: 10}
|
||||||
|
- setWeight: 80
|
||||||
|
- pause: {duration: 10}
|
||||||
|
revisionHistoryLimit: 2
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: toy
|
app: toy
|
||||||
@ -20,6 +28,7 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: toy
|
- name: toy
|
||||||
image: git.kill0.net/ryanc/toy:latest
|
image: git.kill0.net/ryanc/toy:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- name: web
|
- name: web
|
||||||
containerPort: 4567
|
containerPort: 4567
|
Loading…
Reference in New Issue
Block a user