File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel
31
31
- [ #301 ] ( https://github.com/thanos-io/kube-thanos/pull/301 ) Receive: allow configuration of ` minReadySeconds ` for StatefulSet
32
32
- [ #305 ] ( https://github.com/thanos-io/kube-thanos/pull/305 ) Receive: allow configuration of limits-config-file
33
33
- [ #308 ] ( https://github.com/thanos-io/kube-thanos/pull/308 ) Recive: add store limits flags
34
+ - [ #310 ] ( https://github.com/thanos-io/kube-thanos/pull/310 ) Ruler: Add host anti-affinity to ruler
34
35
35
36
### Fixed
36
37
Original file line number Diff line number Diff line change 24
24
app.kubernetes.io/name : thanos-rule
25
25
app.kubernetes.io/version : v0.30.2
26
26
spec :
27
+ affinity :
28
+ podAntiAffinity :
29
+ preferredDuringSchedulingIgnoredDuringExecution :
30
+ - podAffinityTerm :
31
+ labelSelector :
32
+ matchExpressions :
33
+ - key : app.kubernetes.io/name
34
+ operator : In
35
+ values :
36
+ - thanos-rule
37
+ - key : app.kubernetes.io/instance
38
+ operator : In
39
+ values :
40
+ - thanos-rule
41
+ namespaces :
42
+ - thanos
43
+ topologyKey : kubernetes.io/hostname
44
+ weight : 100
27
45
containers :
28
46
- args :
29
47
- rule
Original file line number Diff line number Diff line change @@ -328,6 +328,27 @@ function(params) {
328
328
nodeSelector: {
329
329
'kubernetes.io/os' : 'linux' ,
330
330
},
331
+ affinity: { podAntiAffinity: {
332
+ local labelSelector = { matchExpressions: [{
333
+ key: 'app.kubernetes.io/name' ,
334
+ operator: 'In' ,
335
+ values: [tr.statefulSet.metadata.labels['app.kubernetes.io/name' ]],
336
+ }, {
337
+ key: 'app.kubernetes.io/instance' ,
338
+ operator: 'In' ,
339
+ values: [tr.statefulSet.metadata.labels['app.kubernetes.io/instance' ]],
340
+ }] },
341
+ preferredDuringSchedulingIgnoredDuringExecution: [
342
+ {
343
+ podAffinityTerm: {
344
+ namespaces: [tr.config.namespace],
345
+ topologyKey: 'kubernetes.io/hostname' ,
346
+ labelSelector: labelSelector,
347
+ },
348
+ weight: 100 ,
349
+ },
350
+ ],
351
+ } },
331
352
},
332
353
},
333
354
volumeClaimTemplates: if std.length (tr.config.volumeClaimTemplate) > 0 then [tr.config.volumeClaimTemplate {
You can’t perform that action at this time.
0 commit comments