forked from yahoo/cerebro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.yaml
122 lines (103 loc) · 2.69 KB
/
example.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
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
# Sample configurity configuration file
# Set a key called "username" with a value of "my-username"
- setting: username
value: my-username
- setting: password
value: my-password
# duplicate keys are *ignored*
- setting: password
value: overriden
# override the value based on a context
# use the alternative value "prd-database"
# if the "environment" context dimension value is "production" or "stage"
- setting: database
# Assign a label to the setting for grouping settings together
labels: ['server']
# default value if no context is specified
value: test-database
except:
- value: prd-database
environment:
- production
- stage
# If the context contains
# "production" or "stage" for the "environment" context
# *and* "a" for the "bucket" context, then use the value of 50
- setting: bucket_test
value: 100
except:
- value: 50
# alternate way to write an array
environment: ['production', 'stage']
bucket: a
- setting: a_number
value: 1
- setting: an_array
value:
- apples
- oranges
- setting: an_object
value:
# notice there are no dashes here,
# each item is a key/value pair in an object
sampleKey: 1234
sampleKey2: 12345.6
# you can leave a key without a value
# this will be interpreted as a null
- setting: a_null
value:
- setting: noneFlag
value: false
except:
- value: true
# none is a special keyword - if the "environment" context *exists*,
# then the default will be used
environment: ['none']
- setting: allFlag
value: false
except:
- value: true
# all is a special keyword - if the "environment" context *exists*, then "true" will be used
environment: ['all']
- setting: is_your_birthday_inc
value: false
except:
- value: true
# inclusive range, if "userBirthdayYear" falls between 2000 and 2010, inclusive, then value is "true"
userBirthdayYear: ['2000..2010']
- setting: is_your_birthday_exc
value: false
except:
- value: true
# exclusive range, if "userBirthdayYear" falls between 2000 and 2010, exclusive, then value is "true"
userBirthdayYear: ['2000...2010']
# Having a setting value be dependent on another
# Basic case
- setting: independent
value: false
except:
- value: true
environment: ['alpha']
- setting: dependent
value: false
except:
- value: true
setting: independent
# AND dependent case
- setting: foo
value: true
- setting: bar
value: true
- setting: andOfFooAndBar
value: false
except:
- value: true
setting: ['foo', 'bar']
# OR dependent case
- setting: andOfFooOrBar
value: false
except:
- value: true
setting: foo
- value: true
setting: bar