-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdeploy.yml
More file actions
93 lines (93 loc) · 2.94 KB
/
deploy.yml
File metadata and controls
93 lines (93 loc) · 2.94 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
version: v1
kind: kubernetes
application: cdaas-sample-app
# Map of Deployment Targets, this is set up in a way where
# we can do multi-target deployments (multi-region or multi-cluster)
targets:
# This in the name of a deployment. Underneath it is its configuration.
test:
# the agentIdentifier of the Remote Network Agent for this target
account: sample-rna-test-cluster
# Optionally override the namespaces that are in the manifests
namespace: sample-test
# This is the key to a strategy under the strategies map
strategy: rolling
staging:
# the agentIdentifier of the Remote Network Agent for this target
account: sample-rna-staging-cluster
# Optionally override the namespaces that are in the manifests
namespace: sample-staging
# This is the key to a strategy under the strategies map
strategy: rolling
constraints:
dependsOn: ["test"]
beforeDeployment: []
prod-eu:
# the agentIdentifier of the Remote Network Agent for this target
account: sample-rna-prod-eu-cluster
# Optionally override the namespaces that are in the manifests
namespace: sample-prod-eu
# This is the key to a strategy under the strategies map
strategy: mybluegreen
constraints:
dependsOn: ["staging"]
beforeDeployment:
- pause:
untilApproved: true
prod-us:
# the agentIdentifier of the Remote Network Agent for this target
account: sample-rna-prod-us-cluster
# Optionally override the namespaces that are in the manifests
namespace: sample-prod-us
# This is the key to a strategy under the strategies map
strategy: mycanary
constraints:
dependsOn: ["staging"]
beforeDeployment:
- pause:
untilApproved: true
# The list of manifests sources
manifests:
# This reads all YAML files in a dir
# and deploys manifests in that dir to all targets.
- path: manifests/sample-app.yml
# The map of strategies, a deployment target will reference one of these
strategies:
# this is the name for the strategy
mycanary:
# This map key is the deployment strategy type
canary:
steps:
# The map key is the step type
- setWeight:
weight: 25
- pause:
duration: 10
unit: seconds
- setWeight:
weight: 50
- pause:
duration: 10
unit: seconds
- setWeight:
weight: 100
rolling:
canary:
steps:
- setWeight:
weight: 100
mybluegreen:
# This specifies the deployment strategy type
blueGreen:
activeService: cdaas-sample-app-svc
# List of what needs to happen before redirecting traffic
redirectTrafficAfter:
- pause:
duration: 10
unit: seconds
# List of what needs to happen before shutting down the old version
shutDownOldVersionAfter:
- pause:
duration: 20
unit: seconds