diff --git a/go.mod b/go.mod
index c80f15a90..97cc46030 100644
--- a/go.mod
+++ b/go.mod
@@ -8,16 +8,16 @@ require (
github.com/spf13/cobra v1.0.1-0.20200715031239-b95db644ed1c
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.0
- golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
+ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
gotest.tools v2.2.0+incompatible
k8s.io/api v0.18.1
k8s.io/apimachinery v0.18.6
k8s.io/cli-runtime v0.17.6
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/code-generator v0.18.0
- knative.dev/eventing v0.16.1-0.20200724032657-8d83431c07bd
- knative.dev/pkg v0.0.0-20200724211057-f21f66204a5c
- knative.dev/serving v0.16.1-0.20200724203457-1517b1735305
+ knative.dev/eventing v0.16.1-0.20200803090001-4cd17b80636f
+ knative.dev/pkg v0.0.0-20200804051227-c3c869a34475
+ knative.dev/serving v0.16.1-0.20200804124127-08d681889306
sigs.k8s.io/yaml v1.2.0
)
diff --git a/go.sum b/go.sum
index 82523bc2f..f810cf3fa 100644
--- a/go.sum
+++ b/go.sum
@@ -22,6 +22,8 @@ cloud.google.com/go v0.60.0 h1:R+tDlceO7Ss+zyvtsdhTxacDyZ1k99xwskQ4FT7ruoM=
cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU=
cloud.google.com/go v0.61.0 h1:NLQf5e1OMspfNT1RAHOB3ublr1TW3YTXO8OiWwVjK2U=
cloud.google.com/go v0.61.0/go.mod h1:XukKJg4Y7QsUu0Hxg3qQKUWR4VuWivmyMK2+rUyxAqw=
+cloud.google.com/go v0.62.0 h1:RmDygqvj27Zf3fCQjQRtLyC7KwFcHkeJitcO0OoGOcA=
+cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
@@ -36,8 +38,7 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
-cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w=
-cloud.google.com/go/pubsub v1.6.0/go.mod h1:I6DkrTv7tKIvDQTZt+6rAFo1446FEoVDJeLXTu4pCcE=
+cloud.google.com/go/pubsub v1.6.1/go.mod h1:kvW9rcn9OLEx6eTIzMBbWbpB8YsK3vu9jxgPolVz+p4=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
@@ -232,7 +233,7 @@ github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/
github.com/clarketm/json v1.13.4/go.mod h1:ynr2LRfb0fQU34l07csRNBTcivjySLLiY1YzQqKVfdo=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudevents/sdk-go v1.0.0/go.mod h1:3TkmM0cFqkhCHOq5JzzRU/RxRkwzoS8TZ+G448qVTog=
-github.com/cloudevents/sdk-go/v2 v2.0.1-0.20200630063327-b91da81265fe/go.mod h1:3CTrpB4+u7Iaj6fd7E2Xvm5IxMdRoaAhqaRVnOr2rCU=
+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/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
@@ -1161,6 +1162,8 @@ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg=
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig=
+golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -1332,9 +1335,8 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200722175500-76b94024e4b6 h1:X9xIZ1YU8bLZA3l6gqDUHSFiD0GFI9S548h6C8nDtOY=
-golang.org/x/sys v0.0.0-20200722175500-76b94024e4b6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE=
+golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1437,13 +1439,13 @@ golang.org/x/tools v0.0.0-20200527183253-8e7acdbce89d/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200709181711-e327e1019dfe/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200721223218-6123e77877b2/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200723000907-a7c6fd066f6d h1:7k9BKfwmdbykG6l5ztniTrH0TP25yel8O7l26/yovMU=
-golang.org/x/tools v0.0.0-20200723000907-a7c6fd066f6d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200725200936-102e7d357031/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200727233628-55644ead90ce/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6 h1:qKpj8TpV+LEhel7H/fR788J+KvhWZ3o3V6N2fU/iuLU=
+golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
@@ -1530,12 +1532,13 @@ google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7Fc
google.golang.org/genproto v0.0.0-20200603110839-e855014d5736/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200709005830-7a2ca40e9dc3/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200711021454-869866162049/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200721032028-5044d0edf986/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200722002428-88e341933a54 h1:ASrBgpl9XvkNTP0m39/j18mid7aoF21npu2ioIBxYnY=
-google.golang.org/genproto v0.0.0-20200722002428-88e341933a54/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200726014623-da3ae01ef02d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200728010541-3dc8dca74b7b/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200731012542-8145dea6a485 h1:wTk5DQB3+1darAz4Ldomo0r5bUOCKX7gilxQ4sb2kno=
+google.golang.org/genproto v0.0.0-20200731012542-8145dea6a485/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -1559,6 +1562,8 @@ google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
+google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1681,29 +1686,27 @@ k8s.io/legacy-cloud-providers v0.17.4/go.mod h1:FikRNoD64ECjkxO36gkDgJeiQWwyZTuB
k8s.io/metrics v0.17.2/go.mod h1:3TkNHET4ROd+NfzNxkjoVfQ0Ob4iZnaHmSEA4vYpwLw=
k8s.io/test-infra v0.0.0-20200514184223-ba32c8aae783/go.mod h1:bW6thaPZfL2hW7ecjx2WYwlP9KQLM47/xIJyttkVk5s=
k8s.io/test-infra v0.0.0-20200617221206-ea73eaeab7ff/go.mod h1:L3+cRvwftUq8IW1TrHji5m3msnc4uck/7LsE/GR/aZk=
-k8s.io/test-infra v0.0.0-20200721115715-1af01ef6b4c8/go.mod h1:4cRZlOy5Ka3Ym/orCmNWL2dsE39pN0xHFT0WFrZe2HQ=
-k8s.io/test-infra v0.0.0-20200722010006-526277bee528/go.mod h1:4cRZlOy5Ka3Ym/orCmNWL2dsE39pN0xHFT0WFrZe2HQ=
-k8s.io/test-infra v0.0.0-20200723132140-b02d194a2d64/go.mod h1:4cRZlOy5Ka3Ym/orCmNWL2dsE39pN0xHFT0WFrZe2HQ=
+k8s.io/test-infra v0.0.0-20200728085909-4407d8aec1ee/go.mod h1:4cRZlOy5Ka3Ym/orCmNWL2dsE39pN0xHFT0WFrZe2HQ=
+k8s.io/test-infra v0.0.0-20200731093307-ac6260b71531/go.mod h1:4cRZlOy5Ka3Ym/orCmNWL2dsE39pN0xHFT0WFrZe2HQ=
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200124190032-861946025e34 h1:HjlUD6M0K3P8nRXmr2B9o4F9dUy9TCj/aEpReeyi6+k=
k8s.io/utils v0.0.0-20200124190032-861946025e34/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
-knative.dev/caching v0.0.0-20200723145958-d031ce9de55d/go.mod h1:z0tB8jJWOJj4SfbWGps++hjMQHSxB5XEiTyaRuyRtfE=
-knative.dev/eventing v0.16.1-0.20200724032657-8d83431c07bd h1:3Etn1vLNy1o0UE3kmUVedC/ZPHMYqKIsr2xAt3YArIY=
-knative.dev/eventing v0.16.1-0.20200724032657-8d83431c07bd/go.mod h1:D7x216MQznRHiu3V7Y5I29/xCRkHxl9i21T6LrZPQt8=
+knative.dev/caching v0.0.0-20200731163501-72860523f33d/go.mod h1:Gb7i/Nrx7SCE248i+f/STNKFqFFOY62M8xPn7C7V1ps=
+knative.dev/eventing v0.16.1-0.20200803090001-4cd17b80636f h1:h5uf0JHbKOTCPFhuD0jFa197ThvpiaynVVqt4tWwn0U=
+knative.dev/eventing v0.16.1-0.20200803090001-4cd17b80636f/go.mod h1:KwxrviG6CffzjvcnPfRHqRIxzTG6S2F+IN4C3Htihq0=
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
-knative.dev/networking v0.0.0-20200723155758-cc457d7322d6 h1:E3icpGu2JG84UXvrG/36FovPwVmBWs1q6R6xZzcO6dM=
-knative.dev/networking v0.0.0-20200723155758-cc457d7322d6/go.mod h1:Xd6H9nzGwHI/tfEnvrm7dQjYP1s/CbZL8J941HyUaSE=
+knative.dev/networking v0.0.0-20200801232901-0a0cf9380a8d h1:8w9B2wTj9F2zmzTTfu12CqiNcdaxIvuBFR3AZY6RAdY=
+knative.dev/networking v0.0.0-20200801232901-0a0cf9380a8d/go.mod h1:wHAtNud0NOLQ7Xobl0PjLf91deGXW4esaa+R4pwxJnQ=
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
-knative.dev/pkg v0.0.0-20200723060257-ae9c3f7fa8d3/go.mod h1:pOJ+tu5k/SgHPGmecWqFguxJcIZozyDWlTlyldGcYGM=
-knative.dev/pkg v0.0.0-20200724055557-c36f46cc8c80/go.mod h1:GtoTEupsOzadgRKT4GgPWukbhAcINwDDGcKibTyd1Fk=
-knative.dev/pkg v0.0.0-20200724211057-f21f66204a5c h1:jJs9rQhkCexFr9m6+sYIPq/0DtRe+typQB64ffbXydM=
-knative.dev/pkg v0.0.0-20200724211057-f21f66204a5c/go.mod h1:jVP9M8uft3EYhWF8K00zKiNCvyfGy3tm0L2w9edCRqw=
-knative.dev/serving v0.16.1-0.20200724203457-1517b1735305 h1:Bqn8mTuMMWdnmbJzRPvEM69p71npap/YQPIxuNvkChE=
-knative.dev/serving v0.16.1-0.20200724203457-1517b1735305/go.mod h1:txxxmKATqqQv9j/s7K6PI6BAZ3cOAddJE72LHUsTxDY=
-knative.dev/test-infra v0.0.0-20200721175154-c98db9bd4d5d/go.mod h1:kzRhTm5L08eDQFRl8NKSAN93lz6IZWQMs+2TjTCN+VA=
-knative.dev/test-infra v0.0.0-20200722142057-3ca910b5a25e/go.mod h1:oHmDsPmq+zcc3b+Z94Kgmrz1JnmZEz36jmKuvL2Lw7o=
-knative.dev/test-infra v0.0.0-20200723182457-517b66ba19c1/go.mod h1:Y3sNbLSTA11kRcLvTzRsZCxO+GQuw7KV7+PL+iD+9CA=
+knative.dev/pkg v0.0.0-20200731005101-694087017879/go.mod h1:XgwbBKFaZgeMYBf1LRc5WtHDbCnOv6j+36/W9XFxs7Y=
+knative.dev/pkg v0.0.0-20200804051227-c3c869a34475 h1:Gths5wpLr78xFcm8eQ82c4lT7jJJOqguAG05LJQI/6k=
+knative.dev/pkg v0.0.0-20200804051227-c3c869a34475/go.mod h1:603ifFNju4JQo+VamPtWsxJW2XvK7BKWvOPA5138hNg=
+knative.dev/serving v0.16.1-0.20200804124127-08d681889306 h1:dfhSv/MOeFjarcCFwgprV++Cf0cLE46glhDosvSW8dc=
+knative.dev/serving v0.16.1-0.20200804124127-08d681889306/go.mod h1:m7yjR+ojbSpkxF8FnqENvvBwKtHQklw6qviYDmTbOqg=
+knative.dev/test-infra v0.0.0-20200729161259-d21e6ed450cb/go.mod h1:AfEfWe/Z/DIA2vQSbSTxMVlF+ErBD7Oqc4/K/x1no90=
+knative.dev/test-infra v0.0.0-20200730214800-52f8800d5692/go.mod h1:AfEfWe/Z/DIA2vQSbSTxMVlF+ErBD7Oqc4/K/x1no90=
+knative.dev/test-infra v0.0.0-20200731141600-8bb2015c65e2/go.mod h1:0le/boMbbcshz6ffNQRYyTkL7xubokot4dKcO/1daIc=
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=
@@ -1722,6 +1725,7 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/boskos v0.0.0-20200526191642-45fc818e2d00/go.mod h1:L1ubP7d1CCMSQSjKiZv6dGbh7b4kfoG+dFPj8cfYDnI=
sigs.k8s.io/boskos v0.0.0-20200717180850-7299d535c033/go.mod h1:ZO5RV+VxJS9mb6DvZ1yAjywoyq/wQ8b0vDoZxcIA5kE=
+sigs.k8s.io/boskos v0.0.0-20200729174948-794df80db9c9/go.mod h1:ZO5RV+VxJS9mb6DvZ1yAjywoyq/wQ8b0vDoZxcIA5kE=
sigs.k8s.io/controller-runtime v0.5.0/go.mod h1:REiJzC7Y00U+2YkMbT8wxgrsX5USpXKGhb2sCtAXiT8=
sigs.k8s.io/controller-runtime v0.5.4/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
diff --git a/scripts/test-infra/COMMIT b/scripts/test-infra/COMMIT
index 155930e03..aa24fec0c 100644
--- a/scripts/test-infra/COMMIT
+++ b/scripts/test-infra/COMMIT
@@ -1 +1 @@
-d5ec9cdc6b33bb0040747130db664579553ceb45
+5efff0c4bd0a8438953215dcf1b29a337c43c8c8
diff --git a/scripts/test-infra/e2e-tests.sh b/scripts/test-infra/e2e-tests.sh
index edede6507..31aeabfd8 100755
--- a/scripts/test-infra/e2e-tests.sh
+++ b/scripts/test-infra/e2e-tests.sh
@@ -79,10 +79,13 @@ function teardown_test_resources() {
# Run the given E2E tests. Assume tests are tagged e2e, unless `-tags=XXX` is passed.
# Parameters: $1..$n - any go test flags, then directories containing the tests to run.
function go_test_e2e() {
- local test_options=""
- local go_options=""
- [[ ! " $@" == *" -tags="* ]] && go_options="-tags=e2e"
- report_go_test -v -race -count=1 ${go_options} $@ "${test_options}"
+ local go_test_args=()
+ # Remove empty args as `go test` will consider it as running tests for the current directory, which is not expected.
+ for arg in "$@"; do
+ [[ -n "$arg" ]] && go_test_args+=("$arg")
+ done
+ [[ ! " $*" == *" -tags="* ]] && go_test_args+=("-tags=e2e")
+ report_go_test -race -count=1 "${go_test_args[@]}"
}
# Dumps the k8s api server metrics. Spins up a proxy, waits a little bit and
@@ -93,7 +96,7 @@ function dump_metrics() {
local proxy_pid=$!
sleep 5
header ">> Grabbing k8s metrics"
- curl -s http://localhost:8080/metrics > ${ARTIFACTS}/k8s.metrics.txt
+ curl -s http://localhost:8080/metrics > "${ARTIFACTS}"/k8s.metrics.txt
# Clean up proxy so it doesn't interfere with job shutting down
kill $proxy_pid || true
}
diff --git a/scripts/test-infra/library.sh b/scripts/test-infra/library.sh
index ce4312c60..5cf23dc42 100755
--- a/scripts/test-infra/library.sh
+++ b/scripts/test-infra/library.sh
@@ -391,43 +391,45 @@ function mktemp_with_extension() {
# $2 - check name as an identifier (e.g., GoBuild)
# $3 - failure message (can contain newlines), optional (means success)
function create_junit_xml() {
- local xml="$(mktemp_with_extension "${ARTIFACTS}"/junit_XXXXXXXX xml)"
+ local xml
+ xml="$(mktemp_with_extension "${ARTIFACTS}"/junit_XXXXXXXX xml)"
+ echo "JUnit file ${xml} is created for reporting the test result"
run_kntest junit --suite="$1" --name="$2" --err-msg="$3" --dest="${xml}" || return 1
}
# Runs a go test and generate a junit summary.
# Parameters: $1... - parameters to go test
function report_go_test() {
- # Run tests in verbose mode to capture details.
- # go doesn't like repeating -v, so remove if passed.
- local args=" $@ "
- local go_test="go test -v ${args/ -v / }"
- # Just run regular go tests if not on Prow.
- echo "Running tests with '${go_test}'"
- local report="$(mktemp)"
- capture_output "${report}" ${go_test}
+ local go_test_args=( "$@" )
+ # Install gotestsum if necessary.
+ run_go_tool gotest.tools/gotestsum gotestsum --help > /dev/null 2>&1
+ # Capture the test output to the report file.
+ local report
+ report="$(mktemp)"
+ local xml
+ xml="$(mktemp_with_extension "${ARTIFACTS}"/junit_XXXXXXXX xml)"
+ echo "Running go test with args: ${go_test_args[*]}"
+ # TODO(chizhg): change to `--format testname`?
+ capture_output "${report}" gotestsum --format standard-verbose \
+ --junitfile "${xml}" --junitfile-testsuite-name relative --junitfile-testcase-classname relative \
+ -- "${go_test_args[@]}"
local failed=$?
echo "Finished run, return code is ${failed}"
- # Install go-junit-report if necessary.
- run_go_tool github.com/jstemmer/go-junit-report go-junit-report --help > /dev/null 2>&1
- local xml="$(mktemp_with_extension ${ARTIFACTS}/junit_XXXXXXXX xml)"
- cat ${report} \
- | go-junit-report \
- | sed -e "s#\"\(github\.com/knative\|knative\.dev\)/${REPO_NAME}/#\"#g" \
- > ${xml}
+
echo "XML report written to ${xml}"
- if [[ -n "$(grep '' ${xml})" ]]; then
+ if [[ -n "$(grep '' "${xml}")" ]]; then
# XML report is empty, something's wrong; use the output as failure reason
- create_junit_xml _go_tests "GoTests" "$(cat ${report})"
+ create_junit_xml _go_tests "GoTests" "$(cat "${report}")"
fi
# Capture and report any race condition errors
- local race_errors="$(sed -n '/^WARNING: DATA RACE$/,/^==================$/p' ${report})"
+ local race_errors
+ race_errors="$(sed -n '/^WARNING: DATA RACE$/,/^==================$/p' "${report}")"
create_junit_xml _go_tests "DataRaceAnalysis" "${race_errors}"
if (( ! IS_PROW )); then
# Keep the suffix, so files are related.
local logfile=${xml/junit_/go_test_}
logfile=${logfile/.xml/.log}
- cp ${report} ${logfile}
+ cp "${report}" "${logfile}"
echo "Test log written to ${logfile}"
fi
return ${failed}
@@ -553,16 +555,13 @@ function run_go_tool() {
function run_kntest() {
# If the current repo is test-infra, run kntest from source.
if [[ "${REPO_NAME}" == "test-infra" ]]; then
- # Each parameter can possibly be in the format of "--xxx yyy", using $@ can automatically split them into multiple positional arguments for the command.
- # shellcheck disable=SC2068
- go run "${REPO_ROOT_DIR}"/kntest/cmd/kntest $@
+ go run "${REPO_ROOT_DIR}"/kntest/cmd/kntest "$@"
# Otherwise kntest must be installed.
else
if [[ ! -x "$(command -v kntest)" ]]; then
echo "--- FAIL: kntest not installed, please clone test-infra repo and run \`go install ./kntest/cmd/kntest\` to install it"; return 1;
fi
- # shellcheck disable=SC2068
- kntest $@
+ kntest "$@"
fi
}
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index e91cb82c1..53a249312 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -107,6 +107,7 @@ includes_FreeBSD='
#include
#include
#include
+#include
#include
#include
#include
@@ -297,6 +298,7 @@ includes_NetBSD='
#include
#include
#include
+#include
#include
#include
#include
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
index 848245873..3689c8084 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
@@ -339,6 +339,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
index 4acd101c3..b8f7c3c93 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
@@ -339,6 +339,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
index e4719873b..be14bb1a4 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
@@ -339,6 +339,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
index 5e49769d9..7ce9c0081 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
@@ -339,6 +339,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
index 96b9b8ab3..20f3a5799 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
@@ -158,6 +158,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
index ed522a84e..90b8fcd29 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
@@ -158,6 +158,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
index c8d36fe99..c5c03993b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
@@ -150,6 +150,12 @@ const (
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
index f1c146a74..14dd3c1d1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
@@ -158,6 +158,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/register.go b/vendor/knative.dev/eventing/pkg/apis/eventing/register.go
index ead3498bd..29ffcc907 100644
--- a/vendor/knative.dev/eventing/pkg/apis/eventing/register.go
+++ b/vendor/knative.dev/eventing/pkg/apis/eventing/register.go
@@ -59,6 +59,21 @@ const (
// BrokerChannelAddressStatusAnnotationKey is the broker status
// annotation key used to specify the address of its channel.
BrokerChannelAddressStatusAnnotationKey = "knative.dev/channelAddress"
+
+ // BrokerChannelAPIVersionStatusAnnotationKey is the broker status
+ // annotation key used to specify the APIVersion of the channel for
+ // the triggers to subscribe to.
+ BrokerChannelAPIVersionStatusAnnotationKey = "knative.dev/channelAPIVersion"
+
+ // BrokerChannelKindStatusAnnotationKey is the broker status
+ // annotation key used to specify the Kind of the channel for
+ // the triggers to subscribe to.
+ BrokerChannelKindStatusAnnotationKey = "knative.dev/channelKind"
+
+ // BrokerChannelNameStatusAnnotationKey is the broker status
+ // annotation key used to specify the name of the channel for
+ // the triggers to subscribe to.
+ BrokerChannelNameStatusAnnotationKey = "knative.dev/channelName"
)
var (
diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1alpha2/ping_conversion.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1alpha2/ping_conversion.go
index 26c6bcda3..916eee318 100644
--- a/vendor/knative.dev/eventing/pkg/apis/sources/v1alpha2/ping_conversion.go
+++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1alpha2/ping_conversion.go
@@ -19,16 +19,64 @@ package v1alpha2
import (
"context"
"fmt"
+ "strings"
+ "knative.dev/eventing/pkg/apis/sources/v1beta1"
"knative.dev/pkg/apis"
)
// ConvertTo implements apis.Convertible
-func (source *PingSource) ConvertTo(ctx context.Context, sink apis.Convertible) error {
- return fmt.Errorf("v1alpha2 is the highest known version, got: %T", sink)
+// Converts source from v1alpha2.PingSource into a higher version.
+func (source *PingSource) ConvertTo(ctx context.Context, obj apis.Convertible) error {
+ switch sink := obj.(type) {
+ case *v1beta1.PingSource:
+ sink.ObjectMeta = source.ObjectMeta
+ sink.Spec = v1beta1.PingSourceSpec{
+ JsonData: source.Spec.JsonData,
+ SourceSpec: source.Spec.SourceSpec,
+ }
+ sink.Status = v1beta1.PingSourceStatus{
+ SourceStatus: source.Status.SourceStatus,
+ }
+
+ // in v1beta1, timezone has its own field
+ schedule := source.Spec.Schedule
+ if strings.HasPrefix(schedule, "TZ=") || strings.HasPrefix(schedule, "CRON_TZ=") {
+ i := strings.Index(schedule, " ")
+ eq := strings.Index(schedule, "=")
+ sink.Spec.Timezone = schedule[eq+1 : i]
+ sink.Spec.Schedule = strings.TrimSpace(schedule[i:])
+ } else {
+ sink.Spec.Schedule = schedule
+ }
+
+ return nil
+ default:
+ return apis.ConvertToViaProxy(ctx, source, &v1beta1.PingSource{}, sink)
+ }
}
// ConvertFrom implements apis.Convertible
-func (sink *PingSource) ConvertFrom(ctx context.Context, source apis.Convertible) error {
- return fmt.Errorf("v1alpha2 is the highest known version, got: %T", source)
+// Converts obj from a higher version into v1alpha2.PingSource.
+func (sink *PingSource) ConvertFrom(ctx context.Context, obj apis.Convertible) error {
+ switch source := obj.(type) {
+ case *v1beta1.PingSource:
+ sink.ObjectMeta = source.ObjectMeta
+ sink.Spec = PingSourceSpec{
+ JsonData: source.Spec.JsonData,
+ SourceSpec: source.Spec.SourceSpec,
+ }
+ sink.Status = PingSourceStatus{
+ SourceStatus: source.Status.SourceStatus,
+ }
+
+ if source.Spec.Timezone != "" {
+ sink.Spec.Schedule = fmt.Sprintf("CRON_TZ=%s %s", source.Spec.Timezone, source.Spec.Schedule)
+ } else {
+ sink.Spec.Schedule = source.Spec.Schedule
+ }
+ return nil
+ default:
+ return apis.ConvertFromViaProxy(ctx, source, &v1beta1.PingSource{}, sink)
+ }
}
diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_conversion.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_conversion.go
new file mode 100644
index 000000000..d33d93779
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_conversion.go
@@ -0,0 +1,34 @@
+/*
+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 v1beta1
+
+import (
+ "context"
+ "fmt"
+
+ "knative.dev/pkg/apis"
+)
+
+// ConvertTo implements apis.Convertible
+func (source *PingSource) ConvertTo(ctx context.Context, sink apis.Convertible) error {
+ return fmt.Errorf("v1beta1 is the highest known version, got: %T", sink)
+}
+
+// ConvertFrom implements apis.Convertible
+func (sink *PingSource) ConvertFrom(ctx context.Context, source apis.Convertible) error {
+ return fmt.Errorf("v1beta1 is the highest known version, got: %T", source)
+}
diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_defaults.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_defaults.go
new file mode 100644
index 000000000..9fef43260
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_defaults.go
@@ -0,0 +1,35 @@
+/*
+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 v1beta1
+
+import (
+ "context"
+)
+
+const (
+ defaultSchedule = "* * * * *"
+)
+
+func (s *PingSource) SetDefaults(ctx context.Context) {
+ s.Spec.SetDefaults(ctx)
+}
+
+func (ss *PingSourceSpec) SetDefaults(ctx context.Context) {
+ if ss.Schedule == "" {
+ ss.Schedule = defaultSchedule
+ }
+}
diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_lifecycle.go
new file mode 100644
index 000000000..ad9343278
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_lifecycle.go
@@ -0,0 +1,117 @@
+/*
+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 v1beta1
+
+import (
+ "fmt"
+
+ appsv1 "k8s.io/api/apps/v1"
+ corev1 "k8s.io/api/core/v1"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "knative.dev/pkg/apis"
+)
+
+const (
+ // PingSourceConditionReady has status True when the PingSource is ready to send events.
+ PingSourceConditionReady = apis.ConditionReady
+
+ // PingSourceConditionSinkProvided has status True when the PingSource has been configured with a sink target.
+ PingSourceConditionSinkProvided apis.ConditionType = "SinkProvided"
+
+ // PingSourceConditionDeployed has status True when the PingSource has had it's receive adapter deployment created.
+ PingSourceConditionDeployed apis.ConditionType = "Deployed"
+)
+
+var PingSourceCondSet = apis.NewLivingConditionSet(
+ PingSourceConditionSinkProvided,
+ PingSourceConditionDeployed)
+
+// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
+func (*PingSource) GetConditionSet() apis.ConditionSet {
+ return PingSourceCondSet
+}
+
+// PingSourceSource returns the PingSource CloudEvent source.
+func PingSourceSource(namespace, name string) string {
+ return fmt.Sprintf("/apis/v1/namespaces/%s/pingsources/%s", namespace, name)
+}
+
+// GetUntypedSpec returns the spec of the PingSource.
+func (s *PingSource) GetUntypedSpec() interface{} {
+ return s.Spec
+}
+
+// GetGroupVersionKind returns the GroupVersionKind.
+func (s *PingSource) GetGroupVersionKind() schema.GroupVersionKind {
+ return SchemeGroupVersion.WithKind("PingSource")
+}
+
+// GetCondition returns the condition currently associated with the given type, or nil.
+func (s *PingSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition {
+ return PingSourceCondSet.Manage(s).GetCondition(t)
+}
+
+// GetTopLevelCondition returns the top level Condition.
+func (ps *PingSourceStatus) GetTopLevelCondition() *apis.Condition {
+ return PingSourceCondSet.Manage(ps).GetTopLevelCondition()
+}
+
+// IsReady returns true if the resource is ready overall.
+func (s *PingSourceStatus) IsReady() bool {
+ return PingSourceCondSet.Manage(s).IsHappy()
+}
+
+// InitializeConditions sets relevant unset conditions to Unknown state.
+func (s *PingSourceStatus) InitializeConditions() {
+ PingSourceCondSet.Manage(s).InitializeConditions()
+}
+
+// MarkSink sets the condition that the source has a sink configured.
+func (s *PingSourceStatus) MarkSink(uri *apis.URL) {
+ s.SinkURI = uri
+ if uri != nil {
+ PingSourceCondSet.Manage(s).MarkTrue(PingSourceConditionSinkProvided)
+ } else {
+ PingSourceCondSet.Manage(s).MarkFalse(PingSourceConditionSinkProvided, "SinkEmpty", "Sink has resolved to empty.")
+ }
+}
+
+// MarkNoSink sets the condition that the source does not have a sink configured.
+func (s *PingSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{}) {
+ PingSourceCondSet.Manage(s).MarkFalse(PingSourceConditionSinkProvided, reason, messageFormat, messageA...)
+}
+
+// PropagateDeploymentAvailability uses the availability of the provided Deployment to determine if
+// PingSourceConditionDeployed should be marked as true or false.
+func (s *PingSourceStatus) PropagateDeploymentAvailability(d *appsv1.Deployment) {
+ deploymentAvailableFound := false
+ for _, cond := range d.Status.Conditions {
+ if cond.Type == appsv1.DeploymentAvailable {
+ deploymentAvailableFound = true
+ if cond.Status == corev1.ConditionTrue {
+ PingSourceCondSet.Manage(s).MarkTrue(PingSourceConditionDeployed)
+ } else if cond.Status == corev1.ConditionFalse {
+ PingSourceCondSet.Manage(s).MarkFalse(PingSourceConditionDeployed, cond.Reason, cond.Message)
+ } else if cond.Status == corev1.ConditionUnknown {
+ PingSourceCondSet.Manage(s).MarkUnknown(PingSourceConditionDeployed, cond.Reason, cond.Message)
+ }
+ }
+ }
+ if !deploymentAvailableFound {
+ PingSourceCondSet.Manage(s).MarkUnknown(PingSourceConditionDeployed, "DeploymentUnavailable", "The Deployment '%s' is unavailable.", d.Name)
+ }
+}
diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_types.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_types.go
new file mode 100644
index 000000000..94781424b
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_types.go
@@ -0,0 +1,102 @@
+/*
+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 v1beta1
+
+import (
+ "knative.dev/pkg/apis"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ duckv1 "knative.dev/pkg/apis/duck/v1"
+ "knative.dev/pkg/kmeta"
+)
+
+// +genclient
+// +genreconciler
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:defaulter-gen=true
+
+// PingSource is the Schema for the PingSources API.
+type PingSource struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec PingSourceSpec `json:"spec,omitempty"`
+ Status PingSourceStatus `json:"status,omitempty"`
+}
+
+// Check the interfaces that PingSource should be implementing.
+var (
+ _ runtime.Object = (*PingSource)(nil)
+ _ kmeta.OwnerRefable = (*PingSource)(nil)
+ _ apis.Validatable = (*PingSource)(nil)
+ _ apis.Defaultable = (*PingSource)(nil)
+ _ apis.HasSpec = (*PingSource)(nil)
+ _ duckv1.KRShaped = (*PingSource)(nil)
+)
+
+// PingSourceSpec defines the desired state of the PingSource.
+type PingSourceSpec struct {
+ // inherits duck/v1 SourceSpec, which currently provides:
+ // * Sink - a reference to an object that will resolve to a domain name or
+ // a URI directly to use as the sink.
+ // * CloudEventOverrides - defines overrides to control the output format
+ // and modifications of the event sent to the sink.
+ duckv1.SourceSpec `json:",inline"`
+
+ // Schedule is the cronjob schedule. Defaults to `* * * * *`.
+ // +optional
+ Schedule string `json:"schedule,omitempty"`
+
+ // Timezone modifies the actual time relative to the specified timezone.
+ // Defaults to the system time zone.
+ // More general information about time zones: https://www.iana.org/time-zones
+ // List of valid timezone values: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+ Timezone string `json:"timezone,omitempty`
+
+ // JsonData is json encoded data used as the body of the event posted to
+ // the sink. Default is empty. If set, datacontenttype will also be set
+ // to "application/json".
+ // +optional
+ JsonData string `json:"jsonData,omitempty"`
+}
+
+// PingSourceStatus defines the observed state of PingSource.
+type PingSourceStatus struct {
+ // inherits duck/v1 SourceStatus, which currently provides:
+ // * ObservedGeneration - the 'Generation' of the Service that was last
+ // processed by the controller.
+ // * Conditions - the latest available observations of a resource's current
+ // state.
+ // * SinkURI - the current active sink URI that has been configured for the
+ // Source.
+ duckv1.SourceStatus `json:",inline"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// PingSourceList contains a list of PingSources.
+type PingSourceList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []PingSource `json:"items"`
+}
+
+// GetStatus retrieves the status of the PingSource. Implements the KRShaped interface.
+func (p *PingSource) GetStatus() *duckv1.Status {
+ return &p.Status.Status
+}
diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_validation.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_validation.go
new file mode 100644
index 000000000..e65ceacba
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/ping_validation.go
@@ -0,0 +1,53 @@
+/*
+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 v1beta1
+
+import (
+ "context"
+ "strings"
+
+ "github.com/robfig/cron/v3"
+ "knative.dev/pkg/apis"
+)
+
+func (c *PingSource) Validate(ctx context.Context) *apis.FieldError {
+ return c.Spec.Validate(ctx).ViaField("spec")
+}
+
+func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError {
+ var errs *apis.FieldError
+
+ schedule := cs.Schedule
+ if cs.Timezone != "" {
+ schedule = "CRON_TZ=" + cs.Timezone + " " + schedule
+ }
+
+ if _, err := cron.ParseStandard(schedule); err != nil {
+ if strings.HasPrefix(err.Error(), "provided bad location") {
+ fe := apis.ErrInvalidValue(err, "timezone")
+ errs = errs.Also(fe)
+ } else {
+ fe := apis.ErrInvalidValue(err, "schedule")
+ errs = errs.Also(fe)
+ }
+ }
+
+ if fe := cs.Sink.Validate(ctx); fe != nil {
+ errs = errs.Also(fe.ViaField("sink"))
+ }
+ return errs
+}
diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/zz_generated.deepcopy.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/zz_generated.deepcopy.go
index 74fd3d497..c749fddbb 100644
--- a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta1/zz_generated.deepcopy.go
@@ -265,6 +265,101 @@ func (in *ContainerSourceStatus) DeepCopy() *ContainerSourceStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PingSource) DeepCopyInto(out *PingSource) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingSource.
+func (in *PingSource) DeepCopy() *PingSource {
+ if in == nil {
+ return nil
+ }
+ out := new(PingSource)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *PingSource) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PingSourceList) DeepCopyInto(out *PingSourceList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PingSource, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingSourceList.
+func (in *PingSourceList) DeepCopy() *PingSourceList {
+ if in == nil {
+ return nil
+ }
+ out := new(PingSourceList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *PingSourceList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PingSourceSpec) DeepCopyInto(out *PingSourceSpec) {
+ *out = *in
+ in.SourceSpec.DeepCopyInto(&out.SourceSpec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingSourceSpec.
+func (in *PingSourceSpec) DeepCopy() *PingSourceSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(PingSourceSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PingSourceStatus) DeepCopyInto(out *PingSourceStatus) {
+ *out = *in
+ in.SourceStatus.DeepCopyInto(&out.SourceStatus)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingSourceStatus.
+func (in *PingSourceStatus) DeepCopy() *PingSourceStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(PingSourceStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SinkBinding) DeepCopyInto(out *SinkBinding) {
*out = *in
diff --git a/vendor/knative.dev/pkg/apis/contexts.go b/vendor/knative.dev/pkg/apis/contexts.go
index b71878fd0..4e8b60d6a 100644
--- a/vendor/knative.dev/pkg/apis/contexts.go
+++ b/vendor/knative.dev/pkg/apis/contexts.go
@@ -214,7 +214,8 @@ func IsDifferentNamespaceAllowed(ctx context.Context) bool {
return ctx.Value(allowDifferentNamespace{}) != nil
}
-// This is attached to contexts passed to webhook interfaces when the user has request DryRun mode.
+// This is attached to contexts passed to webhook interfaces when the user
+// has requested DryRun mode.
type isDryRun struct{}
// WithDryRun is used to indicate that this call is in DryRun mode.
diff --git a/vendor/knative.dev/pkg/apis/duck/proxy.go b/vendor/knative.dev/pkg/apis/duck/proxy.go
deleted file mode 100644
index 85a795c36..000000000
--- a/vendor/knative.dev/pkg/apis/duck/proxy.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-Copyright 2018 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 duck
-
-import (
- "sync"
-
- "k8s.io/apimachinery/pkg/watch"
-)
-
-// NewProxyWatcher is based on the same concept from Kubernetes apimachinery in 1.12 here:
-// https://github.com/kubernetes/apimachinery/blob/c6dd271be/pkg/watch/watch.go#L272
-// Replace this copy once we've update our client libraries.
-
-// proxyWatcher lets you wrap your channel in watch.Interface. Threadsafe.
-type proxyWatcher struct {
- result chan watch.Event
- stopCh chan struct{}
-
- mutex sync.Mutex
- stopped bool
-}
-
-var _ watch.Interface = (*proxyWatcher)(nil)
-
-// NewProxyWatcher creates new proxyWatcher by wrapping a channel
-func NewProxyWatcher(ch chan watch.Event) watch.Interface {
- return &proxyWatcher{
- result: ch,
- stopCh: make(chan struct{}),
- stopped: false,
- }
-}
-
-// Stop implements Interface
-func (pw *proxyWatcher) Stop() {
- pw.mutex.Lock()
- defer pw.mutex.Unlock()
- if !pw.stopped {
- pw.stopped = true
- close(pw.stopCh)
- }
-}
-
-// Stopping returns true if Stop() has been called
-func (pw *proxyWatcher) Stopping() bool {
- pw.mutex.Lock()
- defer pw.mutex.Unlock()
- return pw.stopped
-}
-
-// ResultChan implements watch.Interface
-func (pw *proxyWatcher) ResultChan() <-chan watch.Event {
- return pw.result
-}
-
-// StopChan returns stop channel
-func (pw *proxyWatcher) StopChan() <-chan struct{} {
- return pw.stopCh
-}
diff --git a/vendor/knative.dev/pkg/apis/duck/typed.go b/vendor/knative.dev/pkg/apis/duck/typed.go
index 5e1644a93..d6fa03451 100644
--- a/vendor/knative.dev/pkg/apis/duck/typed.go
+++ b/vendor/knative.dev/pkg/apis/duck/typed.go
@@ -134,6 +134,6 @@ func AsStructuredWatcher(wf cache.WatchFunc, obj runtime.Object) cache.WatchFunc
}
}()
- return NewProxyWatcher(structuredCh), nil
+ return watch.NewProxyWatcher(structuredCh), nil
}
}
diff --git a/vendor/knative.dev/pkg/apis/volatile_time.go b/vendor/knative.dev/pkg/apis/volatile_time.go
index d735ada99..b114294bf 100644
--- a/vendor/knative.dev/pkg/apis/volatile_time.go
+++ b/vendor/knative.dev/pkg/apis/volatile_time.go
@@ -29,7 +29,7 @@ import (
// Note, go-cmp will still return inequality, see unit test if you
// need this behavior for go-cmp.
type VolatileTime struct {
- Inner metav1.Time
+ Inner metav1.Time `json:",inline"`
}
// MarshalJSON implements the json.Marshaler interface.
diff --git a/vendor/knative.dev/pkg/ptr/ptr.go b/vendor/knative.dev/pkg/ptr/ptr.go
index a3bfef85c..6d5eeaab6 100644
--- a/vendor/knative.dev/pkg/ptr/ptr.go
+++ b/vendor/knative.dev/pkg/ptr/ptr.go
@@ -30,6 +30,18 @@ func Int64(i int64) *int64 {
return &i
}
+// Float32 is a helper for turning floats into pointers for use in
+// API types that want *float32.
+func Float32(f float32) *float32 {
+ return &f
+}
+
+// Float64 is a helper for turning floats into pointers for use in
+// API types that want *float64.
+func Float64(f float64) *float64 {
+ return &f
+}
+
// Bool is a helper for turning bools into pointers for use in
// API types that want *bool.
func Bool(b bool) *bool {
diff --git a/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/pa_lifecycle.go b/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/pa_lifecycle.go
index 2d424874f..0f8393f8c 100644
--- a/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/pa_lifecycle.go
+++ b/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/pa_lifecycle.go
@@ -31,6 +31,7 @@ import (
var podCondSet = apis.NewLivingConditionSet(
PodAutoscalerConditionActive,
PodAutoscalerConditionScaleTargetInitialized,
+ PodAutoscalerSKSReady,
)
// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
@@ -185,6 +186,16 @@ func (pas *PodAutoscalerStatus) MarkScaleTargetInitialized() {
podCondSet.Manage(pas).MarkTrue(PodAutoscalerConditionScaleTargetInitialized)
}
+// MarkSKSReady marks the PA condition denoting that SKS is ready.
+func (pas *PodAutoscalerStatus) MarkSKSReady() {
+ podCondSet.Manage(pas).MarkTrue(PodAutoscalerSKSReady)
+}
+
+// MarkSKSNotReady marks the PA condation that SKS is not yet ready.
+func (pas *PodAutoscalerStatus) MarkSKSNotReady(mes string) {
+ podCondSet.Manage(pas).MarkUnknown(PodAutoscalerSKSReady, "NotReady", mes)
+}
+
// GetCondition gets the condition `t`.
func (pas *PodAutoscalerStatus) GetCondition(t apis.ConditionType) *apis.Condition {
return podCondSet.Manage(pas).GetCondition(t)
@@ -224,37 +235,32 @@ func (pas *PodAutoscalerStatus) MarkResourceFailedCreation(kind, name string) {
fmt.Sprintf("Failed to create %s %q.", kind, name))
}
-// CanScaleToZero checks whether the pod autoscaler has been in an inactive state
-// for at least the specified grace period.
-func (pas *PodAutoscalerStatus) CanScaleToZero(now time.Time, gracePeriod time.Duration) bool {
- return pas.InactiveFor(now) >= gracePeriod
-}
-
// InactiveFor returns the time PA spent being inactive.
func (pas *PodAutoscalerStatus) InactiveFor(now time.Time) time.Duration {
- return pas.inStatusFor(corev1.ConditionFalse, now, 0)
+ return pas.inStatusFor(corev1.ConditionFalse, now)
}
// ActiveFor returns the time PA spent being active.
func (pas *PodAutoscalerStatus) ActiveFor(now time.Time) time.Duration {
- return pas.inStatusFor(corev1.ConditionTrue, now, 0)
+ return pas.inStatusFor(corev1.ConditionTrue, now)
}
// CanFailActivation checks whether the pod autoscaler has been activating
// for at least the specified idle period.
func (pas *PodAutoscalerStatus) CanFailActivation(now time.Time, idlePeriod time.Duration) bool {
- return pas.inStatusFor(corev1.ConditionUnknown, now, idlePeriod) > 0
+ return pas.inStatusFor(corev1.ConditionUnknown, now) > idlePeriod
}
-// inStatusFor returns positive duration if the PodAutoscalerStatus's Active condition has stayed in
-// the specified status for at least the specified duration. Otherwise it returns negative duration,
-// including when the status is undetermined (Active condition is not found.)
-func (pas *PodAutoscalerStatus) inStatusFor(status corev1.ConditionStatus, now time.Time, dur time.Duration) time.Duration {
+// inStatusFor returns the duration that the PodAutoscalerStatus's Active
+// condition has stayed in the specified status.
+// inStatusFor will return -1 if condition is not initialized or current
+// status is different.
+func (pas *PodAutoscalerStatus) inStatusFor(status corev1.ConditionStatus, now time.Time) time.Duration {
cond := pas.GetCondition(PodAutoscalerConditionActive)
if cond == nil || cond.Status != status {
return -1
}
- return now.Sub(cond.LastTransitionTime.Inner.Add(dur))
+ return now.Sub(cond.LastTransitionTime.Inner.Time)
}
// GetDesiredScale returns the desired scale if ever set, or -1.
diff --git a/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/pa_types.go b/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/pa_types.go
index 163189eca..ac8dd277b 100644
--- a/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/pa_types.go
+++ b/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/pa_types.go
@@ -117,6 +117,8 @@ const (
PodAutoscalerConditionScaleTargetInitialized apis.ConditionType = "ScaleTargetInitialized"
// PodAutoscalerConditionActive is set when the PodAutoscaler's ScaleTargetRef is receiving traffic.
PodAutoscalerConditionActive apis.ConditionType = "Active"
+ // PodAutoscalerCondtionDependenciesReady is set when SKS is ready.
+ PodAutoscalerSKSReady = "SKSReady"
)
// PodAutoscalerStatus communicates the observed state of the PodAutoscaler (from the controller).
diff --git a/vendor/knative.dev/serving/pkg/apis/config/features.go b/vendor/knative.dev/serving/pkg/apis/config/features.go
index c2f471272..bd33649d2 100644
--- a/vendor/knative.dev/serving/pkg/apis/config/features.go
+++ b/vendor/knative.dev/serving/pkg/apis/config/features.go
@@ -43,7 +43,7 @@ func defaultFeaturesConfig() *Features {
MultiContainer: Disabled,
PodSpecAffinity: Disabled,
PodSpecFieldRef: Disabled,
- PodSpecDryRun: Enabled,
+ PodSpecDryRun: Allowed,
PodSpecNodeSelector: Disabled,
PodSpecTolerations: Disabled,
ResponsiveRevisionGC: Disabled,
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/metadata_validation.go b/vendor/knative.dev/serving/pkg/apis/serving/metadata_validation.go
index a4eef1b33..0af0e595a 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/metadata_validation.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/metadata_validation.go
@@ -40,6 +40,7 @@ var (
RoutingStateModifiedAnnotationKey,
GroupNamePrefix+"forceUpgrade",
RevisionPreservedAnnotationKey,
+ RoutesAnnotationKey,
)
)
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/register.go b/vendor/knative.dev/serving/pkg/apis/serving/register.go
index 48120c817..94eb21cef 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/register.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/register.go
@@ -47,6 +47,10 @@ const (
// triggered their creation.
RouteLabelKey = GroupName + "/route"
+ // RoutesAnnotationKey is an annotation attached to a Revision to indicate that it is
+ // referenced by one or many routes. The value is a comma separated list of Route names.
+ RoutesAnnotationKey = GroupName + "/routes"
+
// RoutingStateLabelKey is the label attached to a Revision indicating
// its state in relation to serving a Route.
RoutingStateLabelKey = GroupName + "/routingState"
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1/configuration_validation.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/configuration_validation.go
index c273d2ae5..cc5a3811f 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1/configuration_validation.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/configuration_validation.go
@@ -73,14 +73,17 @@ func (csf *ConfigurationStatusFields) Validate(ctx context.Context) *apis.FieldE
// validateLabels function validates configuration labels
func (c *Configuration) validateLabels() (errs *apis.FieldError) {
for key, val := range c.GetLabels() {
- switch {
- case key == serving.VisibilityLabelKey:
+ switch key {
+ case serving.RouteLabelKey:
+ // Known valid labels.
+ case serving.VisibilityLabelKey:
errs = errs.Also(validateClusterVisibilityLabel(val))
- case key == serving.RouteLabelKey:
- case key == serving.ServiceLabelKey:
+ case serving.ServiceLabelKey:
errs = errs.Also(verifyLabelOwnerRef(val, serving.ServiceLabelKey, "Service", c.GetOwnerReferences()))
- case strings.HasPrefix(key, serving.GroupNamePrefix):
- errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
+ default:
+ if strings.HasPrefix(key, serving.GroupNamePrefix) {
+ errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
+ }
}
}
return
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_helpers.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_helpers.go
index a87d8614e..aed77f37a 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_helpers.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_helpers.go
@@ -113,7 +113,7 @@ func (rs *RevisionSpec) GetContainer() *corev1.Container {
// routingStateModified annotation.
func (r *Revision) SetRoutingState(state RoutingState, clock clock.Clock) {
stateStr := string(state)
- if t := r.ObjectMeta.Annotations[serving.RoutingStateModifiedAnnotationKey]; t != "" &&
+ if t := r.Annotations[serving.RoutingStateModifiedAnnotationKey]; t != "" &&
r.Labels[serving.RoutingStateLabelKey] == stateStr {
return // Don't update timestamp if no change.
}
@@ -134,12 +134,12 @@ func RoutingStateModifiedString(clock clock.Clock) string {
// GetRoutingState retrieves the RoutingState label.
func (r *Revision) GetRoutingState() RoutingState {
- return RoutingState(r.ObjectMeta.Labels[serving.RoutingStateLabelKey])
+ return RoutingState(r.Labels[serving.RoutingStateLabelKey])
}
// GetRoutingStateModified retrieves the RoutingStateModified annotation.
func (r *Revision) GetRoutingStateModified() time.Time {
- val := r.ObjectMeta.Annotations[serving.RoutingStateModifiedAnnotationKey]
+ val := r.Annotations[serving.RoutingStateModifiedAnnotationKey]
if val == "" {
return time.Time{}
}
@@ -152,7 +152,8 @@ func (r *Revision) GetRoutingStateModified() time.Time {
// IsReachable returns whether or not the revision can be reached by a route.
func (r *Revision) IsReachable() bool {
- return r.ObjectMeta.Labels[serving.RouteLabelKey] != ""
+ return r.Labels[serving.RouteLabelKey] != "" ||
+ RoutingState(r.Labels[serving.RoutingStateLabelKey]) == RoutingStateActive
}
// GetProtocol returns the app level network protocol.
@@ -174,11 +175,11 @@ func (r *Revision) GetProtocol() (p net.ProtocolType) {
// SetLastPinned sets the revision's last pinned annotations
// to be the specified time.
func (r *Revision) SetLastPinned(t time.Time) {
- if r.ObjectMeta.Annotations == nil {
- r.ObjectMeta.Annotations = make(map[string]string, 1)
+ if r.Annotations == nil {
+ r.Annotations = make(map[string]string, 1)
}
- r.ObjectMeta.Annotations[serving.RevisionLastPinnedAnnotationKey] = RevisionLastPinnedString(t)
+ r.Annotations[serving.RevisionLastPinnedAnnotationKey] = RevisionLastPinnedString(t)
}
// GetLastPinned returns the time the revision was last pinned.
@@ -189,7 +190,7 @@ func (r *Revision) GetLastPinned() (time.Time, error) {
}
}
- str, ok := r.ObjectMeta.Annotations[serving.RevisionLastPinnedAnnotationKey]
+ str, ok := r.Annotations[serving.RevisionLastPinnedAnnotationKey]
if !ok {
// If a revision is past the create delay without an annotation it is stale.
return time.Time{}, LastPinnedParseError{
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_validation.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_validation.go
index 3d12032b3..010fb853b 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_validation.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_validation.go
@@ -120,10 +120,11 @@ func (rs *RevisionStatus) Validate(ctx context.Context) *apis.FieldError {
func (r *Revision) ValidateLabels() (errs *apis.FieldError) {
for key, val := range r.GetLabels() {
switch key {
- case serving.RoutingStateLabelKey:
- case serving.RouteLabelKey:
- case serving.ServiceLabelKey:
- case serving.ConfigurationGenerationLabelKey:
+ case serving.RoutingStateLabelKey,
+ serving.RouteLabelKey,
+ serving.ServiceLabelKey,
+ serving.ConfigurationGenerationLabelKey:
+ // Known valid labels.
case serving.ConfigurationLabelKey:
errs = errs.Also(verifyLabelOwnerRef(val, serving.ConfigurationLabelKey, "Configuration", r.GetOwnerReferences()))
default:
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1/route_validation.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/route_validation.go
index a6b35dccb..e9d2ba2f9 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1/route_validation.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/route_validation.go
@@ -216,13 +216,15 @@ func validateClusterVisibilityLabel(label string) (errs *apis.FieldError) {
// validateLabels function validates route labels.
func (r *Route) validateLabels() (errs *apis.FieldError) {
for key, val := range r.GetLabels() {
- switch {
- case key == serving.VisibilityLabelKey:
+ switch key {
+ case serving.VisibilityLabelKey:
errs = errs.Also(validateClusterVisibilityLabel(val))
- case key == serving.ServiceLabelKey:
+ case serving.ServiceLabelKey:
errs = errs.Also(verifyLabelOwnerRef(val, serving.ServiceLabelKey, "Service", r.GetOwnerReferences()))
- case strings.HasPrefix(key, serving.GroupNamePrefix):
- errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
+ default:
+ if strings.HasPrefix(key, serving.GroupNamePrefix) {
+ errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
+ }
}
}
return
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go b/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go
index 811a81193..363a48db6 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go
@@ -286,11 +286,11 @@ func RevisionLastPinnedString(t time.Time) string {
}
func (r *Revision) SetLastPinned(t time.Time) {
- if r.ObjectMeta.Annotations == nil {
- r.ObjectMeta.Annotations = make(map[string]string, 1)
+ if r.Annotations == nil {
+ r.Annotations = make(map[string]string, 1)
}
- r.ObjectMeta.Annotations[serving.RevisionLastPinnedAnnotationKey] = RevisionLastPinnedString(t)
+ r.Annotations[serving.RevisionLastPinnedAnnotationKey] = RevisionLastPinnedString(t)
}
func (r *Revision) GetLastPinned() (time.Time, error) {
@@ -300,7 +300,7 @@ func (r *Revision) GetLastPinned() (time.Time, error) {
}
}
- str, ok := r.ObjectMeta.Annotations[serving.RevisionLastPinnedAnnotationKey]
+ str, ok := r.Annotations[serving.RevisionLastPinnedAnnotationKey]
if !ok {
// If a revision is past the create delay without an annotation it is stale
return time.Time{}, LastPinnedParseError{
@@ -320,11 +320,6 @@ func (r *Revision) GetLastPinned() (time.Time, error) {
return time.Unix(secs, 0), nil
}
-// IsReachable returns whether or not the revision can be reached by a route.
-func (r *Revision) IsReachable() bool {
- return r.ObjectMeta.Labels[serving.RouteLabelKey] != ""
-}
-
// PropagateDeploymentStatus takes the Deployment status and applies its values
// to the Revision status.
func (rs *RevisionStatus) PropagateDeploymentStatus(original *appsv1.DeploymentStatus) {
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/configuration_validation.go b/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/configuration_validation.go
index c896cab94..fbc2a9666 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/configuration_validation.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/configuration_validation.go
@@ -58,14 +58,17 @@ func (c *Configuration) Validate(ctx context.Context) (errs *apis.FieldError) {
// validateLabels function validates configuration labels
func (c *Configuration) validateLabels() (errs *apis.FieldError) {
for key, val := range c.GetLabels() {
- switch {
- case key == serving.VisibilityLabelKey:
+ switch key {
+ case serving.RouteLabelKey:
+ // Known valid labels.
+ case serving.VisibilityLabelKey:
errs = errs.Also(serving.ValidateClusterVisibilityLabel(val))
- case key == serving.RouteLabelKey:
- case key == serving.ServiceLabelKey:
+ case serving.ServiceLabelKey:
errs = errs.Also(verifyLabelOwnerRef(val, serving.ServiceLabelKey, "Service", c.GetOwnerReferences()))
- case strings.HasPrefix(key, serving.GroupNamePrefix):
- errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
+ default:
+ if strings.HasPrefix(key, serving.GroupNamePrefix) {
+ errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
+ }
}
}
return
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/revision_validation.go b/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/revision_validation.go
index 974e42a91..426ee3765 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/revision_validation.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/revision_validation.go
@@ -56,12 +56,17 @@ func (r *Revision) Validate(ctx context.Context) *apis.FieldError {
// ValidateLabels function validates service labels
func (r *Revision) ValidateLabels() (errs *apis.FieldError) {
for key, val := range r.GetLabels() {
- switch {
- case key == serving.RouteLabelKey || key == serving.ServiceLabelKey || key == serving.ConfigurationGenerationLabelKey:
- case key == serving.ConfigurationLabelKey:
+ switch key {
+ case serving.RouteLabelKey,
+ serving.ServiceLabelKey,
+ serving.ConfigurationGenerationLabelKey:
+ // Known valid labels.
+ case serving.ConfigurationLabelKey:
errs = errs.Also(verifyLabelOwnerRef(val, serving.ConfigurationLabelKey, "Configuration", r.GetOwnerReferences()))
- case strings.HasPrefix(key, serving.GroupNamePrefix):
- errs = errs.Also(apis.ErrInvalidKeyName(key, ""))
+ default:
+ if strings.HasPrefix(key, serving.GroupNamePrefix) {
+ errs = errs.Also(apis.ErrInvalidKeyName(key, ""))
+ }
}
}
return
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/route_validation.go b/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/route_validation.go
index 787c4bc5e..cd2832170 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/route_validation.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/route_validation.go
@@ -46,13 +46,15 @@ func (r *Route) Validate(ctx context.Context) *apis.FieldError {
// validateLabels function validates route labels.
func (r *Route) validateLabels() (errs *apis.FieldError) {
for key, val := range r.GetLabels() {
- switch {
- case key == serving.VisibilityLabelKey:
+ switch key {
+ case serving.VisibilityLabelKey:
errs = errs.Also(serving.ValidateClusterVisibilityLabel(val))
- case key == serving.ServiceLabelKey:
+ case serving.ServiceLabelKey:
errs = errs.Also(verifyLabelOwnerRef(val, serving.ServiceLabelKey, "Service", r.GetOwnerReferences()))
- case strings.HasPrefix(key, serving.GroupNamePrefix):
- errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
+ default:
+ if strings.HasPrefix(key, serving.GroupNamePrefix) {
+ errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
+ }
}
}
return
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 7ec11f453..caef97b08 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,4 +1,4 @@
-# cloud.google.com/go v0.61.0
+# cloud.google.com/go v0.62.0
cloud.google.com/go/compute/metadata
# github.com/PuerkitoBio/purell v1.1.1
github.com/PuerkitoBio/purell
@@ -138,7 +138,7 @@ go.uber.org/zap/internal/bufferpool
go.uber.org/zap/internal/color
go.uber.org/zap/internal/exit
go.uber.org/zap/zapcore
-# golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
+# golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
## explicit
golang.org/x/crypto/ssh/terminal
# golang.org/x/mod v0.3.0
@@ -157,7 +157,7 @@ golang.org/x/oauth2/google
golang.org/x/oauth2/internal
golang.org/x/oauth2/jws
golang.org/x/oauth2/jwt
-# golang.org/x/sys v0.0.0-20200722175500-76b94024e4b6
+# golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
golang.org/x/sys/windows
@@ -175,7 +175,7 @@ golang.org/x/text/unicode/norm
golang.org/x/text/width
# golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
golang.org/x/time/rate
-# golang.org/x/tools v0.0.0-20200723000907-a7c6fd066f6d
+# golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/imports
golang.org/x/tools/internal/event
@@ -605,7 +605,7 @@ k8s.io/kube-openapi/pkg/util/sets
k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/trace
-# knative.dev/eventing v0.16.1-0.20200724032657-8d83431c07bd
+# knative.dev/eventing v0.16.1-0.20200803090001-4cd17b80636f
## explicit
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/configs
@@ -633,11 +633,11 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake
knative.dev/eventing/pkg/logging
-# knative.dev/networking v0.0.0-20200723155758-cc457d7322d6
+# knative.dev/networking v0.0.0-20200801232901-0a0cf9380a8d
knative.dev/networking/pkg/apis/config
knative.dev/networking/pkg/apis/networking
knative.dev/networking/pkg/apis/networking/v1alpha1
-# knative.dev/pkg v0.0.0-20200724211057-f21f66204a5c
+# knative.dev/pkg v0.0.0-20200804051227-c3c869a34475
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
@@ -655,7 +655,7 @@ knative.dev/pkg/logging/logkey
knative.dev/pkg/profiling
knative.dev/pkg/ptr
knative.dev/pkg/tracker
-# knative.dev/serving v0.16.1-0.20200724203457-1517b1735305
+# knative.dev/serving v0.16.1-0.20200804124127-08d681889306
## explicit
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1