Skip to content

Commit

Permalink
Merge pull request #58 from stevekuznetsov/skuznets/port
Browse files Browse the repository at this point in the history
boskos: allow configuring the port
  • Loading branch information
k8s-ci-robot authored Dec 11, 2020
2 parents 9df253f + 0272c65 commit c1f51a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/boskos/boskos.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
"k8s.io/test-infra/prow/logrusutil"
prowmetrics "k8s.io/test-infra/prow/metrics"
"k8s.io/test-infra/prow/pjutil"

"sigs.k8s.io/boskos/common"
"sigs.k8s.io/boskos/crds"
"sigs.k8s.io/boskos/handlers"
Expand All @@ -63,6 +64,7 @@ var (
requestTTL = flag.Duration("request-ttl", defaultRequestTTL, "request TTL before losing priority in the queue")
logLevel = flag.String("log-level", "info", fmt.Sprintf("Log level is one of %v.", logrus.AllLevels))
namespace = flag.String("namespace", corev1.NamespaceDefault, "namespace to install on")
port = flag.Int("port", 8080, "Port to serve on")

httpRequestDuration = prowmetrics.HttpRequestDuration("boskos", 0.005, 1200)
httpResponseSize = prowmetrics.HttpResponseSize("boskos", 128, 65536)
Expand Down Expand Up @@ -121,7 +123,7 @@ func main() {

boskos := &http.Server{
Handler: traceHandler(handlers.NewBoskosHandler(r)),
Addr: ":8080",
Addr: fmt.Sprintf(":%d", *port),
}

// Viper defaults the configfile name to `config` and `SetConfigFile` only
Expand Down

0 comments on commit c1f51a3

Please sign in to comment.