Compare commits

...

3 Commits

Author SHA1 Message Date
02f5cb55c4
Remove Deployment in favor of a Rollout
All checks were successful
Gitea Actions Demo / lint (push) Successful in 1m20s
Gitea Actions Demo / test (push) Successful in 1m18s
Gitea Actions Demo / release-image (push) Successful in 1m18s
2024-08-11 17:53:08 -05:00
87156eda3d
Add /status/:code 2024-08-11 17:52:44 -05:00
22b9593ab1
Add Argo Rollout 2024-08-11 17:52:44 -05:00
3 changed files with 24 additions and 7 deletions

7
app.rb
View File

@ -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 = Integer(params[:code])
status code if code.between? 100, 599
end

View File

@ -5,5 +5,6 @@ namespace: toy
resources:
- secret.yaml
- deployment.yaml
- rollout.yaml
- services.yaml
- ingress.yaml

View File

@ -1,14 +1,22 @@
---
kind: Deployment
apiVersion: apps/v1
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
annotations:
reloader.stakater.com/auto: "true"
name: toy
labels:
app: toy
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:
matchLabels:
app: toy
@ -20,6 +28,7 @@ spec:
containers:
- name: toy
image: git.kill0.net/ryanc/toy:latest
imagePullPolicy: Always
ports:
- name: web
containerPort: 4567