From 3b99ce3d2e45ae3b5ecd499ed393345d9385b32f Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Mon, 10 Apr 2017 17:14:00 +0200 Subject: [PATCH] Improve the diff in cluster resources. - Use the branch of pretty with this feature fixed: https://github.com/kr/pretty/pull/42 - Add the Limit to the resources declaration to avoid dummy differences between statefulsets (where both Resource structures are empty, but in one case the fields are not mentioned, while in another they are assigned to empty values). --- glide.lock | 8 ++++---- glide.yaml | 2 +- pkg/cluster/k8sres.go | 1 + pkg/util/util.go | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/glide.lock b/glide.lock index 8413c8732..9ab303291 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: df231b69e7a8a90bd0d1982289f36ecdcc30e1d65babd78b6dc1c908e49cec54 -updated: 2017-04-06T12:51:40.340251897+02:00 +hash: 9cb22736d27cb74bb0f674c5e57954c8fd14e4b5cae0b2e22ead9f10728f91f8 +updated: 2017-04-10T15:33:31.332520218+02:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -77,8 +77,6 @@ imports: version: 77ed1c8a01217656d2080ad51981f6e99adaa177 - name: github.com/kelseyhightower/envconfig version: 8bf4bbfc795e2c7c8a5ea47b707453ed019e2ad4 -- name: github.com/kr/pretty - version: cfb55aafdaf3ec08f0db22699ab822c50091b1c4 - name: github.com/kr/text version: 7cafcd837844e784b526369c9bce262804aebc60 - name: github.com/lib/pq @@ -91,6 +89,8 @@ imports: - buffer - jlexer - jwriter +- name: github.com/motomux/pretty + version: b2aad2c9a95d14eb978f29baa6e3a5c3c20eef30 - name: github.com/pborman/uuid version: ca53cad383cad2479bbba7f7a1a05797ec1386e4 - name: github.com/PuerkitoBio/purell diff --git a/glide.yaml b/glide.yaml index 3819446ea..aafa5a315 100644 --- a/glide.yaml +++ b/glide.yaml @@ -28,4 +28,4 @@ import: - tools/cache - tools/clientcmd - package: github.com/kelseyhightower/envconfig -- package: github.com/kr/pretty +- package: github.com/motomux/pretty diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index cc11c3298..d946a888b 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -115,6 +115,7 @@ bootstrap: ImagePullPolicy: v1.PullAlways, Resources: v1.ResourceRequirements{ Requests: *resourceList, + Limits: v1.ResourceList{}, }, Ports: []v1.ContainerPort{ { diff --git a/pkg/util/util.go b/pkg/util/util.go index 9b8c5d74f..f41618015 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -7,7 +7,7 @@ import ( "math/rand" "time" - "github.com/kr/pretty" + "github.com/motomux/pretty" "github.bus.zalan.do/acid/postgres-operator/pkg/spec" "k8s.io/client-go/pkg/api/v1"