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:
22
apps/myapp/base/analysistemplate.yaml
Normal file
22
apps/myapp/base/analysistemplate.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: AnalysisTemplate
|
||||
metadata:
|
||||
name: success-rate
|
||||
labels:
|
||||
app: myapp
|
||||
managed-by: argocd
|
||||
spec:
|
||||
args:
|
||||
- name: service-name
|
||||
metrics:
|
||||
- name: success-rate
|
||||
interval: 30s
|
||||
successCondition: result[0] >= 0.95
|
||||
failureLimit: 3
|
||||
provider:
|
||||
prometheus:
|
||||
address: http://kube-prometheus-stack-prometheus.monitoring.svc.cluster.local:9090
|
||||
query: |
|
||||
sum(rate(http_requests_total{service="{{args.service-name}}",code=~"2.."}[1m]))
|
||||
/
|
||||
sum(rate(http_requests_total{service="{{args.service-name}}"}[1m]))
|
||||
Reference in New Issue
Block a user