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
+4
View File
@@ -23,6 +23,10 @@ type Resources struct {
ClusterLabels map[string]string `name:"cluster_labels" default:"application:spilo"`
ClusterNameLabel string `name:"cluster_name_label" default:"cluster-name"`
PodRoleLabel string `name:"pod_role_label" default:"spilo-role"`
DefaultCpuRequest string `name:"default_cpu_request" default:"100m"`
DefaultMemoryRequest string `name:"default_memory_request" default:"100Mi"`
DefaultCpuLimit string `name:"default_cpu_limit" default:"3"`
DefaultMemoryLimit string `name:"default_memory_limit" default:"1Gi"`
}
type Auth struct {