Skip to content

Commit

Permalink
rebase and resolve merge conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: tariqibrahim <tariq.ibrahim@microsoft.com>
  • Loading branch information
tariqibrahim committed Dec 4, 2018
2 parents 412ca33 + ac9d5f3 commit da69b5a
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ else
ifdef GO111MODULE
@echo ">> running check for unused/missing packages in go.mod"
GO111MODULE=$(GO111MODULE) $(GO) mod tidy
ifeq (,$(wildcard vendor))
@git diff --exit-code -- go.sum go.mod
ifneq (,$(wildcard vendor))
else
@echo ">> running check for unused packages in vendor/"
GO111MODULE=$(GO111MODULE) $(GO) mod vendor
@git diff --exit-code -- go.sum go.mod vendor/
Expand Down
13 changes: 4 additions & 9 deletions cmd/prometheus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ import (

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/golang/glog"
"github.com/oklog/oklog/pkg/group"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/common/version"
prom_runtime "github.com/prometheus/prometheus/pkg/runtime"
"gopkg.in/alecthomas/kingpin.v2"
k8s_runtime "k8s.io/apimachinery/pkg/util/runtime"

"github.com/mwitkow/go-conntrack"
"github.com/prometheus/common/promlog"
Expand Down Expand Up @@ -236,14 +236,9 @@ func main() {

logger := promlog.New(&cfg.promlogConfig)

// XXX(fabxc): Kubernetes does background logging which we can only customize by modifying
// a global variable.
// Ultimately, here is the best place to set it.
k8s_runtime.ErrorHandlers = []func(error){
func(err error) {
level.Error(log.With(logger, "component", "k8s_client_runtime")).Log("err", err)
},
}
// Above level 6, the k8s client would log bearer tokens in clear-text.
glog.ClampLevel(6)
glog.SetLogger(log.With(logger, "component", "k8s_client_runtime"))

level.Info(logger).Log("msg", "Starting Prometheus", "version", version.Info())
level.Info(logger).Log("build_context", version.BuildContext())
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ require (
github.com/go-sql-driver/mysql v1.4.0 // indirect
github.com/go-stack/stack v1.5.4 // indirect
github.com/gogo/protobuf v0.0.0-20171123125729-971cbfd2e72b
github.com/golang/glog v0.0.0-20141105023935-44145f04b68c
github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4 // indirect
github.com/golang/protobuf v0.0.0-20180622174009-9eb2c01ac278 // indirect
github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec
Expand Down Expand Up @@ -150,3 +151,5 @@ require (
launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
)

replace github.com/golang/glog => github.com/kubermatic/glog-gokit v0.0.0-20181129151237-8ab7e4c2d352
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kubermatic/glog-gokit v0.0.0-20181129151237-8ab7e4c2d352 h1:IwAUUBomA7q2TedTHQ3ebjwXVp8aHwi453m7AFn0vCk=
github.com/kubermatic/glog-gokit v0.0.0-20181129151237-8ab7e4c2d352/go.mod h1:WUD00rCUd6ntFOOuzJbT/MRrM+6X0Zufa6wWYBcf4zY=
github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lightstep/lightstep-tracer-go v0.15.6 h1:D0GGa7afJ7GcQvu5as6ssLEEKYXvRgKI5d5cevtz8r4=
Expand Down
21 changes: 21 additions & 0 deletions vendor/github.com/golang/glog/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions vendor/github.com/golang/glog/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

143 changes: 143 additions & 0 deletions vendor/github.com/golang/glog/glog.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ github.com/gogo/protobuf/proto
github.com/gogo/protobuf/types
github.com/gogo/protobuf/sortkeys
github.com/gogo/protobuf/jsonpb
# github.com/golang/glog v0.0.0-20141105023935-44145f04b68c => github.com/kubermatic/glog-gokit v0.0.0-20181129151237-8ab7e4c2d352
github.com/golang/glog
# github.com/golang/protobuf v0.0.0-20180622174009-9eb2c01ac278
github.com/golang/protobuf/proto
github.com/golang/protobuf/jsonpb
Expand Down Expand Up @@ -321,7 +323,6 @@ k8s.io/api/storage/v1
k8s.io/api/storage/v1alpha1
k8s.io/api/storage/v1beta1
# k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93
k8s.io/apimachinery/pkg/util/runtime
k8s.io/apimachinery/pkg/apis/meta/v1
k8s.io/apimachinery/pkg/runtime
k8s.io/apimachinery/pkg/watch
Expand All @@ -333,6 +334,7 @@ k8s.io/apimachinery/pkg/conversion
k8s.io/apimachinery/pkg/fields
k8s.io/apimachinery/pkg/labels
k8s.io/apimachinery/pkg/selection
k8s.io/apimachinery/pkg/util/runtime
k8s.io/apimachinery/pkg/conversion/queryparams
k8s.io/apimachinery/pkg/util/errors
k8s.io/apimachinery/pkg/util/json
Expand Down

0 comments on commit da69b5a

Please sign in to comment.