-
Notifications
You must be signed in to change notification settings - Fork 69
/
swabbie.yml
142 lines (132 loc) · 4.05 KB
/
swabbie.yml
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
server:
port: 8092
orca:
baseUrl: # orca url
front50:
baseUrl: # front50 url
clouddriver:
baseUrl: # clouddriver url
echo:
baseUrl: # echo url
retrofit:
logLevel: BASIC
okHttpClient:
propagateSpinnakerHeaders: true
connectTimeoutMs: 60000
readTimeoutMs: 60000
redis:
enabled: true
clients:
default:
primary:
driver: redis
config:
connection: redis://localhost:6379
locking:
enabled: true
maximumLockDurationMillis: 7200000
heartbeatRateMillis: 5000
leaseDurationMillis: 60000
swabbie:
dryRun: false
work:
intervalMs: 30000
queue:
monitorIntervalMs: 60000
schedule:
allowedDaysOfWeek:
- Monday
- Tuesday
- Wednesday
- Thursday
- FRIDAY
startTime: "09:00"
endTime: "17:00"
providers:
- name: aws
locations:
- us-east-1
accounts:
- test
maxItemsProcessedPerCycle: 2000
itemsProcessedBatchSize: 2000
resourcesPerNotification: 100
resourceTypes:
- name: serverGroup
enabled: true
retention: 10
maxAge: 30
enabledActions: # defaults to all actions
- MARK # schedules resources for deletion
- NOTIFY # notifies resource owners
#- DELETE # deletes resources. uncomment to enable actual deletion
enabledRules:
- operator: AND
description: Empty Server Groups that have been disabled for more than than 45 days.
rules:
- name: ZeroInstanceRule
- name: DisabledLoadBalancerRule
parameters:
moreThanDays: 45
- operator: OR
description: Expired Server Groups.
rules:
- name: ExpiredResourceRule
notification:
enabled: true
types:
- EMAIL
defaultDestination: # a default email address to email in case owner is not resolved
optOutBaseUrl: https://gate/cleanup/resources # where gate is running
resourceUrl: http://url/to/spinnaker/ui/#/applications/{{application}}/clusters/serverGroupDetails/{{cloudProvider}}/{{env}}/{{region}}/{{resourceId}} # link to where the resource is in spinnaker. This template only applies to server groups
docsUrl: # where you may have your docs site. This link is included in the email notification.
- name: launchConfiguration
enabled: true
retention: 10
maxAge: 30
enabledActions:
- MARK
enabledRules:
- operator: OR
description: Orphaned or expired Launch Configurations.
rules:
- name: ExpiredResourceRule
- name: AttributeRule
parameters:
isUsedByServerGroups: false
notification:
enabled: false
- name: image
enabled: true
retention: 2
maxAge: 30
exclusions:
- type: Literal
attributes:
- key: description
value:
- pattern:base-ami
- key: name
value:
- pattern:base
enabledRules:
- operator: AND
description: Images not referenced by instances, launch configs and with no siblings or copies in other accounts.
rules:
- name: OrphanedImageRule
notification:
enabled: false
- name: snapshot
enabled: true
retention: 2
maxAge: 30
enabledRules:
- operator: OR
description: Snapshots referencing images that no longer exist.
rules:
- name: AttributeRule
parameters:
imageExists: false
- name: ExpiredResourceRule # amazon resources that are tagged with: ttl=10d (d=days, w=weeks, m=months, y=year)
notification:
enabled: false