feat: convert Deployment to Rollout CRD with canary strategy
- Replace deployment.yaml with rollout.yaml - Add canary-service.yaml for traffic splitting - Add analysistemplate.yaml for Prometheus health checks - Update HTTPRoute with dual backends (stable + canary) - Update overlays with Rollout patches - Add Rollout transformer configuration for Kustomize
This commit is contained in:
47
apps/myapp/base/rollout.yaml
Normal file
47
apps/myapp/base/rollout.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: myapp
|
||||
labels:
|
||||
app: myapp
|
||||
managed-by: argocd
|
||||
spec:
|
||||
revisionHistoryLimit: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: myapp
|
||||
strategy:
|
||||
canary:
|
||||
canaryService: myapp-canary
|
||||
stableService: myapp
|
||||
trafficRouting:
|
||||
plugins:
|
||||
argoproj-labs/gatewayAPI:
|
||||
httpRoute: myapp-route
|
||||
namespace: default
|
||||
analysis:
|
||||
templates:
|
||||
- templateName: success-rate
|
||||
args:
|
||||
- name: service-name
|
||||
value: myapp
|
||||
startingStep: 1
|
||||
steps:
|
||||
- setWeight: 10
|
||||
- pause: {duration: 30s}
|
||||
- setWeight: 30
|
||||
- pause: {duration: 1m}
|
||||
- setWeight: 60
|
||||
- pause: {duration: 1m}
|
||||
- setWeight: 100
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: myapp
|
||||
spec:
|
||||
containers:
|
||||
- name: myapp
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
Reference in New Issue
Block a user