diff --git a/go.mod b/go.mod index b9220acb2c58..947d8d79e9d6 100644 --- a/go.mod +++ b/go.mod @@ -37,9 +37,9 @@ require ( k8s.io/code-generator v0.22.5 k8s.io/klog v1.0.0 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 - knative.dev/caching v0.0.0-20220302153644-5a6403ef2de5 - knative.dev/hack v0.0.0-20220224013837-e1785985d364 - knative.dev/networking v0.0.0-20220302134042-e8b2eb995165 - knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77 + knative.dev/caching v0.0.0-20220311005831-b2a3f59d7175 + knative.dev/hack v0.0.0-20220314052818-c9c3ea17a2e9 + knative.dev/networking v0.0.0-20220315020002-1890039ae107 + knative.dev/pkg v0.0.0-20220315095603-616f1ab878c5 sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index 05883427dffd..e0911557dc1c 100644 --- a/go.sum +++ b/go.sum @@ -2134,15 +2134,17 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -knative.dev/caching v0.0.0-20220302153644-5a6403ef2de5 h1:qAenT+xjIkgyp5Gw6OeZpu3kTF0KbqUvd7cx+ojZ1bg= -knative.dev/caching v0.0.0-20220302153644-5a6403ef2de5/go.mod h1:52//2yvw0iO3Nu2duAMI5BzfQKHWiXZuvRvzaypoGkU= -knative.dev/hack v0.0.0-20220224013837-e1785985d364 h1:wOysRDkzacHlM2OEQoM5ayNT+s/Zymzk5Tv17RL++3g= +knative.dev/caching v0.0.0-20220311005831-b2a3f59d7175 h1:axLO6UJS3paEjo2/uH0VNeOSNnjJwOikgc9iwRghGQ0= +knative.dev/caching v0.0.0-20220311005831-b2a3f59d7175/go.mod h1:52//2yvw0iO3Nu2duAMI5BzfQKHWiXZuvRvzaypoGkU= knative.dev/hack v0.0.0-20220224013837-e1785985d364/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/networking v0.0.0-20220302134042-e8b2eb995165 h1:mkUDPTqfRPNhsUTVOH53IOx0Utzlfwl48t8lLc1bfL4= -knative.dev/networking v0.0.0-20220302134042-e8b2eb995165/go.mod h1:EdQTSLl8BDeLLrC8pymGOiPMRAknFg+7oRO6MMUts94= -knative.dev/pkg v0.0.0-20220228195509-fe264173447b/go.mod h1:SsH9J6Gz+CvrHmoL0TELJXmMmohqKSQ5bpJvCv+1+ZI= -knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77 h1:eIH936a0/1X/XQOMN9+O3fw9spGvOJiMVKsBuu8J47U= +knative.dev/hack v0.0.0-20220314052818-c9c3ea17a2e9 h1:s35TVdlERqg7D24LDwTa71KeaYnuWnAvj+Qp/1hXzBo= +knative.dev/hack v0.0.0-20220314052818-c9c3ea17a2e9/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= +knative.dev/networking v0.0.0-20220315020002-1890039ae107 h1:1C2GvauCFKuYFOpQSu8eMli+VXObtMk65E+RlI0eLlk= +knative.dev/networking v0.0.0-20220315020002-1890039ae107/go.mod h1:S5yaT89Z5mmhcuacYHPyB+ANkzKKXZ9xrMwMiUNCxDA= knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77/go.mod h1:SsH9J6Gz+CvrHmoL0TELJXmMmohqKSQ5bpJvCv+1+ZI= +knative.dev/pkg v0.0.0-20220314170718-721abec0a377/go.mod h1:3r6srDeiuiG5DXSGfIe12r2U3Tj5JeeHnQaIXPe/4Zc= +knative.dev/pkg v0.0.0-20220315095603-616f1ab878c5 h1:gisMh15X2xnIUWJOja2BeJh2FrHb7usqZnAHh9QvfKU= +knative.dev/pkg v0.0.0-20220315095603-616f1ab878c5/go.mod h1:3r6srDeiuiG5DXSGfIe12r2U3Tj5JeeHnQaIXPe/4Zc= mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= diff --git a/vendor/knative.dev/pkg/configmap/parse.go b/vendor/knative.dev/pkg/configmap/parse.go index b2f8d4f2044d..e733e3838f6d 100644 --- a/vendor/knative.dev/pkg/configmap/parse.go +++ b/vendor/knative.dev/pkg/configmap/parse.go @@ -245,13 +245,21 @@ func Parse(data map[string]string, parsers ...ParseFunc) error { return nil } -// AsOptionalMap parses the data into the target as a map[string]string, if it exists. +// CollectMapEntriesWithPrefix parses the data into the target as a map[string]string, if it exists. // The map is represented as a list of key-value pairs with a common prefix. -func AsOptionalMap(prefix string, target map[string]string) ParseFunc { +func CollectMapEntriesWithPrefix(prefix string, target *map[string]string) ParseFunc { + if target == nil { + panic("target cannot be nil") + } + return func(data map[string]string) error { for k, v := range data { if strings.HasPrefix(k, prefix) && len(k) > len(prefix)+1 { - target[k[len(prefix)+1: /* remove dot `.` */]] = v + if *target == nil { + m := make(map[string]string, 2) + *target = m + } + (*target)[k[len(prefix)+1: /* remove dot `.` */]] = v } } return nil diff --git a/vendor/knative.dev/pkg/hack/update-codegen.sh b/vendor/knative.dev/pkg/hack/update-codegen.sh index fdf97169e056..970a5af86a45 100644 --- a/vendor/knative.dev/pkg/hack/update-codegen.sh +++ b/vendor/knative.dev/pkg/hack/update-codegen.sh @@ -51,7 +51,7 @@ EXTERNAL_INFORMER_PKG="k8s.io/client-go/informers" \ k8s.io/api \ "${K8S_TYPES}" \ --go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt \ - --force-genreconciler-kinds "Namespace,Deployment,Secret,Pod,CronJob" + --force-genreconciler-kinds "Namespace,Deployment,Secret,Pod,CronJob,NetworkPolicy" OUTPUT_PKG="knative.dev/pkg/client/injection/apiextensions" \ VERSIONED_CLIENTSET_PKG="k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" \ diff --git a/vendor/knative.dev/pkg/leaderelection/config.go b/vendor/knative.dev/pkg/leaderelection/config.go index 3ef47483df7b..11010014a08a 100644 --- a/vendor/knative.dev/pkg/leaderelection/config.go +++ b/vendor/knative.dev/pkg/leaderelection/config.go @@ -57,7 +57,7 @@ func NewConfigFromMap(data map[string]string) (*Config, error) { cm.AsUint32("buckets", &config.Buckets), - cm.AsOptionalMap("map-lease-prefix", config.LeaseNamesPrefixMapping), + cm.CollectMapEntriesWithPrefix("map-lease-prefix", &config.LeaseNamesPrefixMapping), ); err != nil { return nil, err } diff --git a/vendor/modules.txt b/vendor/modules.txt index 1fb01d0e55b2..9410acb4ae79 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1021,7 +1021,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/caching v0.0.0-20220302153644-5a6403ef2de5 +# knative.dev/caching v0.0.0-20220311005831-b2a3f59d7175 ## explicit knative.dev/caching/config knative.dev/caching/pkg/apis/caching @@ -1042,11 +1042,11 @@ knative.dev/caching/pkg/client/injection/informers/caching/v1alpha1/image/fake knative.dev/caching/pkg/client/injection/informers/factory knative.dev/caching/pkg/client/injection/informers/factory/fake knative.dev/caching/pkg/client/listers/caching/v1alpha1 -# knative.dev/hack v0.0.0-20220224013837-e1785985d364 +# knative.dev/hack v0.0.0-20220314052818-c9c3ea17a2e9 ## explicit knative.dev/hack knative.dev/hack/shell -# knative.dev/networking v0.0.0-20220302134042-e8b2eb995165 +# knative.dev/networking v0.0.0-20220315020002-1890039ae107 ## explicit knative.dev/networking/config knative.dev/networking/pkg @@ -1076,7 +1076,7 @@ knative.dev/networking/pkg/client/injection/reconciler/networking/v1alpha1/serve knative.dev/networking/pkg/client/listers/networking/v1alpha1 knative.dev/networking/pkg/ingress knative.dev/networking/pkg/prober -# knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77 +# knative.dev/pkg v0.0.0-20220315095603-616f1ab878c5 ## explicit knative.dev/pkg/apiextensions/storageversion knative.dev/pkg/apiextensions/storageversion/cmd/migrate