Skip to content

Commit

Permalink
upgrade to latest dependencies (#1065)
Browse files Browse the repository at this point in the history
bumping knative.dev/networking 68947c5...b9dd5c2:%0A  > b9dd5c2 upgrade to latest dependencies (# 816)%0Abumping knative.dev/pkg 74c4be5...eb63a40:%0A  > eb63a40 Support to set qps and burst via env variable (# 2755)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Jun 16, 2023
1 parent 9cf5633 commit 2090f5b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ require (
k8s.io/client-go v0.26.5
k8s.io/code-generator v0.26.5
knative.dev/hack v0.0.0-20230615155948-d7586a218601
knative.dev/networking v0.0.0-20230615190548-68947c5b22d8
knative.dev/pkg v0.0.0-20230612155445-74c4be5e935e
knative.dev/networking v0.0.0-20230616133350-b9dd5c201e19
knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,10 @@ k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJ
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20230615155948-d7586a218601 h1:yMe29SMHrAIt3+J+APvf4WVP6cW7ZDtUhh5uxD5ERdA=
knative.dev/hack v0.0.0-20230615155948-d7586a218601/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20230615190548-68947c5b22d8 h1:AOg8rlpIOlyF4VvLRXmE3YjmrroMZBppS0D5e12mEOE=
knative.dev/networking v0.0.0-20230615190548-68947c5b22d8/go.mod h1:uirMsX46DHHZixatHkFf8UFnvK3peyg97kl4/bVXcTk=
knative.dev/pkg v0.0.0-20230612155445-74c4be5e935e h1:koM+NopG2Yw738NlJhQF3ZwpyS+HHznuLm294VYlUKg=
knative.dev/pkg v0.0.0-20230612155445-74c4be5e935e/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk=
knative.dev/networking v0.0.0-20230616133350-b9dd5c201e19 h1:yZXjdJbr+HgwjmGRkZ2QQRYB9r7fhVklStuTEMm6l6w=
knative.dev/networking v0.0.0-20230616133350-b9dd5c201e19/go.mod h1:xYtCGVLsoxLEHxUEQxVa0Ut7R/M5x2E49bHzEj09M5w=
knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0 h1:weQWWxEEbNOPuL4qtGiBZuMSFhcjF/Cu163uktd/xFE=
knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
16 changes: 14 additions & 2 deletions vendor/knative.dev/pkg/environment/client_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ package environment
import (
"flag"
"fmt"
"log"
"math"
"os"
"strconv"

"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
Expand All @@ -45,9 +47,19 @@ func (c *ClientConfig) InitFlags(fs *flag.FlagSet) {
fs.StringVar(&c.Kubeconfig, "kubeconfig", os.Getenv("KUBECONFIG"),
"Path to a kubeconfig. Only required if out-of-cluster.")

fs.IntVar(&c.Burst, "kube-api-burst", 0, "Maximum burst for throttle.")
fs.IntVar(&c.Burst, "kube-api-burst", int(envVarOrDefault("KUBE_API_BURST", 0)), "Maximum burst for throttle.")

fs.Float64Var(&c.QPS, "kube-api-qps", 0, "Maximum QPS to the server from the client.")
fs.Float64Var(&c.QPS, "kube-api-qps", envVarOrDefault("KUBE_API_QPS", 0.0), "Maximum QPS to the server from the client.")
}

func envVarOrDefault(key string, val float64) float64 {
var err error
if v := os.Getenv(key); v != "" {
if val, err = strconv.ParseFloat(v, 64); err != nil {
log.Fatal(err)
}
}
return val
}

func (c *ClientConfig) GetRESTConfig() (*rest.Config, error) {
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ k8s.io/utils/trace
# knative.dev/hack v0.0.0-20230615155948-d7586a218601
## explicit; go 1.18
knative.dev/hack
# knative.dev/networking v0.0.0-20230615190548-68947c5b22d8
# knative.dev/networking v0.0.0-20230616133350-b9dd5c201e19
## explicit; go 1.18
knative.dev/networking/config
knative.dev/networking/pkg
Expand Down Expand Up @@ -1000,7 +1000,7 @@ knative.dev/networking/test/test_images/runtime/handlers
knative.dev/networking/test/test_images/timeout
knative.dev/networking/test/test_images/wsserver
knative.dev/networking/test/types
# knative.dev/pkg v0.0.0-20230612155445-74c4be5e935e
# knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0
## explicit; go 1.18
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down

0 comments on commit 2090f5b

Please sign in to comment.