diff --git a/artifacts/workloads/deployment-canary.yaml b/artifacts/workloads/deployment-canary.yaml index 676a326d..c9827df0 100644 --- a/artifacts/workloads/deployment-canary.yaml +++ b/artifacts/workloads/deployment-canary.yaml @@ -6,11 +6,10 @@ metadata: labels: app: podinfo-canary spec: - replicas: 3 + replicas: 1 strategy: rollingUpdate: - maxSurge: 25% - maxUnavailable: 1 + maxUnavailable: 0 type: RollingUpdate selector: matchLabels: @@ -49,7 +48,7 @@ spec: failureThreshold: 3 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 1 + timeoutSeconds: 2 readinessProbe: exec: command: @@ -60,10 +59,13 @@ spec: failureThreshold: 3 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 1 + timeoutSeconds: 2 resources: + limits: + cpu: 1000m + memory: 256Mi requests: - cpu: 1m + cpu: 10m memory: 16Mi volumeMounts: - mountPath: /data diff --git a/artifacts/workloads/hpa-canary.yaml b/artifacts/workloads/hpa-canary.yaml new file mode 100644 index 00000000..aeb57387 --- /dev/null +++ b/artifacts/workloads/hpa-canary.yaml @@ -0,0 +1,21 @@ +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: podinfo-canary + namespace: test +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: podinfo-canary + minReplicas: 2 + maxReplicas: 3 + metrics: + - type: Resource + resource: + name: cpu + targetAverageUtilization: 99 + - type: Resource + resource: + name: memory + targetAverageValue: 200Mi