Skip to content

Commit

Permalink
Fix "invalid port in upstream" on nginx controller
Browse files Browse the repository at this point in the history
  • Loading branch information
gianrubio committed Dec 14, 2016
1 parent 0af8ccc commit bda6646
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/nginx/pkg/cmd/controller/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (em exeMatcher) MatchAndName(nacl common.NameAndCmdline) (bool, string) {
func (n *NGINXController) setupMonitor(args []string) {
pc, err := newProcessCollector(true, exeMatcher{"nginx", args})
if err != nil {
glog.Fatalf("unexpedted error registering nginx collector: %v", err)
glog.Fatalf("unexpected error registering nginx collector: %v", err)
}
err = prometheus.Register(pc)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion core/pkg/ingress/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ func (ic *GenericController) getEndpoints(
}

// check for invalid port value
if targetPort == -1 {
if targetPort <=0 {
continue
}

Expand Down

0 comments on commit bda6646

Please sign in to comment.