From b61d0733a3a875f5446d3c1bd8ecc1876e67285b Mon Sep 17 00:00:00 2001 From: Dax McDonald Date: Wed, 21 Aug 2019 17:11:16 -0700 Subject: [PATCH] Update vendor --- go.mod | 2 +- go.sum | 4 ++-- .../rancher/norman/generator/controller_template.go | 2 -- .../github.com/rancher/norman/generator/lifecycle_template.go | 4 ++++ vendor/modules.txt | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 9e14cdda..e944894a 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/knative/pkg v0.0.0-20190817231834-12ee58e32cc8 github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/errors v0.8.1 - github.com/rancher/norman v0.0.0-20190819172543-9c5479f6e5ca + github.com/rancher/norman v0.0.0-20190821234528-20a936b685b0 github.com/sirupsen/logrus v1.4.2 k8s.io/api v0.0.0-20190805182251-6c9aa3caf3d6 k8s.io/apiextensions-apiserver v0.0.0-20190805184801-2defa3e98ef1 diff --git a/go.sum b/go.sum index 65d3daf1..790aced7 100644 --- a/go.sum +++ b/go.sum @@ -124,8 +124,8 @@ github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURm github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/rancher/moq v0.0.0-20190404221404-ee5226d43009 h1:Xsxh7fX3+2wAUJtPy8g2lZh0cYuyifqhBL0vxCIYojs= github.com/rancher/moq v0.0.0-20190404221404-ee5226d43009/go.mod h1:wpITyDPTi/Na5h73XkbuEf2AP9fbgrIGqqxVzFhYD6U= -github.com/rancher/norman v0.0.0-20190819172543-9c5479f6e5ca h1:XxMfVvMNcu2UENix8eMTSjKpTeWlJOBwr/NO7/9i6jk= -github.com/rancher/norman v0.0.0-20190819172543-9c5479f6e5ca/go.mod h1:KwP6RD4rVMdK8XK0wqZaptrhTn/TO4kXU3doh4iatQU= +github.com/rancher/norman v0.0.0-20190821234528-20a936b685b0 h1:bNG4b0CTTBE8yEamIz8RYcfz+7kfK9N8YTvyiykRCS8= +github.com/rancher/norman v0.0.0-20190821234528-20a936b685b0/go.mod h1:KwP6RD4rVMdK8XK0wqZaptrhTn/TO4kXU3doh4iatQU= github.com/rancher/pkg v0.0.0-20190514055449-b30ab9de040e h1:j6+HqCET/NLPBtew2m5apL7jWw/PStQ7iGwXjgAqdvo= github.com/rancher/pkg v0.0.0-20190514055449-b30ab9de040e/go.mod h1:XbYHTPaXuw8ZY9bylhYKQh/nJxDaTKk3YhAxPl4Qy/k= github.com/rancher/wrangler v0.1.5 h1:HiXOeP6Kci2DK+e04D1g6INT77xAYpAr54zmTTe0Spk= diff --git a/vendor/github.com/rancher/norman/generator/controller_template.go b/vendor/github.com/rancher/norman/generator/controller_template.go index 123a6158..7e0fda9c 100644 --- a/vendor/github.com/rancher/norman/generator/controller_template.go +++ b/vendor/github.com/rancher/norman/generator/controller_template.go @@ -177,7 +177,6 @@ func (c *{{.schema.ID}}Controller) AddFeatureHandler(ctx context.Context, enable } func (c *{{.schema.ID}}Controller) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler {{.schema.CodeName}}HandlerFunc) { - resource.PutClusterScoped({{.schema.CodeName}}GroupVersionResource) c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) @@ -190,7 +189,6 @@ func (c *{{.schema.ID}}Controller) AddClusterScopedHandler(ctx context.Context, } func (c *{{.schema.ID}}Controller) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler {{.schema.CodeName}}HandlerFunc) { - resource.PutClusterScoped({{.schema.CodeName}}GroupVersionResource) c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil diff --git a/vendor/github.com/rancher/norman/generator/lifecycle_template.go b/vendor/github.com/rancher/norman/generator/lifecycle_template.go index d0a6cf54..9820d1c2 100644 --- a/vendor/github.com/rancher/norman/generator/lifecycle_template.go +++ b/vendor/github.com/rancher/norman/generator/lifecycle_template.go @@ -7,6 +7,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "github.com/rancher/norman/controller" "github.com/rancher/norman/lifecycle" + "github.com/rancher/norman/resource" ) type {{.schema.CodeName}}Lifecycle interface { @@ -54,6 +55,9 @@ func (w *{{.schema.ID}}LifecycleAdapter) Updated(obj runtime.Object) (runtime.Ob } func New{{.schema.CodeName}}LifecycleAdapter(name string, clusterScoped bool, client {{.schema.CodeName}}Interface, l {{.schema.CodeName}}Lifecycle) {{.schema.CodeName}}HandlerFunc { + if clusterScoped { + resource.PutClusterScoped({{.schema.CodeName}}GroupVersionResource) + } adapter := &{{.schema.ID}}LifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) return func(key string, obj *{{.prefix}}{{.schema.CodeName}}) (runtime.Object, error) { diff --git a/vendor/modules.txt b/vendor/modules.txt index fe1df9ae..b6be3fc5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -75,7 +75,7 @@ github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg # github.com/prometheus/procfs v0.0.3 github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs -# github.com/rancher/norman v0.0.0-20190819172543-9c5479f6e5ca +# github.com/rancher/norman v0.0.0-20190821234528-20a936b685b0 github.com/rancher/norman/controller github.com/rancher/norman/lifecycle github.com/rancher/norman/objectclient