summaryrefslogtreecommitdiff
path: root/f3s/tracing-demo/helm-chart/templates/frontend-rollout.yaml
blob: 3f7f576174ded98ca470a749ba6a8f8207daa3a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Frontend Service Rollout (Progressive Delivery)
# Replaces frontend-deployment.yaml with canary strategy
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: tracing-demo-frontend
  namespace: services
  labels:
    app: tracing-demo-frontend
    component: frontend
spec:
  replicas: 3  # Increase to 3 for visible canary (1 old + 1 new + 1 old)
  strategy:
    canary:
      # Canary strategy with auto-promotion after 1 minute
      steps:
      # Step 1: 1 pod (33% traffic) to new version
      - setWeight: 33
      # Step 2: Wait 1 minute then auto-promote
      - pause:
          duration: 1m  # Auto-promote after 1 minute
      # Step 3: 100% traffic to new version
      - setWeight: 100
  
  # Rollout revision history
  revisionHistoryLimit: 3
  
  # Pod template specification (same as Deployment)
  selector:
    matchLabels:
      app: tracing-demo-frontend
  template:
    metadata:
      labels:
        app: tracing-demo-frontend
        component: frontend
    spec:
      containers:
      - name: frontend
        image: registry.lan.buetow.org:30001/tracing-demo-frontend:latest
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 5000
          name: http
          protocol: TCP
        env:
        - name: MIDDLEWARE_URL
          value: "http://middleware-service.services.svc.cluster.local:5001"
        - name: OTEL_EXPORTER_OTLP_ENDPOINT
          value: "http://alloy.monitoring.svc.cluster.local:4317"
        resources:
          limits:
            cpu: 200m
            memory: 256Mi
          requests:
            cpu: 100m
            memory: 128Mi
        livenessProbe:
          httpGet:
            path: /health
            port: 5000
          initialDelaySeconds: 10
          periodSeconds: 10
        readinessProbe:
          httpGet:
            path: /health
            port: 5000
          initialDelaySeconds: 5
          periodSeconds: 5