-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathndepcan.yaml
72 lines (72 loc) · 2.09 KB
/
ndepcan.yaml
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
version: v1
kind: kubernetes
application: res-app
# Map of Deployment Targets
targets:
# This in the name of a deployment. Underneath it is its configuration.
staging:
# the agentIdentifier of the Remote Network Agent for this target
account: rn-cluster
# Optionally override the namespaces that are in the manifests
namespace: staging-ns
# This is the key to a strategy under the strategies map
strategy: rolling
production:
# the agentIdentifier of the Remote Network Agent for this target
account: rn-cluster
# Optionally override the namespaces that are in the manifests
namespace: prod-ns
# This is the key to a strategy under the strategies map
strategy: mybluegreen
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: k8s-spec/staging
targets: ["staging"]
- path: k8s-spec/prod
targets: ["production"]
# 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: restuarant-service
# 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