Bumping k8s version to 1.13.0-beta.1
This commit is contained in:
140
vendor/k8s.io/code-generator/Godeps/Godeps.json
generated
vendored
140
vendor/k8s.io/code-generator/Godeps/Godeps.json
generated
vendored
@@ -6,38 +6,6 @@
|
||||
"./..."
|
||||
],
|
||||
"Deps": [
|
||||
{
|
||||
"ImportPath": "github.com/PuerkitoBio/purell",
|
||||
"Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/PuerkitoBio/urlesc",
|
||||
"Rev": "5bd2802263f21d8788851d5305584c82a5c75d7e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/emicklei/go-restful",
|
||||
"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/emicklei/go-restful/log",
|
||||
"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-openapi/jsonpointer",
|
||||
"Rev": "ef5f0afec364d3b9396b7b77b43dbe26bf1f8004"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-openapi/jsonreference",
|
||||
"Rev": "8483a886a90412cd6858df4ea3483dce9c8e35a3"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-openapi/spec",
|
||||
"Rev": "5bae59e25b21498baea7f9d46e9c147ec106a42e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-openapi/swag",
|
||||
"Rev": "5899d5c5e619fda5fa86e14795a835f473ca284c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gogo/protobuf/gogoproto",
|
||||
"Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02"
|
||||
@@ -138,74 +106,10 @@
|
||||
"ImportPath": "github.com/gogo/protobuf/vanity/command",
|
||||
"Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/golang/glog",
|
||||
"Rev": "44145f04b68cf362d9c4df2182967c2275eaefed"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mailru/easyjson/buffer",
|
||||
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mailru/easyjson/jlexer",
|
||||
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mailru/easyjson/jwriter",
|
||||
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/pflag",
|
||||
"Rev": "583c0c0531f06d5278b7d917446061adc344b5cd"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/idna",
|
||||
"Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/cases",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/internal",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/internal/tag",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/language",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/runes",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/secure/bidirule",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/secure/precis",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/transform",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/unicode/bidi",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/unicode/norm",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/width",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/tools/go/ast/astutil",
|
||||
"Rev": "2382e3994d48b1d22acc2c86bcad0a2aff028e32"
|
||||
@@ -214,69 +118,49 @@
|
||||
"ImportPath": "golang.org/x/tools/imports",
|
||||
"Rev": "2382e3994d48b1d22acc2c86bcad0a2aff028e32"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/yaml.v2",
|
||||
"Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/args",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/examples/import-boss/generators",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/examples/set-gen/generators",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/examples/set-gen/sets",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/generator",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/namer",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/parser",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/types",
|
||||
"Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/cmd/openapi-gen/args",
|
||||
"Rev": "72693cb1fadd73ae2742f6fe29af77d1aecdd8cd"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "72693cb1fadd73ae2742f6fe29af77d1aecdd8cd"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/generators",
|
||||
"Rev": "72693cb1fadd73ae2742f6fe29af77d1aecdd8cd"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/generators/rules",
|
||||
"Rev": "72693cb1fadd73ae2742f6fe29af77d1aecdd8cd"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util/sets",
|
||||
"Rev": "72693cb1fadd73ae2742f6fe29af77d1aecdd8cd"
|
||||
"ImportPath": "k8s.io/klog",
|
||||
"Rev": "8139d8cb77af419532b33dfa7dd09fbc5f1d344f"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -77,10 +79,15 @@ func (c *clusterTestTypes) Get(name string, options metav1.GetOptions) (result *
|
||||
|
||||
// List takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors.
|
||||
func (c *clusterTestTypes) List(opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.ClusterTestTypeList{}
|
||||
err = c.client.Get().
|
||||
Resource("clustertesttypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,10 +95,15 @@ func (c *clusterTestTypes) List(opts metav1.ListOptions) (result *v1.ClusterTest
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusterTestTypes.
|
||||
func (c *clusterTestTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("clustertesttypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -145,9 +157,14 @@ func (c *clusterTestTypes) Delete(name string, options *metav1.DeleteOptions) er
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusterTestTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("clustertesttypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -76,11 +78,16 @@ func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.Test
|
||||
|
||||
// List takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
||||
func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.TestTypeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,11 +95,16 @@ func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested testTypes.
|
||||
func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -150,10 +162,15 @@ func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package internalversion
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -76,11 +78,16 @@ func (c *testTypes) Get(name string, options v1.GetOptions) (result *example.Tes
|
||||
|
||||
// List takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
||||
func (c *testTypes) List(opts v1.ListOptions) (result *example.TestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &example.TestTypeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,11 +95,16 @@ func (c *testTypes) List(opts v1.ListOptions) (result *example.TestTypeList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested testTypes.
|
||||
func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -150,10 +162,15 @@ func (c *testTypes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *testTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package internalversion
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -76,11 +78,16 @@ func (c *testTypes) Get(name string, options v1.GetOptions) (result *example2.Te
|
||||
|
||||
// List takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
||||
func (c *testTypes) List(opts v1.ListOptions) (result *example2.TestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &example2.TestTypeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,11 +95,16 @@ func (c *testTypes) List(opts v1.ListOptions) (result *example2.TestTypeList, er
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested testTypes.
|
||||
func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -150,10 +162,15 @@ func (c *testTypes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *testTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -76,11 +78,16 @@ func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.Test
|
||||
|
||||
// List takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
||||
func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.TestTypeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,11 +95,16 @@ func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested testTypes.
|
||||
func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -150,10 +162,15 @@ func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -76,11 +78,16 @@ func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.Test
|
||||
|
||||
// List takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
||||
func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.TestTypeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,11 +95,16 @@ func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested testTypes.
|
||||
func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -150,10 +162,15 @@ func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -77,10 +79,15 @@ func (c *clusterTestTypes) Get(name string, options metav1.GetOptions) (result *
|
||||
|
||||
// List takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors.
|
||||
func (c *clusterTestTypes) List(opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.ClusterTestTypeList{}
|
||||
err = c.client.Get().
|
||||
Resource("clustertesttypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,10 +95,15 @@ func (c *clusterTestTypes) List(opts metav1.ListOptions) (result *v1.ClusterTest
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusterTestTypes.
|
||||
func (c *clusterTestTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("clustertesttypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -145,9 +157,14 @@ func (c *clusterTestTypes) Delete(name string, options *metav1.DeleteOptions) er
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusterTestTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("clustertesttypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -76,11 +78,16 @@ func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.Test
|
||||
|
||||
// List takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
||||
func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.TestTypeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,11 +95,16 @@ func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested testTypes.
|
||||
func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -150,10 +162,15 @@ func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -76,11 +78,16 @@ func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.Test
|
||||
|
||||
// List takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
||||
func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.TestTypeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -88,11 +95,16 @@ func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested testTypes.
|
||||
func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -150,10 +162,15 @@ func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("testtypes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
6
vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go
generated
vendored
6
vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go
generated
vendored
@@ -32,7 +32,7 @@ import (
|
||||
"k8s.io/gengo/namer"
|
||||
"k8s.io/gengo/types"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// NameSystems returns the name system used by the generators in this package.
|
||||
@@ -318,12 +318,12 @@ func applyGroupOverrides(universe types.Universe, customArgs *clientgenargs.Cust
|
||||
func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages {
|
||||
boilerplate, err := arguments.LoadGoBoilerplate()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
klog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
}
|
||||
|
||||
customArgs, ok := arguments.CustomArgs.(*clientgenargs.CustomArgs)
|
||||
if !ok {
|
||||
glog.Fatalf("cannot convert arguments.CustomArgs to clientgenargs.CustomArgs")
|
||||
klog.Fatalf("cannot convert arguments.CustomArgs to clientgenargs.CustomArgs")
|
||||
}
|
||||
includedTypesOverrides := customArgs.IncludedTypesOverrides
|
||||
|
||||
|
20
vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go
generated
vendored
20
vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go
generated
vendored
@@ -387,11 +387,16 @@ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client) *$.type|privateP
|
||||
var listTemplate = `
|
||||
// List takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors.
|
||||
func (c *$.type|privatePlural$) List(opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil{
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &$.resultType|raw$List{}
|
||||
err = c.client.Get().
|
||||
$if .namespaced$Namespace(c.ns).$end$
|
||||
Resource("$.type|resource$").
|
||||
VersionedParams(&opts, $.schemeParameterCodec|raw$).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -401,6 +406,10 @@ func (c *$.type|privatePlural$) List(opts $.ListOptions|raw$) (result *$.resultT
|
||||
var listSubresourceTemplate = `
|
||||
// List takes $.type|raw$ name, label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors.
|
||||
func (c *$.type|privatePlural$) List($.type|private$Name string, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil{
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &$.resultType|raw$List{}
|
||||
err = c.client.Get().
|
||||
$if .namespaced$Namespace(c.ns).$end$
|
||||
@@ -408,6 +417,7 @@ func (c *$.type|privatePlural$) List($.type|private$Name string, opts $.ListOpti
|
||||
Name($.type|private$Name).
|
||||
SubResource("$.subresourcePath$").
|
||||
VersionedParams(&opts, $.schemeParameterCodec|raw$).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -461,10 +471,15 @@ func (c *$.type|privatePlural$) Delete(name string, options *$.DeleteOptions|raw
|
||||
var deleteCollectionTemplate = `
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *$.type|privatePlural$) DeleteCollection(options *$.DeleteOptions|raw$, listOptions $.ListOptions|raw$) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil{
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
$if .namespaced$Namespace(c.ns).$end$
|
||||
Resource("$.type|resource$").
|
||||
VersionedParams(&listOptions, $.schemeParameterCodec|raw$).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
@@ -553,11 +568,16 @@ func (c *$.type|privatePlural$) UpdateStatus($.type|private$ *$.type|raw$) (resu
|
||||
var watchTemplate = `
|
||||
// Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$.
|
||||
func (c *$.type|privatePlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil{
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
$if .namespaced$Namespace(c.ns).$end$
|
||||
Resource("$.type|resource$").
|
||||
VersionedParams(&opts, $.schemeParameterCodec|raw$).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
`
|
||||
|
7
vendor/k8s.io/code-generator/cmd/client-gen/main.go
generated
vendored
7
vendor/k8s.io/code-generator/cmd/client-gen/main.go
generated
vendored
@@ -21,9 +21,9 @@ import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/klog"
|
||||
|
||||
generatorargs "k8s.io/code-generator/cmd/client-gen/args"
|
||||
"k8s.io/code-generator/cmd/client-gen/generators"
|
||||
@@ -31,6 +31,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
genericArgs, customArgs := generatorargs.NewDefaults()
|
||||
|
||||
// Override defaults.
|
||||
@@ -52,7 +53,7 @@ func main() {
|
||||
}
|
||||
|
||||
if err := generatorargs.Validate(genericArgs); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
if err := genericArgs.Execute(
|
||||
@@ -60,6 +61,6 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
}
|
||||
|
66
vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go
generated
vendored
66
vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go
generated
vendored
@@ -29,7 +29,7 @@ import (
|
||||
"k8s.io/gengo/namer"
|
||||
"k8s.io/gengo/types"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
|
||||
conversionargs "k8s.io/code-generator/cmd/conversion-gen/args"
|
||||
)
|
||||
@@ -124,10 +124,10 @@ type conversionFuncMap map[conversionPair]*types.Type
|
||||
// Returns all manually-defined conversion functions in the package.
|
||||
func getManualConversionFunctions(context *generator.Context, pkg *types.Package, manualMap conversionFuncMap) {
|
||||
if pkg == nil {
|
||||
glog.Warningf("Skipping nil package passed to getManualConversionFunctions")
|
||||
klog.Warningf("Skipping nil package passed to getManualConversionFunctions")
|
||||
return
|
||||
}
|
||||
glog.V(5).Infof("Scanning for conversion functions in %v", pkg.Name)
|
||||
klog.V(5).Infof("Scanning for conversion functions in %v", pkg.Name)
|
||||
|
||||
scopeName := types.Ref(conversionPackagePath, "Scope").Name
|
||||
errorName := types.Ref("", "error").Name
|
||||
@@ -136,34 +136,34 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package
|
||||
|
||||
for _, f := range pkg.Functions {
|
||||
if f.Underlying == nil || f.Underlying.Kind != types.Func {
|
||||
glog.Errorf("Malformed function: %#v", f)
|
||||
klog.Errorf("Malformed function: %#v", f)
|
||||
continue
|
||||
}
|
||||
if f.Underlying.Signature == nil {
|
||||
glog.Errorf("Function without signature: %#v", f)
|
||||
klog.Errorf("Function without signature: %#v", f)
|
||||
continue
|
||||
}
|
||||
glog.V(8).Infof("Considering function %s", f.Name)
|
||||
klog.V(8).Infof("Considering function %s", f.Name)
|
||||
signature := f.Underlying.Signature
|
||||
// Check whether the function is conversion function.
|
||||
// Note that all of them have signature:
|
||||
// func Convert_inType_To_outType(inType, outType, conversion.Scope) error
|
||||
if signature.Receiver != nil {
|
||||
glog.V(8).Infof("%s has a receiver", f.Name)
|
||||
klog.V(8).Infof("%s has a receiver", f.Name)
|
||||
continue
|
||||
}
|
||||
if len(signature.Parameters) != 3 || signature.Parameters[2].Name != scopeName {
|
||||
glog.V(8).Infof("%s has wrong parameters", f.Name)
|
||||
klog.V(8).Infof("%s has wrong parameters", f.Name)
|
||||
continue
|
||||
}
|
||||
if len(signature.Results) != 1 || signature.Results[0].Name != errorName {
|
||||
glog.V(8).Infof("%s has wrong results", f.Name)
|
||||
klog.V(8).Infof("%s has wrong results", f.Name)
|
||||
continue
|
||||
}
|
||||
inType := signature.Parameters[0]
|
||||
outType := signature.Parameters[1]
|
||||
if inType.Kind != types.Pointer || outType.Kind != types.Pointer {
|
||||
glog.V(8).Infof("%s has wrong parameter types", f.Name)
|
||||
klog.V(8).Infof("%s has wrong parameter types", f.Name)
|
||||
continue
|
||||
}
|
||||
// Now check if the name satisfies the convention.
|
||||
@@ -171,7 +171,7 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package
|
||||
args := argsFromType(inType.Elem, outType.Elem)
|
||||
sw.Do("Convert_$.inType|public$_To_$.outType|public$", args)
|
||||
if f.Name.Name == buffer.String() {
|
||||
glog.V(4).Infof("Found conversion function %s", f.Name)
|
||||
klog.V(4).Infof("Found conversion function %s", f.Name)
|
||||
key := conversionPair{inType.Elem, outType.Elem}
|
||||
// We might scan the same package twice, and that's OK.
|
||||
if v, ok := manualMap[key]; ok && v != nil && v.Name.Package != pkg.Path {
|
||||
@@ -181,9 +181,9 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package
|
||||
} else {
|
||||
// prevent user error when they don't get the correct conversion signature
|
||||
if strings.HasPrefix(f.Name.Name, "Convert_") {
|
||||
glog.Errorf("Rename function %s %s -> %s to match expected conversion signature", f.Name.Package, f.Name.Name, buffer.String())
|
||||
klog.Errorf("Rename function %s %s -> %s to match expected conversion signature", f.Name.Package, f.Name.Name, buffer.String())
|
||||
}
|
||||
glog.V(8).Infof("%s has wrong name", f.Name)
|
||||
klog.V(8).Infof("%s has wrong name", f.Name)
|
||||
}
|
||||
buffer.Reset()
|
||||
}
|
||||
@@ -192,7 +192,7 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package
|
||||
func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages {
|
||||
boilerplate, err := arguments.LoadGoBoilerplate()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
klog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
}
|
||||
|
||||
packages := generator.Packages{}
|
||||
@@ -220,7 +220,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
}
|
||||
processed[i] = true
|
||||
|
||||
glog.V(5).Infof("considering pkg %q", i)
|
||||
klog.V(5).Infof("considering pkg %q", i)
|
||||
pkg := context.Universe[i]
|
||||
// typesPkg is where the versioned types are defined. Sometimes it is
|
||||
// different from pkg. For example, kubernetes core/v1 types are defined
|
||||
@@ -239,9 +239,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
// in their doc.go file.
|
||||
peerPkgs := extractTag(pkg.Comments)
|
||||
if peerPkgs != nil {
|
||||
glog.V(5).Infof(" tags: %q", peerPkgs)
|
||||
klog.V(5).Infof(" tags: %q", peerPkgs)
|
||||
} else {
|
||||
glog.V(5).Infof(" no tag")
|
||||
klog.V(5).Infof(" no tag")
|
||||
continue
|
||||
}
|
||||
skipUnsafe := false
|
||||
@@ -255,14 +255,14 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
externalTypesValues := extractExternalTypesTag(pkg.Comments)
|
||||
if externalTypesValues != nil {
|
||||
if len(externalTypesValues) != 1 {
|
||||
glog.Fatalf(" expect only one value for %q tag, got: %q", externalTypesTagName, externalTypesValues)
|
||||
klog.Fatalf(" expect only one value for %q tag, got: %q", externalTypesTagName, externalTypesValues)
|
||||
}
|
||||
externalTypes := externalTypesValues[0]
|
||||
glog.V(5).Infof(" external types tags: %q", externalTypes)
|
||||
klog.V(5).Infof(" external types tags: %q", externalTypes)
|
||||
var err error
|
||||
typesPkg, err = context.AddDirectory(externalTypes)
|
||||
if err != nil {
|
||||
glog.Fatalf("cannot import package %s", externalTypes)
|
||||
klog.Fatalf("cannot import package %s", externalTypes)
|
||||
}
|
||||
// update context.Order to the latest context.Universe
|
||||
orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)}
|
||||
@@ -291,7 +291,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
context.AddDir(pp)
|
||||
p := context.Universe[pp]
|
||||
if nil == p {
|
||||
glog.Fatalf("failed to find pkg: %s", pp)
|
||||
klog.Fatalf("failed to find pkg: %s", pp)
|
||||
}
|
||||
getManualConversionFunctions(context, p, manualConversions)
|
||||
}
|
||||
@@ -335,7 +335,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
// from being a candidate for unsafe conversion
|
||||
for k, v := range manualConversions {
|
||||
if isCopyOnly(v.CommentLines) {
|
||||
glog.V(5).Infof("Conversion function %s will not block memory copy because it is copy-only", v.Name)
|
||||
klog.V(5).Infof("Conversion function %s will not block memory copy because it is copy-only", v.Name)
|
||||
continue
|
||||
}
|
||||
// this type should be excluded from all equivalence, because the converter must be called.
|
||||
@@ -518,9 +518,9 @@ func (g *genConversion) convertibleOnlyWithinPackage(inType, outType *types.Type
|
||||
tagvals := extractTag(t.CommentLines)
|
||||
if tagvals != nil {
|
||||
if tagvals[0] != "false" {
|
||||
glog.Fatalf("Type %v: unsupported %s value: %q", t, tagName, tagvals[0])
|
||||
klog.Fatalf("Type %v: unsupported %s value: %q", t, tagName, tagvals[0])
|
||||
}
|
||||
glog.V(5).Infof("type %v requests no conversion generation, skipping", t)
|
||||
klog.V(5).Infof("type %v requests no conversion generation, skipping", t)
|
||||
return false
|
||||
}
|
||||
// TODO: Consider generating functions for other kinds too.
|
||||
@@ -582,10 +582,10 @@ func (g *genConversion) preexists(inType, outType *types.Type) (*types.Type, boo
|
||||
}
|
||||
|
||||
func (g *genConversion) Init(c *generator.Context, w io.Writer) error {
|
||||
if glog.V(5) {
|
||||
if klog.V(5) {
|
||||
if m, ok := g.useUnsafe.(equalMemoryTypes); ok {
|
||||
var result []string
|
||||
glog.Infof("All objects without identical memory layout:")
|
||||
klog.Infof("All objects without identical memory layout:")
|
||||
for k, v := range m {
|
||||
if v {
|
||||
continue
|
||||
@@ -594,7 +594,7 @@ func (g *genConversion) Init(c *generator.Context, w io.Writer) error {
|
||||
}
|
||||
sort.Strings(result)
|
||||
for _, s := range result {
|
||||
glog.Infof(s)
|
||||
klog.Infof(s)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -643,7 +643,7 @@ func (g *genConversion) Init(c *generator.Context, w io.Writer) error {
|
||||
}
|
||||
|
||||
func (g *genConversion) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error {
|
||||
glog.V(5).Infof("generating for type %v", t)
|
||||
klog.V(5).Infof("generating for type %v", t)
|
||||
peerType := getPeerTypeFor(c, t, g.peerPackages)
|
||||
sw := generator.NewSnippetWriter(w, c, "$", "$")
|
||||
g.generateConversion(t, peerType, sw)
|
||||
@@ -664,10 +664,10 @@ func (g *genConversion) generateConversion(inType, outType *types.Type, sw *gene
|
||||
// There is a public manual Conversion method: use it.
|
||||
} else if skipped := g.skippedFields[inType]; len(skipped) != 0 {
|
||||
// The inType had some fields we could not generate.
|
||||
glog.Errorf("Warning: could not find nor generate a final Conversion function for %v -> %v", inType, outType)
|
||||
glog.Errorf(" the following fields need manual conversion:")
|
||||
klog.Errorf("Warning: could not find nor generate a final Conversion function for %v -> %v", inType, outType)
|
||||
klog.Errorf(" the following fields need manual conversion:")
|
||||
for _, f := range skipped {
|
||||
glog.Errorf(" - %v", f)
|
||||
klog.Errorf(" - %v", f)
|
||||
}
|
||||
} else {
|
||||
// Emit a public conversion function.
|
||||
@@ -682,7 +682,7 @@ func (g *genConversion) generateConversion(inType, outType *types.Type, sw *gene
|
||||
// at any nesting level. This makes the autogenerator easy to understand, and
|
||||
// the compiler shouldn't care.
|
||||
func (g *genConversion) generateFor(inType, outType *types.Type, sw *generator.SnippetWriter) {
|
||||
glog.V(5).Infof("generating %v -> %v", inType, outType)
|
||||
klog.V(5).Infof("generating %v -> %v", inType, outType)
|
||||
var f func(*types.Type, *types.Type, *generator.SnippetWriter)
|
||||
|
||||
switch inType.Kind {
|
||||
@@ -853,7 +853,7 @@ func (g *genConversion) doStruct(inType, outType *types.Type, sw *generator.Snip
|
||||
sw.Do("}\n", nil)
|
||||
continue
|
||||
}
|
||||
glog.V(5).Infof("Skipped function %s because it is copy-only and we can use direct assignment", function.Name)
|
||||
klog.V(5).Infof("Skipped function %s because it is copy-only and we can use direct assignment", function.Name)
|
||||
}
|
||||
|
||||
// If we can't auto-convert, punt before we emit any code.
|
||||
|
9
vendor/k8s.io/code-generator/cmd/conversion-gen/main.go
generated
vendored
9
vendor/k8s.io/code-generator/cmd/conversion-gen/main.go
generated
vendored
@@ -38,9 +38,9 @@ import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/klog"
|
||||
|
||||
generatorargs "k8s.io/code-generator/cmd/conversion-gen/args"
|
||||
"k8s.io/code-generator/cmd/conversion-gen/generators"
|
||||
@@ -48,6 +48,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
genericArgs, customArgs := generatorargs.NewDefaults()
|
||||
|
||||
// Override defaults.
|
||||
@@ -61,7 +62,7 @@ func main() {
|
||||
pflag.Parse()
|
||||
|
||||
if err := generatorargs.Validate(genericArgs); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
// Run it.
|
||||
@@ -70,7 +71,7 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
klog.V(2).Info("Completed successfully.")
|
||||
}
|
||||
|
9
vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go
generated
vendored
9
vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go
generated
vendored
@@ -46,16 +46,17 @@ import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/gengo/examples/deepcopy-gen/generators"
|
||||
"k8s.io/klog"
|
||||
|
||||
generatorargs "k8s.io/code-generator/cmd/deepcopy-gen/args"
|
||||
"k8s.io/code-generator/pkg/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
genericArgs, customArgs := generatorargs.NewDefaults()
|
||||
|
||||
// Override defaults.
|
||||
@@ -69,7 +70,7 @@ func main() {
|
||||
pflag.Parse()
|
||||
|
||||
if err := generatorargs.Validate(genericArgs); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
// Run it.
|
||||
@@ -78,7 +79,7 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
klog.V(2).Info("Completed successfully.")
|
||||
}
|
||||
|
9
vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go
generated
vendored
9
vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go
generated
vendored
@@ -45,16 +45,17 @@ import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/gengo/examples/defaulter-gen/generators"
|
||||
"k8s.io/klog"
|
||||
|
||||
generatorargs "k8s.io/code-generator/cmd/defaulter-gen/args"
|
||||
"k8s.io/code-generator/pkg/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
genericArgs, customArgs := generatorargs.NewDefaults()
|
||||
|
||||
// Override defaults.
|
||||
@@ -68,7 +69,7 @@ func main() {
|
||||
pflag.Parse()
|
||||
|
||||
if err := generatorargs.Validate(genericArgs); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
// Run it.
|
||||
@@ -77,7 +78,7 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
klog.V(2).Info("Completed successfully.")
|
||||
}
|
||||
|
4
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go
generated
vendored
4
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go
generated
vendored
@@ -25,7 +25,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/gengo/generator"
|
||||
"k8s.io/gengo/namer"
|
||||
@@ -85,7 +85,7 @@ func (g *genProtoIDL) Filter(c *generator.Context, t *types.Type) bool {
|
||||
// Type specified "true".
|
||||
return true
|
||||
}
|
||||
glog.Fatalf(`Comment tag "protobuf" must be true or false, found: %q`, tagVals[0])
|
||||
klog.Fatalf(`Comment tag "protobuf" must be true or false, found: %q`, tagVals[0])
|
||||
}
|
||||
if !g.generateAll {
|
||||
// We're not generating everything.
|
||||
|
4
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go
generated
vendored
4
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go
generated
vendored
@@ -17,8 +17,8 @@ limitations under the License.
|
||||
package protobuf
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/gengo/types"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// extractBoolTagOrDie gets the comment-tags for the key and asserts that, if
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
func extractBoolTagOrDie(key string, lines []string) bool {
|
||||
val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
klog.Fatal(err)
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
7
vendor/k8s.io/code-generator/cmd/import-boss/main.go
generated
vendored
7
vendor/k8s.io/code-generator/cmd/import-boss/main.go
generated
vendored
@@ -63,10 +63,11 @@ import (
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/gengo/examples/import-boss/generators"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
arguments := args.Default()
|
||||
|
||||
// Override defaults.
|
||||
@@ -82,8 +83,8 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Errorf("Error: %v", err)
|
||||
klog.Errorf("Error: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
klog.V(2).Info("Completed successfully.")
|
||||
}
|
||||
|
4
vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go
generated
vendored
4
vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go
generated
vendored
@@ -25,7 +25,7 @@ import (
|
||||
"k8s.io/gengo/namer"
|
||||
"k8s.io/gengo/types"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// factoryGenerator produces a file of listers for a given GroupVersion and
|
||||
@@ -65,7 +65,7 @@ func (g *factoryGenerator) Imports(c *generator.Context) (imports []string) {
|
||||
func (g *factoryGenerator) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error {
|
||||
sw := generator.NewSnippetWriter(w, c, "{{", "}}")
|
||||
|
||||
glog.V(5).Infof("processing type %v", t)
|
||||
klog.V(5).Infof("processing type %v", t)
|
||||
|
||||
gvInterfaces := make(map[string]*types.Type)
|
||||
gvNewFuncs := make(map[string]*types.Type)
|
||||
|
4
vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go
generated
vendored
4
vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go
generated
vendored
@@ -23,7 +23,7 @@ import (
|
||||
"k8s.io/gengo/namer"
|
||||
"k8s.io/gengo/types"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// factoryInterfaceGenerator produces a file of interfaces used to break a dependency cycle for
|
||||
@@ -60,7 +60,7 @@ func (g *factoryInterfaceGenerator) Imports(c *generator.Context) (imports []str
|
||||
func (g *factoryInterfaceGenerator) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error {
|
||||
sw := generator.NewSnippetWriter(w, c, "{{", "}}")
|
||||
|
||||
glog.V(5).Infof("processing type %v", t)
|
||||
klog.V(5).Infof("processing type %v", t)
|
||||
|
||||
m := map[string]interface{}{
|
||||
"cacheSharedIndexInformer": c.Universe.Type(cacheSharedIndexInformer),
|
||||
|
4
vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go
generated
vendored
4
vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go
generated
vendored
@@ -28,7 +28,7 @@ import (
|
||||
"k8s.io/code-generator/cmd/client-gen/generators/util"
|
||||
clientgentypes "k8s.io/code-generator/cmd/client-gen/types"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// informerGenerator produces a file of listers for a given GroupVersion and
|
||||
@@ -66,7 +66,7 @@ func (g *informerGenerator) Imports(c *generator.Context) (imports []string) {
|
||||
func (g *informerGenerator) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error {
|
||||
sw := generator.NewSnippetWriter(w, c, "$", "$")
|
||||
|
||||
glog.V(5).Infof("processing type %v", t)
|
||||
klog.V(5).Infof("processing type %v", t)
|
||||
|
||||
listerPackage := fmt.Sprintf("%s/%s/%s", g.listersPackage, g.groupPkgName, strings.ToLower(g.groupVersion.Version.NonEmpty()))
|
||||
clientSetInterface := c.Universe.Type(types.Name{Package: g.clientSetPackage, Name: "Interface"})
|
||||
|
10
vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go
generated
vendored
10
vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go
generated
vendored
@@ -22,11 +22,11 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/gengo/generator"
|
||||
"k8s.io/gengo/namer"
|
||||
"k8s.io/gengo/types"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/code-generator/cmd/client-gen/generators/util"
|
||||
clientgentypes "k8s.io/code-generator/cmd/client-gen/types"
|
||||
@@ -102,12 +102,12 @@ func vendorless(p string) string {
|
||||
func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages {
|
||||
boilerplate, err := arguments.LoadGoBoilerplate()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
klog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
}
|
||||
|
||||
customArgs, ok := arguments.CustomArgs.(*informergenargs.CustomArgs)
|
||||
if !ok {
|
||||
glog.Fatalf("Wrong CustomArgs type: %T", arguments.CustomArgs)
|
||||
klog.Fatalf("Wrong CustomArgs type: %T", arguments.CustomArgs)
|
||||
}
|
||||
|
||||
internalVersionPackagePath := filepath.Join(arguments.OutputPackagePath)
|
||||
@@ -128,7 +128,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
|
||||
objectMeta, internal, err := objectMetaForPackage(p)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
klog.Fatal(err)
|
||||
}
|
||||
if objectMeta == nil {
|
||||
// no types in this package had genclient
|
||||
@@ -141,7 +141,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
if internal {
|
||||
lastSlash := strings.LastIndex(p.Path, "/")
|
||||
if lastSlash == -1 {
|
||||
glog.Fatalf("error constructing internal group version for package %q", p.Path)
|
||||
klog.Fatalf("error constructing internal group version for package %q", p.Path)
|
||||
}
|
||||
gv.Group = clientgentypes.Group(p.Path[lastSlash+1:])
|
||||
targetGroupVersions = internalGroupVersions
|
||||
|
4
vendor/k8s.io/code-generator/cmd/informer-gen/generators/tags.go
generated
vendored
4
vendor/k8s.io/code-generator/cmd/informer-gen/generators/tags.go
generated
vendored
@@ -17,8 +17,8 @@ limitations under the License.
|
||||
package generators
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/gengo/types"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// extractBoolTagOrDie gets the comment-tags for the key and asserts that, if
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
func extractBoolTagOrDie(key string, lines []string) bool {
|
||||
val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
klog.Fatal(err)
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
9
vendor/k8s.io/code-generator/cmd/informer-gen/main.go
generated
vendored
9
vendor/k8s.io/code-generator/cmd/informer-gen/main.go
generated
vendored
@@ -20,16 +20,17 @@ import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/code-generator/cmd/informer-gen/generators"
|
||||
"k8s.io/code-generator/pkg/util"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/klog"
|
||||
|
||||
generatorargs "k8s.io/code-generator/cmd/informer-gen/args"
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
genericArgs, customArgs := generatorargs.NewDefaults()
|
||||
|
||||
// Override defaults.
|
||||
@@ -47,7 +48,7 @@ func main() {
|
||||
pflag.Parse()
|
||||
|
||||
if err := generatorargs.Validate(genericArgs); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
// Run it.
|
||||
@@ -56,7 +57,7 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
klog.V(2).Info("Completed successfully.")
|
||||
}
|
||||
|
10
vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go
generated
vendored
10
vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go
generated
vendored
@@ -30,7 +30,7 @@ import (
|
||||
"k8s.io/code-generator/cmd/client-gen/generators/util"
|
||||
clientgentypes "k8s.io/code-generator/cmd/client-gen/types"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// NameSystems returns the name system used by the generators in this package.
|
||||
@@ -66,7 +66,7 @@ func DefaultNameSystem() string {
|
||||
func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages {
|
||||
boilerplate, err := arguments.LoadGoBoilerplate()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
klog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
}
|
||||
|
||||
var packageList generator.Packages
|
||||
@@ -75,7 +75,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
|
||||
objectMeta, internal, err := objectMetaForPackage(p)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
klog.Fatal(err)
|
||||
}
|
||||
if objectMeta == nil {
|
||||
// no types in this package had genclient
|
||||
@@ -88,7 +88,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
if internal {
|
||||
lastSlash := strings.LastIndex(p.Path, "/")
|
||||
if lastSlash == -1 {
|
||||
glog.Fatalf("error constructing internal group version for package %q", p.Path)
|
||||
klog.Fatalf("error constructing internal group version for package %q", p.Path)
|
||||
}
|
||||
gv.Group = clientgentypes.Group(p.Path[lastSlash+1:])
|
||||
internalGVPkg = p.Path
|
||||
@@ -223,7 +223,7 @@ func (g *listerGenerator) Imports(c *generator.Context) (imports []string) {
|
||||
func (g *listerGenerator) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error {
|
||||
sw := generator.NewSnippetWriter(w, c, "$", "$")
|
||||
|
||||
glog.V(5).Infof("processing type %v", t)
|
||||
klog.V(5).Infof("processing type %v", t)
|
||||
m := map[string]interface{}{
|
||||
"Resource": c.Universe.Function(types.Name{Package: t.Name.Package, Name: "Resource"}),
|
||||
"type": t,
|
||||
|
4
vendor/k8s.io/code-generator/cmd/lister-gen/generators/tags.go
generated
vendored
4
vendor/k8s.io/code-generator/cmd/lister-gen/generators/tags.go
generated
vendored
@@ -17,8 +17,8 @@ limitations under the License.
|
||||
package generators
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/gengo/types"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// extractBoolTagOrDie gets the comment-tags for the key and asserts that, if
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
func extractBoolTagOrDie(key string, lines []string) bool {
|
||||
val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
klog.Fatal(err)
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
9
vendor/k8s.io/code-generator/cmd/lister-gen/main.go
generated
vendored
9
vendor/k8s.io/code-generator/cmd/lister-gen/main.go
generated
vendored
@@ -20,16 +20,17 @@ import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/code-generator/cmd/lister-gen/generators"
|
||||
"k8s.io/code-generator/pkg/util"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/klog"
|
||||
|
||||
generatorargs "k8s.io/code-generator/cmd/lister-gen/args"
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
genericArgs, customArgs := generatorargs.NewDefaults()
|
||||
|
||||
// Override defaults.
|
||||
@@ -44,7 +45,7 @@ func main() {
|
||||
pflag.Parse()
|
||||
|
||||
if err := generatorargs.Validate(genericArgs); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
// Run it.
|
||||
@@ -53,7 +54,7 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
klog.V(2).Info("Completed successfully.")
|
||||
}
|
||||
|
13
vendor/k8s.io/code-generator/cmd/openapi-gen/README
generated
vendored
13
vendor/k8s.io/code-generator/cmd/openapi-gen/README
generated
vendored
@@ -1,13 +0,0 @@
|
||||
# Generate OpenAPI definitions
|
||||
|
||||
- To generate definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines.
|
||||
- To exclude a type or a member from a tagged package/type, add "+k8s:openapi-gen=false" tag to the comment lines.
|
||||
|
||||
# OpenAPI Extensions
|
||||
OpenAPI spec can have extensions on types. To define one or more extensions on a type or its member
|
||||
add "+k8s:openapi-gen=x-kubernetes-$NAME:$VALUE" to the comment lines before type/member. A type/member can
|
||||
have multiple extensions. The rest of the line in the comment will be used as $VALUE so there is no need to
|
||||
escape or quote the value string. Extensions can be use to pass more information to client generators or
|
||||
documentation generators. For example a type my have a friendly name to be displayed in documentation or
|
||||
being used in a client's fluent interface.
|
||||
|
53
vendor/k8s.io/code-generator/cmd/openapi-gen/args/args.go
generated
vendored
53
vendor/k8s.io/code-generator/cmd/openapi-gen/args/args.go
generated
vendored
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Kubernetes 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 args
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/gengo/args"
|
||||
)
|
||||
|
||||
// CustomArgs is used by the gengo framework to pass args specific to this generator.
|
||||
type CustomArgs struct{}
|
||||
|
||||
// NewDefaults returns default arguments for the generator.
|
||||
func NewDefaults() (*args.GeneratorArgs, *CustomArgs) {
|
||||
genericArgs := args.Default().WithoutDefaultFlagParsing()
|
||||
customArgs := &CustomArgs{}
|
||||
genericArgs.CustomArgs = customArgs
|
||||
genericArgs.OutputFileBaseName = "openapi_generated"
|
||||
return genericArgs, customArgs
|
||||
}
|
||||
|
||||
// AddFlags add the generator flags to the flag set.
|
||||
func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) {}
|
||||
|
||||
// Validate checks the given arguments.
|
||||
func Validate(genericArgs *args.GeneratorArgs) error {
|
||||
_ = genericArgs.CustomArgs.(*CustomArgs)
|
||||
|
||||
if len(genericArgs.OutputFileBaseName) == 0 {
|
||||
return fmt.Errorf("output file base name cannot be empty")
|
||||
}
|
||||
if len(genericArgs.OutputPackagePath) == 0 {
|
||||
return fmt.Errorf("output package cannot be empty")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
61
vendor/k8s.io/code-generator/cmd/openapi-gen/main.go
generated
vendored
61
vendor/k8s.io/code-generator/cmd/openapi-gen/main.go
generated
vendored
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Kubernetes 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.
|
||||
*/
|
||||
|
||||
// This package generates openAPI definition file to be used in open API spec generation on API servers. To generate
|
||||
// definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines. To
|
||||
// exclude a type from a tagged package, add "+k8s:openapi-gen=false" tag to the type comment lines.
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/kube-openapi/pkg/generators"
|
||||
|
||||
generatorargs "k8s.io/code-generator/cmd/openapi-gen/args"
|
||||
"k8s.io/code-generator/pkg/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
genericArgs, customArgs := generatorargs.NewDefaults()
|
||||
|
||||
// Override defaults.
|
||||
// TODO: move this out of openapi-gen
|
||||
genericArgs.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath())
|
||||
|
||||
genericArgs.AddFlags(pflag.CommandLine)
|
||||
customArgs.AddFlags(pflag.CommandLine)
|
||||
flag.Set("logtostderr", "true")
|
||||
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
|
||||
pflag.Parse()
|
||||
|
||||
if err := generatorargs.Validate(genericArgs); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
// Run it.
|
||||
if err := genericArgs.Execute(
|
||||
generators.NameSystems(),
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
}
|
18
vendor/k8s.io/code-generator/cmd/register-gen/generators/packages.go
generated
vendored
18
vendor/k8s.io/code-generator/cmd/register-gen/generators/packages.go
generated
vendored
@@ -22,7 +22,7 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
|
||||
clientgentypes "k8s.io/code-generator/cmd/client-gen/types"
|
||||
"k8s.io/gengo/args"
|
||||
@@ -46,7 +46,7 @@ func DefaultNameSystem() string {
|
||||
func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages {
|
||||
boilerplate, err := arguments.LoadGoBoilerplate()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
klog.Fatalf("Failed loading boilerplate: %v", err)
|
||||
}
|
||||
|
||||
packages := generator.Packages{}
|
||||
@@ -54,27 +54,27 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
pkg := context.Universe.Package(inputDir)
|
||||
internal, err := isInternal(pkg)
|
||||
if err != nil {
|
||||
glog.V(5).Infof("skipping the generation of %s file, due to err %v", arguments.OutputFileBaseName, err)
|
||||
klog.V(5).Infof("skipping the generation of %s file, due to err %v", arguments.OutputFileBaseName, err)
|
||||
continue
|
||||
}
|
||||
if internal {
|
||||
glog.V(5).Infof("skipping the generation of %s file because %s package contains internal types, note that internal types don't have \"json\" tags", arguments.OutputFileBaseName, pkg.Name)
|
||||
klog.V(5).Infof("skipping the generation of %s file because %s package contains internal types, note that internal types don't have \"json\" tags", arguments.OutputFileBaseName, pkg.Name)
|
||||
continue
|
||||
}
|
||||
registerFileName := "register.go"
|
||||
searchPath := path.Join(args.DefaultSourceTree(), inputDir, registerFileName)
|
||||
if _, err := os.Stat(path.Join(searchPath)); err == nil {
|
||||
glog.V(5).Infof("skipping the generation of %s file because %s already exists in the path %s", arguments.OutputFileBaseName, registerFileName, searchPath)
|
||||
klog.V(5).Infof("skipping the generation of %s file because %s already exists in the path %s", arguments.OutputFileBaseName, registerFileName, searchPath)
|
||||
continue
|
||||
} else if err != nil && !os.IsNotExist(err) {
|
||||
glog.Fatalf("an error %v has occurred while checking if %s exists", err, registerFileName)
|
||||
klog.Fatalf("an error %v has occurred while checking if %s exists", err, registerFileName)
|
||||
}
|
||||
|
||||
gv := clientgentypes.GroupVersion{}
|
||||
{
|
||||
pathParts := strings.Split(pkg.Path, "/")
|
||||
if len(pathParts) < 2 {
|
||||
glog.Errorf("the path of the package must contain the group name and the version, path = %s", pkg.Path)
|
||||
klog.Errorf("the path of the package must contain the group name and the version, path = %s", pkg.Path)
|
||||
continue
|
||||
}
|
||||
gv.Group = clientgentypes.Group(pathParts[len(pathParts)-2])
|
||||
@@ -84,14 +84,14 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
// extract the fully qualified API group name from it and overwrite the group inferred from the package path
|
||||
if override := types.ExtractCommentTags("+", pkg.DocComments)["groupName"]; override != nil {
|
||||
groupName := override[0]
|
||||
glog.V(5).Infof("overriding the group name with = %s", groupName)
|
||||
klog.V(5).Infof("overriding the group name with = %s", groupName)
|
||||
gv.Group = clientgentypes.Group(groupName)
|
||||
}
|
||||
}
|
||||
|
||||
typesToRegister := []*types.Type{}
|
||||
for _, t := range pkg.Types {
|
||||
glog.V(5).Infof("considering type = %s", t.Name.String())
|
||||
klog.V(5).Infof("considering type = %s", t.Name.String())
|
||||
for _, typeMember := range t.Members {
|
||||
if typeMember.Name == "TypeMeta" && typeMember.Embedded == true {
|
||||
typesToRegister = append(typesToRegister, t)
|
||||
|
9
vendor/k8s.io/code-generator/cmd/register-gen/main.go
generated
vendored
9
vendor/k8s.io/code-generator/cmd/register-gen/main.go
generated
vendored
@@ -20,8 +20,8 @@ import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/klog"
|
||||
|
||||
generatorargs "k8s.io/code-generator/cmd/register-gen/args"
|
||||
"k8s.io/code-generator/cmd/register-gen/generators"
|
||||
@@ -30,6 +30,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
genericArgs := generatorargs.NewDefaults()
|
||||
genericArgs.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath())
|
||||
genericArgs.AddFlags(pflag.CommandLine)
|
||||
@@ -38,7 +39,7 @@ func main() {
|
||||
|
||||
pflag.Parse()
|
||||
if err := generatorargs.Validate(genericArgs); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
if err := genericArgs.Execute(
|
||||
@@ -46,7 +47,7 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Fatalf("Error: %v", err)
|
||||
klog.Fatalf("Error: %v", err)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
klog.V(2).Info("Completed successfully.")
|
||||
}
|
||||
|
7
vendor/k8s.io/code-generator/cmd/set-gen/main.go
generated
vendored
7
vendor/k8s.io/code-generator/cmd/set-gen/main.go
generated
vendored
@@ -32,10 +32,11 @@ import (
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/gengo/examples/set-gen/generators"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
arguments := args.Default()
|
||||
|
||||
// Override defaults.
|
||||
@@ -48,8 +49,8 @@ func main() {
|
||||
generators.DefaultNameSystem(),
|
||||
generators.Packages,
|
||||
); err != nil {
|
||||
glog.Errorf("Error: %v", err)
|
||||
klog.Errorf("Error: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
glog.V(2).Info("Completed successfully.")
|
||||
klog.V(2).Info("Completed successfully.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user