upgrade to latest dependencies (#1219)

bumping knative.dev/networking 8550923...94bfc01:
  > 94bfc01 upgrade to latest dependencies (# 356)
  > 088986a upgrade to latest dependencies (# 355)
  > 9757667 Add header for signifying that requests should not be loadbalanced again (# 354)
  > 0b3dac0 Update common github actions (# 353)
bumping knative.dev/pkg a02dcff...584933f:
  > 584933f Format markdown (# 2022)
  > 84c98f3 remove reflector metrics (# 2020)
  > adbe77d Updates to the release process with 0.20 (# 1982)
  > 448ae65 Metric unit fixes (# 2018)
  > e38bb89 Update common github actions (# 2017)
bumping knative.dev/eventing 7ce8283...ef5f61d:
  > ef5f61d Update common github actions (# 4888)
  > 84b99db jsonDataLimit# 4055 (# 4233)
  > bb87cb1 Use ConfigAccessor's ToEnvVars method (# 4880)
  > 3c090d3 Remove suffix, since it's already in the PDB kind... 💄 (# 4885)
  > 56dbe58 s/Veroute/Version (# 4882)
  > 82130ea upgrade to latest dependencies (# 4883)
  > 24b1685 Setting tracing config for PingSource (# 4877)
  > 71031c0 💄 Updates for kind (newer version and newer images) (# 4879)
  > d8468ca upgrade to latest dependencies (# 4878)
  > 1c771ce Change broker spec to indicate brokerclass should be immutable (# 4827)
  > d7cf344 tracing fixed for apiserversource (# 4842)
  > 1efec2b expose ChannelReference in UnknownChannelError (# 4875)
  > 47d7a02 Update deps (# 4874)
  > 47ee8fa Update common github actions (# 4869)
  > c4e9c3b ut for trigger/broker updates check immutable (# 4843)
bumping knative.dev/serving ebc6584...7aa62c5:
  > 7aa62c5 Reflow the code to follow a better builder pattern. (# 10796)
  > 317d055 Remove the last check for percentage to be nil (which it can't anymore). (# 10797)
  > c6a28b7 Update common github actions (# 10794)
  > 96f41b5 Update net-kourier nightly (# 10790)
  > 47a730e Update net-contour nightly (# 10789)
  > 30ba285 Update net-certmanager nightly (# 10788)
  > 2cbea46 upgrade to latest dependencies (# 10787)
  > 5b94d2c Monday off cleanup: minor brush up of the traffic.go (# 10786)
  > f5d7845 We removed the possibility of traffic target % being nil (# 10785)
  > 0ff5fc4 Drop outdated HPA code regarding concurrency and RPS (# 10782)
  > 4bfc7e5 Unexport some methods (# 10784)
  > 9778deb Fix race in health state (# 10781)
  > ccbfdad A few touchups around the autoscaling tests (# 10780)
  > 20ddcbe Update net-contour nightly (# 10777)
  > 60fd6be Fix up health state tests (# 10779)
  > 395bda9 Update net-kourier nightly (# 10778)
  > af4c914 Refactor scrape client to actually take an HTTP request (# 10766)
  > 9892df5 upgrade to latest dependencies (# 10775)
  > fc68cd8 disable tls (# 10774)
  > ba73ae7 Resume HTTP01 challenge E2E tests (# 10759)
  > 6fcd198 Update net-contour nightly (# 10761)
  > fabcc2a Remove v2 gc folder. There can be only one. (# 10768)
  > eabab7d Update net-certmanager nightly (# 10760)
  > 0f52ebf Update net-kourier nightly (# 10762)
  > 3816201 upgrade to latest dependencies (# 10758)
  > fd9d9f5 Clean up the code in the service test (# 10756)
  > 81e0d61 Update the docs for the traffic package. (# 10757)
  > 13e15fd Hide the things that are private now in effect (# 10755)
  > 56ef7a9 Relax the grace period minival vaue to be any positive value (# 10754)
  > 4211c26 Update net-contour nightly (# 10752)
  > f2373c3 Update net-istio nightly (# 10753)
  > 4cc5d79 Update net-kourier nightly (# 10737)
  > 3e1dd65 Update common github actions (# 10746)
  > 597896d Deep cleaning of the time manipulation in config and revision and other fixes to the codebase (# 10745)
  > c20629d Remove the redundant test setup now there's just one GC (# 10744)
  > 17fb0e0 Change interface to accept time rather than clock (# 10743)
  > be2c890 Restrict the Clock interface to the passive where possible. (# 10742)
  > 19c8d8e Update net-contour nightly (# 10736)
  > 914855f Refactor: remove labeler v2 package (# 10739)
  > 7d57b94 Guarantee that incoming and outgoing request are measured by the same stat (# 10734)
  > 8dfeb7a Update net-istio nightly (# 10716)
  > ed413bf Update net-certmanager nightly (# 10735)
  > 3cb2bea Drop jwt dependency and match token via regex (# 10727)
  > bfba5b0 Only log about service scraping on first transition. (# 10733)

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
knative-automation 2021-02-16 23:43:02 -08:00 committed by GitHub
parent a805396105
commit 2930137a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 303 additions and 327 deletions

8
go.mod
View File

@ -21,11 +21,11 @@ require (
k8s.io/cli-runtime v0.19.7
k8s.io/client-go v0.19.7
k8s.io/code-generator v0.19.7
knative.dev/eventing v0.20.1-0.20210209233432-7ce82834b39d
knative.dev/eventing v0.20.1-0.20210216203459-ef5f61dadd7d
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf
knative.dev/networking v0.0.0-20210209171856-855092348016
knative.dev/pkg v0.0.0-20210208175252-a02dcff9ee26
knative.dev/serving v0.20.1-0.20210210103320-ebc658424a0d
knative.dev/networking v0.0.0-20210216014426-94bfc013982b
knative.dev/pkg v0.0.0-20210216013737-584933f8280b
knative.dev/serving v0.20.1-0.20210217010702-7aa62c5bebdf
sigs.k8s.io/yaml v1.2.0
)

50
go.sum
View File

@ -39,8 +39,6 @@ contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY=
contrib.go.opencensus.io/exporter/prometheus v0.2.1-0.20200609204449-6bcf6f8577f0 h1:2O3c1g5CzMc1+Uah4Waot9Obm0yw70VXJzWaP6Fz3nw=
contrib.go.opencensus.io/exporter/prometheus v0.2.1-0.20200609204449-6bcf6f8577f0/go.mod h1:MjHoxkI7Ny27toPeFkRbXbzVjzIGkwOAptrAy8Mxtm8=
contrib.go.opencensus.io/exporter/stackdriver v0.13.4 h1:ksUxwH3OD5sxkjzEqGxNTl+Xjsmu3BnC/300MhSVTSc=
contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc=
contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo=
contrib.go.opencensus.io/exporter/stackdriver v0.13.5/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc=
contrib.go.opencensus.io/exporter/zipkin v0.1.2/go.mod h1:mP5xM3rrgOjpn79MM8fZbj3gsxcuytSqtH0dxSWW1RE=
@ -151,7 +149,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cloudevents/sdk-go/v2 v2.2.0 h1:FlBJg7W0QywbOjuZGmRXUyFk8qkCHx2euETp+tuopSU=
github.com/cloudevents/sdk-go/v2 v2.2.0/go.mod h1:3CTrpB4+u7Iaj6fd7E2Xvm5IxMdRoaAhqaRVnOr2rCU=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
@ -208,7 +205,6 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M=
@ -289,8 +285,6 @@ github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85n
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w=
github.com/gobuffalo/flect v0.2.2/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc=
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
@ -466,7 +460,6 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
@ -516,7 +509,6 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/mailru/easyjson v0.7.1-0.20191009090205-6c0755d89d1e h1:jcoUdG1TzY/M/eM5BLFLP8DJeMximx5NQYSlLL9YeWc=
github.com/mailru/easyjson v0.7.1-0.20191009090205-6c0755d89d1e/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
@ -632,8 +624,6 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn
github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U=
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw=
github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM=
github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU=
github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
@ -649,8 +639,6 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4=
github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM=
github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
@ -677,8 +665,6 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rs/dnscache v0.0.0-20210201191234-295bba877686/go.mod h1:qe5TWALJ8/a1Lqznoc5BDHpYX/8HU60Hm2AwRmqzxqA=
github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
@ -799,7 +785,6 @@ go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/automaxprocs v1.3.0/go.mod h1:9CWT6lKIep8U41DDaPiH6eFscnTyjfTANNQNx6LrIcA=
go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
@ -998,8 +983,6 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f h1:Fqb3ao1hUmOR3GkUOg/Y+BadLwykBIzs5q8Ez2SbHyc=
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 h1:9UQO31fZ+0aKQOFldThf7BKPMJTiBfWycGh/u3UoO88=
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3 h1:kzM6+9dur93BcC2kVlYl34cHU+TYZLanmpSJHVMmL64=
@ -1101,8 +1084,6 @@ golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3 h1:DywqrEscRX7O2phNjkT0L6l
golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58 h1:1Bs6RVeBFtLZ8Yi1Hk07DiOqzvwLD/4hln4iahvFlag=
golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
@ -1191,8 +1172,6 @@ google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201211151036-40ec1c210f7a h1:GnJAhasbD8HiT8DZMvsEx3QLVy/X0icq/MGr0MqRJ2M=
google.golang.org/genproto v0.0.0-20201211151036-40ec1c210f7a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d h1:HV9Z9qMhQEsdlvxNFELgQ11RkMzO3CMkjEySjCtuLes=
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
@ -1215,8 +1194,6 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM
google.golang.org/grpc v1.31.1 h1:SfXqXS5hkufcdZ/mHtYCh53P2b+92WQq/DZcKLgsFRs=
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
@ -1269,7 +1246,6 @@ gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20190709130402-674ba3eaed22/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@ -1329,21 +1305,21 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20210209013428-8ae1528470a4/go.mod h1:0zEodUouNI5N7s8kCxVDUeWbIAE5Jcuk0Xq+aKEKS/Y=
knative.dev/eventing v0.20.1-0.20210209233432-7ce82834b39d h1:YyQcZa23YaEbbXlNge3A0oLZgngnCjx1L4PI9BB9QIs=
knative.dev/eventing v0.20.1-0.20210209233432-7ce82834b39d/go.mod h1:cNevML3a/1zuY3VP/mpnw0hQnZj344wCissYRi8B1Oo=
knative.dev/hack v0.0.0-20210120165453-8d623a0af457 h1:jEBITgx/lQydGncM0uetpv/ZqawRzb2aSfEaYoMeDjM=
knative.dev/hack v0.0.0-20210120165453-8d623a0af457/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/caching v0.0.0-20210215030244-1212288570f0/go.mod h1:rAPalJe9Lx3jHffJpackk5WjZYl3j2QvXUgw0GPllxQ=
knative.dev/eventing v0.20.1-0.20210216203459-ef5f61dadd7d h1:Dyv3HEqSMTGZj9bZJrQBo4Eruc3dABjVM9+zAaS6V50=
knative.dev/eventing v0.20.1-0.20210216203459-ef5f61dadd7d/go.mod h1:3XibpVIriBFW31rn4uFQlTzqZgyKHgD4CTJHBwEPrUQ=
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf h1:u4cY4jr2LYvhoz/1HBWEPsMiLkm0HMdDTfmmw1RE8zE=
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/networking v0.0.0-20210209171856-855092348016 h1:9KCW6oylEd6DNCnfdb1RiBukpQpjMlPq4u+SdCpkW0E=
knative.dev/networking v0.0.0-20210209171856-855092348016/go.mod h1:NQPUbkM8iJDoeOnSq/LnLfgIq8nID5uPEjstTPWujKE=
knative.dev/pkg v0.0.0-20210130001831-ca02ef752ac6/go.mod h1:X4NPrCo8NK3hbDVan9Vm7mf5io3ZoINakAdrpSXVB08=
knative.dev/pkg v0.0.0-20210208175252-a02dcff9ee26 h1:PkJB1M77wYBI1UF5vp8y4fRnYQDu1IkRWswp6CgRRSo=
knative.dev/pkg v0.0.0-20210208175252-a02dcff9ee26/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/reconciler-test v0.0.0-20210203100806-0603b747dcc9/go.mod h1:iNDjVEzkqU1BKYqoaE33uiq7IZEtlTc9gUOFdWkQtkc=
knative.dev/serving v0.20.1-0.20210210103320-ebc658424a0d h1:NKALekbVcNvylDunioaK0hKdwqsTpe7Bj/4p+touLdo=
knative.dev/serving v0.20.1-0.20210210103320-ebc658424a0d/go.mod h1:IcKWhx19zeeB4Up3tPxhT+8Ij65TNETg9LxaGz93ma8=
knative.dev/networking v0.0.0-20210215030235-088986a1c2a3/go.mod h1:pmAMQjMqQUxpK0UyjE71KljMs6rwDMVIAlvrZsU3I6Y=
knative.dev/networking v0.0.0-20210216014426-94bfc013982b h1:708bHZC2RPjdx8MLH7OASqGP+fhmarJJxVIZoIy+msY=
knative.dev/networking v0.0.0-20210216014426-94bfc013982b/go.mod h1:Crdn87hxdFd3Jj6PIyrjzGnr8OGHX35k5xo9jlOrjjA=
knative.dev/pkg v0.0.0-20210212203835-448ae657fb5f/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/pkg v0.0.0-20210215165523-84c98f3c3e7a/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/pkg v0.0.0-20210216013737-584933f8280b h1:2v+GBBenjPXhtk3KX/YqxCQVBU6o/AaRkkqE58lgFRQ=
knative.dev/pkg v0.0.0-20210216013737-584933f8280b/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/reconciler-test v0.0.0-20210215155505-fe22009753f9/go.mod h1:vB3GnWUdlkvtmoVUP9anmh82S1QC/LJKtOrAMA1COtw=
knative.dev/serving v0.20.1-0.20210217010702-7aa62c5bebdf h1:aLjH83TzI5GJOSFEz1pGZD0oa3Q2feE82sFdq/4tp5s=
knative.dev/serving v0.20.1-0.20210217010702-7aa62c5bebdf/go.mod h1:PU9k1Y6YMG27XQldEu5agNkcebvSafUXKXPircQYCsE=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=

View File

@ -38,6 +38,10 @@ func (t *Trigger) Validate(ctx context.Context) *apis.FieldError {
errs := t.Spec.Validate(ctx).ViaField("spec")
errs = t.validateAnnotation(errs, DependencyAnnotation, t.validateDependencyAnnotation)
errs = t.validateAnnotation(errs, InjectionAnnotation, t.validateInjectionAnnotation)
if apis.IsInUpdate(ctx) {
original := apis.GetBaseline(ctx).(*Trigger)
errs = errs.Also(t.CheckImmutableFields(ctx, original))
}
return errs
}

View File

@ -0,0 +1,87 @@
/*
Copyright 2020 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package config
import (
"encoding/json"
"fmt"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/yaml"
)
const (
// PingDefaultsConfigName is the name of config map for the default
// configs that pings should use.
PingDefaultsConfigName = "config-ping-webhook"
// PingDefaulterKey is the key in the ConfigMap to get the name of the default
// Ping CRD.
PingDefaulterKey = "ping-config"
PingDataMaxSize = -1
)
// NewPingDefaultsConfigFromMap creates a Defaults from the supplied Map
func NewPingDefaultsConfigFromMap(data map[string]string) (*PingDefaults, error) {
nc := &PingDefaults{DataMaxSize: PingDataMaxSize}
// Parse out the Broker Configuration Cluster default section
value, present := data[PingDefaulterKey]
if !present || value == "" {
return nil, fmt.Errorf("ConfigMap is missing (or empty) key: %q : %v", PingDefaulterKey, data)
}
if err := parseEntry(value, nc); err != nil {
return nil, fmt.Errorf("Failed to parse the entry: %s", err)
}
return nc, nil
}
func parseEntry(entry string, out interface{}) error {
j, err := yaml.YAMLToJSON([]byte(entry))
if err != nil {
return fmt.Errorf("ConfigMap's value could not be converted to JSON: %s : %v", err, entry)
}
return json.Unmarshal(j, &out)
}
// NewPingDefaultsConfigFromConfigMap creates a PingDefaults from the supplied configMap
func NewPingDefaultsConfigFromConfigMap(config *corev1.ConfigMap) (*PingDefaults, error) {
return NewPingDefaultsConfigFromMap(config.Data)
}
// PingDefaults includes the default values to be populated by the webhook.
type PingDefaults struct {
DataMaxSize int `json:"dataMaxSize"`
}
func (d *PingDefaults) GetPingConfig() *PingDefaults {
if d.DataMaxSize < 0 {
d.DataMaxSize = PingDataMaxSize
}
return d
}
func (d *PingDefaults) DeepCopy() *PingDefaults {
if d == nil {
return nil
}
out := new(PingDefaults)
*out = *d
return out
}

View File

@ -0,0 +1,97 @@
/*
Copyright 2020 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package config
import (
"context"
"knative.dev/pkg/configmap"
)
type pingCfgKey struct{}
// Config holds the collection of configurations that we attach to contexts.
// +k8s:deepcopy-gen=false
type Config struct {
PingDefaults *PingDefaults
}
// FromContext extracts a Config from the provided context.
func FromContext(ctx context.Context) *Config {
x, ok := ctx.Value(pingCfgKey{}).(*Config)
if ok {
return x
}
return nil
}
// FromContextOrDefaults is like FromContext, but when no Config is attached it
// returns a Config populated with the defaults for each of the Config fields.
func FromContextOrDefaults(ctx context.Context) *Config {
if cfg := FromContext(ctx); cfg != nil {
return cfg
}
pingDefaults, err := NewPingDefaultsConfigFromMap(map[string]string{})
if err != nil || pingDefaults == nil {
pingDefaults = &PingDefaults{DataMaxSize: PingDataMaxSize}
pingDefaults.GetPingConfig()
}
return &Config{
PingDefaults: pingDefaults,
}
}
// ToContext attaches the provided Config to the provided context, returning the
// new context with the Config attached.
func ToContext(ctx context.Context, c *Config) context.Context {
return context.WithValue(ctx, pingCfgKey{}, c)
}
// Store is a typed wrapper around configmap.Untyped store to handle our configmaps.
// +k8s:deepcopy-gen=false
type Store struct {
*configmap.UntypedStore
}
// NewStore creates a new store of Configs and optionally calls functions when ConfigMaps are updated.
func NewStore(logger configmap.Logger, onAfterStore ...func(name string, value interface{})) *Store {
store := &Store{
UntypedStore: configmap.NewUntypedStore(
"pingdefaults",
logger,
configmap.Constructors{
PingDefaultsConfigName: NewPingDefaultsConfigFromConfigMap,
},
onAfterStore...,
),
}
return store
}
// ToContext attaches the current Config state to the provided context.
func (s *Store) ToContext(ctx context.Context) context.Context {
return ToContext(ctx, s.Load())
}
// Load creates a Config from the current config state of the Store.
func (s *Store) Load() *Config {
return &Config{
PingDefaults: s.UntypedLoad(PingDefaultsConfigName).(*PingDefaults).DeepCopy(),
}
}

View File

@ -18,11 +18,13 @@ package v1alpha2
import (
"context"
"fmt"
"github.com/robfig/cron/v3"
"knative.dev/pkg/apis"
"knative.dev/eventing/pkg/apis/eventing"
"knative.dev/eventing/pkg/apis/sources/config"
)
func (c *PingSource) Validate(ctx context.Context) *apis.FieldError {
@ -38,6 +40,14 @@ func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError {
errs = errs.Also(fe)
}
pingConfig := config.FromContextOrDefaults(ctx)
pingDefaults := pingConfig.PingDefaults.GetPingConfig()
if bsize := len(cs.JsonData); pingDefaults.DataMaxSize > -1 && bsize > pingDefaults.DataMaxSize {
fe := apis.ErrInvalidValue(fmt.Sprintf("the jsonData length of %d bytes exceeds limit set at %d.", bsize, pingDefaults.DataMaxSize), "jsonData")
errs = errs.Also(fe)
}
if fe := cs.Sink.Validate(ctx); fe != nil {
errs = errs.Also(fe.ViaField("sink"))
}

View File

@ -18,10 +18,13 @@ package v1beta1
import (
"context"
"fmt"
"strings"
"github.com/robfig/cron/v3"
"knative.dev/pkg/apis"
"knative.dev/eventing/pkg/apis/sources/config"
)
func (c *PingSource) Validate(ctx context.Context) *apis.FieldError {
@ -46,6 +49,15 @@ func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError {
}
}
pingConfig := config.FromContextOrDefaults(ctx)
pingDefaults := pingConfig.PingDefaults.GetPingConfig()
if bsize := len(cs.JsonData); pingDefaults.DataMaxSize > -1 && bsize > pingDefaults.DataMaxSize {
fe := apis.ErrInvalidValue(fmt.Sprintf("the jsonData length of %d bytes exceeds limit set at %d.", bsize, pingDefaults.DataMaxSize), "jsonData")
errs = errs.Also(fe)
}
if fe := cs.Sink.Validate(ctx); fe != nil {
errs = errs.Also(fe.ViaField("sink"))
}

View File

@ -20,12 +20,15 @@ import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"strings"
cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/robfig/cron/v3"
"knative.dev/pkg/apis"
"knative.dev/eventing/pkg/apis/sources/config"
)
func (c *PingSource) Validate(ctx context.Context) *apis.FieldError {
@ -50,6 +53,9 @@ func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError {
}
}
pingConfig := config.FromContextOrDefaults(ctx)
pingDefaults := pingConfig.PingDefaults.GetPingConfig()
if fe := cs.Sink.Validate(ctx); fe != nil {
errs = errs.Also(fe.ViaField("sink"))
}
@ -57,6 +63,10 @@ func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError {
if cs.Data != "" && cs.DataBase64 != "" {
errs = errs.Also(apis.ErrMultipleOneOf("data", "dataBase64"))
} else if cs.DataBase64 != "" {
if bsize := len(cs.DataBase64); pingDefaults.DataMaxSize > -1 && bsize > pingDefaults.DataMaxSize {
fe := apis.ErrInvalidValue(fmt.Sprintf("the dataBase64 length of %d bytes exceeds limit set at %d.", bsize, pingDefaults.DataMaxSize), "dataBase64")
errs = errs.Also(fe)
}
decoded, err := base64.StdEncoding.DecodeString(cs.DataBase64)
// invalid base64 string
if err != nil {
@ -69,13 +79,18 @@ func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError {
}
}
}
} else if cs.Data != "" && cs.ContentType == cloudevents.ApplicationJSON {
// validate if data is valid JSON
if err := validateJSON(cs.Data); err != nil {
errs = errs.Also(apis.ErrInvalidValue(err, "data"))
} else if cs.Data != "" {
if bsize := len(cs.Data); pingDefaults.DataMaxSize > -1 && bsize > pingDefaults.DataMaxSize {
fe := apis.ErrInvalidValue(fmt.Sprintf("the data length of %d bytes exceeds limit set at %d.", bsize, pingDefaults.DataMaxSize), "data")
errs = errs.Also(fe)
}
if cs.ContentType == cloudevents.ApplicationJSON {
// validate if data is valid JSON
if err := validateJSON(cs.Data); err != nil {
errs = errs.Also(apis.ErrInvalidValue(err, "data"))
}
}
}
return errs
}

View File

@ -175,6 +175,11 @@ const (
// already using labels for domain, it probably best to keep this
// consistent.
VisibilityLabelKey = "networking.knative.dev/visibility"
// PassthroughLoadbalancingHeaderName is the name of the header that directs
// load balancers to not load balance the respective request but to
// send it to the request's target directly.
PassthroughLoadbalancingHeaderName = "K-Passthrough-Lb"
)
// DomainTemplateValues are the available properties people can choose from

View File

@ -26,7 +26,6 @@ import (
"go.opencensus.io/tag"
"go.uber.org/zap"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/cache"
kubemetrics "k8s.io/client-go/tools/metrics"
"k8s.io/client-go/util/workqueue"
"knative.dev/pkg/metrics"
@ -34,8 +33,8 @@ import (
)
var (
workQueueDepthStat = stats.Int64("work_queue_depth", "Depth of the work queue", stats.UnitNone)
reconcileCountStat = stats.Int64("reconcile_count", "Number of reconcile operations", stats.UnitNone)
workQueueDepthStat = stats.Int64("work_queue_depth", "Depth of the work queue", stats.UnitDimensionless)
reconcileCountStat = stats.Int64("reconcile_count", "Number of reconcile operations", stats.UnitDimensionless)
reconcileLatencyStat = stats.Int64("reconcile_latency", "Latency of reconcile operations", stats.UnitMilliseconds)
// reconcileDistribution defines the bucket boundaries for the histogram of reconcile latency metric.
@ -58,104 +57,51 @@ func init() {
Adds: stats.Int64(
"workqueue_adds_total",
"Total number of adds handled by workqueue",
stats.UnitNone,
stats.UnitDimensionless,
),
Depth: stats.Int64(
"workqueue_depth",
"Current depth of workqueue",
stats.UnitNone,
stats.UnitDimensionless,
),
Latency: stats.Float64(
"workqueue_queue_latency_seconds",
"How long in seconds an item stays in workqueue before being requested.",
"s",
stats.UnitSeconds,
),
Retries: stats.Int64(
"workqueue_retries_total",
"Total number of retries handled by workqueue",
"s",
stats.UnitDimensionless,
),
WorkDuration: stats.Float64(
"workqueue_work_duration_seconds",
"How long in seconds processing an item from workqueue takes.",
"s",
stats.UnitSeconds,
),
UnfinishedWorkSeconds: stats.Float64(
"workqueue_unfinished_work_seconds",
"How long in seconds the outstanding workqueue items have been in flight (total).",
"s",
stats.UnitSeconds,
),
LongestRunningProcessorSeconds: stats.Float64(
"workqueue_longest_running_processor_seconds",
"How long in seconds the longest outstanding workqueue item has been in flight.",
"s",
stats.UnitSeconds,
),
}
workqueue.SetProvider(wp)
// Register to receive metrics from kubernetes reflectors (what powers informers)
// NOTE: today these don't actually seem to wire up to anything in Kubernetes.
rp := &metrics.ReflectorProvider{
ItemsInList: stats.Float64(
"reflector_items_in_list",
"How many items an API list returns to the reflectors",
stats.UnitNone,
),
// TODO(mattmoor): This is not in the latest version, so it will
// be removed in a future version.
ItemsInMatch: stats.Float64(
"reflector_items_in_match",
"",
stats.UnitNone,
),
ItemsInWatch: stats.Float64(
"reflector_items_in_watch",
"How many items an API watch returns to the reflectors",
stats.UnitNone,
),
LastResourceVersion: stats.Float64(
"reflector_last_resource_version",
"Last resource version seen for the reflectors",
stats.UnitNone,
),
ListDuration: stats.Float64(
"reflector_list_duration_seconds",
"How long an API list takes to return and decode for the reflectors",
stats.UnitNone,
),
Lists: stats.Int64(
"reflector_lists_total",
"Total number of API lists done by the reflectors",
stats.UnitNone,
),
ShortWatches: stats.Int64(
"reflector_short_watches_total",
"Total number of short API watches done by the reflectors",
stats.UnitNone,
),
WatchDuration: stats.Float64(
"reflector_watch_duration_seconds",
"How long an API watch takes to return and decode for the reflectors",
stats.UnitNone,
),
Watches: stats.Int64(
"reflector_watches_total",
"Total number of API watches done by the reflectors",
stats.UnitNone,
),
}
cache.SetReflectorMetricsProvider(rp)
cp := &metrics.ClientProvider{
Latency: stats.Float64(
"client_latency",
"How long Kubernetes API requests take",
"s",
stats.UnitSeconds,
),
Result: stats.Int64(
"client_results",
"Total number of API requests (broken down by status code)",
stats.UnitNone,
stats.UnitDimensionless,
),
}
opts := kubemetrics.RegisterOpts{
@ -181,7 +127,6 @@ func init() {
TagKeys: []tag.Key{reconcilerTagKey, successTagKey, NamespaceTagKey},
}}
views = append(views, wp.DefaultViews()...)
views = append(views, rp.DefaultViews()...)
views = append(views, cp.DefaultViews()...)
// Create views to see our measurements. This can return an error if

View File

@ -33,112 +33,112 @@ func NewMemStatsAll() *MemStatsProvider {
Alloc: stats.Int64(
"go_alloc",
"The number of bytes of allocated heap objects.",
stats.UnitNone,
stats.UnitDimensionless,
),
TotalAlloc: stats.Int64(
"go_total_alloc",
"The cumulative bytes allocated for heap objects.",
stats.UnitNone,
stats.UnitDimensionless,
),
Sys: stats.Int64(
"go_sys",
"The total bytes of memory obtained from the OS.",
stats.UnitNone,
stats.UnitDimensionless,
),
Lookups: stats.Int64(
"go_lookups",
"The number of pointer lookups performed by the runtime.",
stats.UnitNone,
stats.UnitDimensionless,
),
Mallocs: stats.Int64(
"go_mallocs",
"The cumulative count of heap objects allocated.",
stats.UnitNone,
stats.UnitDimensionless,
),
Frees: stats.Int64(
"go_frees",
"The cumulative count of heap objects freed.",
stats.UnitNone,
stats.UnitDimensionless,
),
HeapAlloc: stats.Int64(
"go_heap_alloc",
"The number of bytes of allocated heap objects.",
stats.UnitNone,
stats.UnitDimensionless,
),
HeapSys: stats.Int64(
"go_heap_sys",
"The number of bytes of heap memory obtained from the OS.",
stats.UnitNone,
stats.UnitDimensionless,
),
HeapIdle: stats.Int64(
"go_heap_idle",
"The number of bytes in idle (unused) spans.",
stats.UnitNone,
stats.UnitDimensionless,
),
HeapInuse: stats.Int64(
"go_heap_in_use",
"The number of bytes in in-use spans.",
stats.UnitNone,
stats.UnitDimensionless,
),
HeapReleased: stats.Int64(
"go_heap_released",
"The number of bytes of physical memory returned to the OS.",
stats.UnitNone,
stats.UnitDimensionless,
),
HeapObjects: stats.Int64(
"go_heap_objects",
"The number of allocated heap objects.",
stats.UnitNone,
stats.UnitDimensionless,
),
StackInuse: stats.Int64(
"go_stack_in_use",
"The number of bytes in stack spans.",
stats.UnitNone,
stats.UnitDimensionless,
),
StackSys: stats.Int64(
"go_stack_sys",
"The number of bytes of stack memory obtained from the OS.",
stats.UnitNone,
stats.UnitDimensionless,
),
MSpanInuse: stats.Int64(
"go_mspan_in_use",
"The number of bytes of allocated mspan structures.",
stats.UnitNone,
stats.UnitDimensionless,
),
MSpanSys: stats.Int64(
"go_mspan_sys",
"The number of bytes of memory obtained from the OS for mspan structures.",
stats.UnitNone,
stats.UnitDimensionless,
),
MCacheInuse: stats.Int64(
"go_mcache_in_use",
"The number of bytes of allocated mcache structures.",
stats.UnitNone,
stats.UnitDimensionless,
),
MCacheSys: stats.Int64(
"go_mcache_sys",
"The number of bytes of memory obtained from the OS for mcache structures.",
stats.UnitNone,
stats.UnitDimensionless,
),
BuckHashSys: stats.Int64(
"go_bucket_hash_sys",
"The number of bytes of memory in profiling bucket hash tables.",
stats.UnitNone,
stats.UnitDimensionless,
),
GCSys: stats.Int64(
"go_gc_sys",
"The number of bytes of memory in garbage collection metadata.",
stats.UnitNone,
stats.UnitDimensionless,
),
OtherSys: stats.Int64(
"go_other_sys",
"The number of bytes of memory in miscellaneous off-heap runtime allocations.",
stats.UnitNone,
stats.UnitDimensionless,
),
NextGC: stats.Int64(
"go_next_gc",
"The target heap size of the next GC cycle.",
stats.UnitNone,
stats.UnitDimensionless,
),
LastGC: stats.Int64(
"go_last_gc",
@ -153,17 +153,17 @@ func NewMemStatsAll() *MemStatsProvider {
NumGC: stats.Int64(
"go_num_gc",
"The number of completed GC cycles.",
stats.UnitNone,
stats.UnitDimensionless,
),
NumForcedGC: stats.Int64(
"go_num_forced_gc",
"The number of GC cycles that were forced by the application calling the GC function.",
stats.UnitNone,
stats.UnitDimensionless,
),
GCCPUFraction: stats.Float64(
"go_gc_cpu_fraction",
"The fraction of this program's available CPU time used by the GC since the program started.",
stats.UnitNone,
stats.UnitDimensionless,
),
}
}

View File

@ -1,176 +0,0 @@
/*
Copyright 2019 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package metrics
import (
"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
"k8s.io/client-go/tools/cache"
)
// ReflectorProvider implements reflector.MetricsProvider and may be used with
// reflector.SetProvider to have metrics exported to the provided metrics.
type ReflectorProvider struct {
ItemsInList *stats.Float64Measure
// TODO(mattmoor): This is not in the latest version, so it will
// be removed in a future version.
ItemsInMatch *stats.Float64Measure
ItemsInWatch *stats.Float64Measure
LastResourceVersion *stats.Float64Measure
ListDuration *stats.Float64Measure
Lists *stats.Int64Measure
ShortWatches *stats.Int64Measure
WatchDuration *stats.Float64Measure
Watches *stats.Int64Measure
}
var (
_ cache.MetricsProvider = (*ReflectorProvider)(nil)
)
// NewItemsInListMetric implements MetricsProvider
func (rp *ReflectorProvider) NewItemsInListMetric(name string) cache.SummaryMetric {
return floatMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.ItemsInList,
}
}
// ItemsInListView returns a view of the ItemsInList metric.
func (rp *ReflectorProvider) ItemsInListView() *view.View {
return measureView(rp.ItemsInList, view.Distribution(BucketsNBy10(0.1, 6)...))
}
// NewItemsInMatchMetric implements MetricsProvider
func (rp *ReflectorProvider) NewItemsInMatchMetric(name string) cache.SummaryMetric {
return floatMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.ItemsInMatch,
}
}
// ItemsInMatchView returns a view of the ItemsInMatch metric.
func (rp *ReflectorProvider) ItemsInMatchView() *view.View {
return measureView(rp.ItemsInMatch, view.Distribution(BucketsNBy10(0.1, 6)...))
}
// NewItemsInWatchMetric implements MetricsProvider
func (rp *ReflectorProvider) NewItemsInWatchMetric(name string) cache.SummaryMetric {
return floatMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.ItemsInWatch,
}
}
// ItemsInWatchView returns a view of the ItemsInWatch metric.
func (rp *ReflectorProvider) ItemsInWatchView() *view.View {
return measureView(rp.ItemsInWatch, view.Distribution(BucketsNBy10(0.1, 6)...))
}
// NewLastResourceVersionMetric implements MetricsProvider
func (rp *ReflectorProvider) NewLastResourceVersionMetric(name string) cache.GaugeMetric {
return floatMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.LastResourceVersion,
}
}
// LastResourceVersionView returns a view of the LastResourceVersion metric.
func (rp *ReflectorProvider) LastResourceVersionView() *view.View {
return measureView(rp.LastResourceVersion, view.LastValue())
}
// NewListDurationMetric implements MetricsProvider
func (rp *ReflectorProvider) NewListDurationMetric(name string) cache.SummaryMetric {
return floatMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.ListDuration,
}
}
// ListDurationView returns a view of the ListDuration metric.
func (rp *ReflectorProvider) ListDurationView() *view.View {
return measureView(rp.ListDuration, view.Distribution(BucketsNBy10(0.1, 6)...))
}
// NewListsMetric implements MetricsProvider
func (rp *ReflectorProvider) NewListsMetric(name string) cache.CounterMetric {
return counterMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.Lists,
}
}
// ListsView returns a view of the Lists metric.
func (rp *ReflectorProvider) ListsView() *view.View {
return measureView(rp.Lists, view.Count())
}
// NewShortWatchesMetric implements MetricsProvider
func (rp *ReflectorProvider) NewShortWatchesMetric(name string) cache.CounterMetric {
return counterMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.ShortWatches,
}
}
// ShortWatchesView returns a view of the ShortWatches metric.
func (rp *ReflectorProvider) ShortWatchesView() *view.View {
return measureView(rp.ShortWatches, view.Count())
}
// NewWatchDurationMetric implements MetricsProvider
func (rp *ReflectorProvider) NewWatchDurationMetric(name string) cache.SummaryMetric {
return floatMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.WatchDuration,
}
}
// WatchDurationView returns a view of the WatchDuration metric.
func (rp *ReflectorProvider) WatchDurationView() *view.View {
return measureView(rp.WatchDuration, view.Distribution(BucketsNBy10(0.1, 6)...))
}
// NewWatchesMetric implements MetricsProvider
func (rp *ReflectorProvider) NewWatchesMetric(name string) cache.CounterMetric {
return counterMetric{
mutators: []tag.Mutator{tag.Insert(tagName, name)},
measure: rp.Watches,
}
}
// WatchesView returns a view of the Watches metric.
func (rp *ReflectorProvider) WatchesView() *view.View {
return measureView(rp.Watches, view.Count())
}
// DefaultViews returns a list of views suitable for passing to view.Register
func (rp *ReflectorProvider) DefaultViews() []*view.View {
return []*view.View{
rp.ItemsInListView(),
rp.ItemsInMatchView(),
rp.ItemsInWatchView(),
rp.LastResourceVersionView(),
rp.ListDurationView(),
rp.ListsView(),
rp.ShortWatchesView(),
rp.WatchDurationView(),
rp.WatchesView(),
}
}

View File

@ -20,7 +20,6 @@ import (
"time"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/clock"
net "knative.dev/networking/pkg/apis/networking"
"knative.dev/pkg/kmeta"
"knative.dev/serving/pkg/apis/serving"
@ -89,7 +88,7 @@ func (rs *RevisionSpec) GetContainer() *corev1.Container {
// SetRoutingState sets the routingState label on this Revision and updates the
// routingStateModified annotation.
func (r *Revision) SetRoutingState(state RoutingState, clock clock.Clock) {
func (r *Revision) SetRoutingState(state RoutingState, tm time.Time) {
stateStr := string(state)
if t := r.Annotations[serving.RoutingStateModifiedAnnotationKey]; t != "" &&
r.Labels[serving.RoutingStateLabelKey] == stateStr {
@ -101,13 +100,14 @@ func (r *Revision) SetRoutingState(state RoutingState, clock clock.Clock) {
r.Annotations = kmeta.UnionMaps(r.Annotations,
map[string]string{
serving.RoutingStateModifiedAnnotationKey: RoutingStateModifiedString(clock),
})
serving.RoutingStateModifiedAnnotationKey: RoutingStateModifiedString(tm),
},
)
}
// RoutingStateModifiedString gives a formatted now timestamp.
func RoutingStateModifiedString(clock clock.Clock) string {
return clock.Now().UTC().Format(time.RFC3339)
func RoutingStateModifiedString(t time.Time) string {
return t.UTC().Format(time.RFC3339)
}
// GetRoutingState retrieves the RoutingState label.

View File

@ -109,8 +109,8 @@ func NewConfigFromMap(data map[string]string) (*autoscalerconfig.Config, error)
}
func validate(lc *autoscalerconfig.Config) (*autoscalerconfig.Config, error) {
if lc.ScaleToZeroGracePeriod < autoscaling.WindowMin {
return nil, fmt.Errorf("scale-to-zero-grace-period must be at least %v, was: %v", autoscaling.WindowMin, lc.ScaleToZeroGracePeriod)
if lc.ScaleToZeroGracePeriod <= 0 {
return nil, fmt.Errorf("scale-to-zero-grace-period must be positive, was: %v", lc.ScaleToZeroGracePeriod)
}
if lc.ScaleDownDelay < 0 {

View File

@ -101,9 +101,9 @@ func WithRoutingStateModified(t time.Time) RevisionOption {
}
// WithRoutingState updates the annotation to the provided timestamp.
func WithRoutingState(s v1.RoutingState, c clock.Clock) RevisionOption {
func WithRoutingState(s v1.RoutingState, c clock.PassiveClock) RevisionOption {
return func(rev *v1.Revision) {
rev.SetRoutingState(s, c)
rev.SetRoutingState(s, c.Now())
}
}

9
vendor/modules.txt vendored
View File

@ -771,7 +771,7 @@ k8s.io/kube-openapi/pkg/util/sets
k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/trace
# knative.dev/eventing v0.20.1-0.20210209233432-7ce82834b39d
# knative.dev/eventing v0.20.1-0.20210216203459-ef5f61dadd7d
## explicit
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/configs
@ -790,6 +790,7 @@ knative.dev/eventing/pkg/apis/messaging/config
knative.dev/eventing/pkg/apis/messaging/v1
knative.dev/eventing/pkg/apis/messaging/v1beta1
knative.dev/eventing/pkg/apis/sources
knative.dev/eventing/pkg/apis/sources/config
knative.dev/eventing/pkg/apis/sources/v1
knative.dev/eventing/pkg/apis/sources/v1alpha1
knative.dev/eventing/pkg/apis/sources/v1alpha2
@ -804,12 +805,12 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake
# knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf
## explicit
knative.dev/hack
# knative.dev/networking v0.0.0-20210209171856-855092348016
# knative.dev/networking v0.0.0-20210216014426-94bfc013982b
## explicit
knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking
knative.dev/networking/pkg/apis/networking/v1alpha1
# knative.dev/pkg v0.0.0-20210208175252-a02dcff9ee26
# knative.dev/pkg v0.0.0-20210216013737-584933f8280b
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
@ -853,7 +854,7 @@ knative.dev/pkg/tracing/config
knative.dev/pkg/tracing/propagation
knative.dev/pkg/tracing/propagation/tracecontextb3
knative.dev/pkg/tracker
# knative.dev/serving v0.20.1-0.20210210103320-ebc658424a0d
# knative.dev/serving v0.20.1-0.20210217010702-7aa62c5bebdf
## explicit
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1