Avoid "bulk-comparing" pod resources during sync. (#109)

* Avoid "bulk-comparing" pod resources during sync.

First attempt to fix bogus restarts due to the reported mismatch
of container resources where one of the resources is an empty struct,
while the other has all fields set to nil.

In addition, add an ability to set limits and requests per pod, as well as the operator-level defaults.
This commit is contained in:
Oleksii Kliukin
2017-05-12 11:41:35 +02:00
committed by Murat Kabilov
parent 9b0d0d487c
commit 1c4bce86df
5 changed files with 80 additions and 19 deletions
+6 -2
View File
@@ -23,8 +23,12 @@ spec:
max_connections: "10"
log_statement: "all"
resources:
cpu: 10m
memory: 100Mi
requests:
cpu: 10m
memory: 100Mi
limits:
cpu: 300m
memory: 3000Mi
patroni:
initdb:
encoding: "UTF8"