apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: rollouts-demo
spec:
replicas: 5
strategy:
canary:
steps:
#{if Octopus.Environment.Name == "Development"}
# Development environment deploys 100% of the traffic to the new version immediately
- setWeight: 100
#{/if}
#{unless Octopus.Environment.Name == "Development"}
# In non-development environments, we will deploy 10% of the traffic to the new version,
# then pause for manual approval, then deploy 50% of the traffic to the new version,
# then pause for manual approval, and finally deploy 100% of the traffic to the new version.
- setWeight: 10
- pause: {}
- setWeight: 50
- pause: {}
#{/unless}
revisionHistoryLimit: 2
selector:
matchLabels:
app: rollouts-demo
template:
metadata:
labels:
app: rollouts-demo
spec:
containers:
- name: rollouts-demo
image: "#{Project.Image}"
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
requests:
memory: 32Mi
cpu: 5m