generated: staging update

parent 3454a8d5
......@@ -183,7 +183,7 @@
},
{
"ImportPath": "github.com/spf13/pflag",
"Rev": "c7e63cf4530bcd3ba943729cee0efeff2ebea63f"
"Rev": "5ccb023bc27df288a957c5e994cd44fd19619465"
},
{
"ImportPath": "github.com/stretchr/testify/assert",
......
......@@ -416,7 +416,7 @@ func Set(name, value string) error {
// otherwise, the default values of all defined flags in the set.
func (f *FlagSet) PrintDefaults() {
usages := f.FlagUsages()
fmt.Fprintf(f.out(), "%s", usages)
fmt.Fprint(f.out(), usages)
}
// defaultIsZeroValue returns true if the default value for this flag represents
......@@ -514,7 +514,7 @@ func (f *FlagSet) FlagUsages() string {
if len(flag.NoOptDefVal) > 0 {
switch flag.Value.Type() {
case "string":
line += fmt.Sprintf("[=%q]", flag.NoOptDefVal)
line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal)
case "bool":
if flag.NoOptDefVal != "true" {
line += fmt.Sprintf("[=%s]", flag.NoOptDefVal)
......@@ -534,7 +534,7 @@ func (f *FlagSet) FlagUsages() string {
line += usage
if !flag.defaultIsZeroValue() {
if flag.Value.Type() == "string" {
line += fmt.Sprintf(" (default %q)", flag.DefValue)
line += fmt.Sprintf(" (default \"%s\")", flag.DefValue)
} else {
line += fmt.Sprintf(" (default %s)", flag.DefValue)
}
......
......@@ -2,7 +2,6 @@ package pflag
import (
"fmt"
"strings"
)
var _ = fmt.Fprint
......@@ -40,7 +39,7 @@ func (s *stringArrayValue) String() string {
}
func stringArrayConv(sval string) (interface{}, error) {
sval = strings.Trim(sval, "[]")
sval = sval[1 : len(sval)-1]
// An empty string would cause a array with one (empty) string
if len(sval) == 0 {
return []string{}, nil
......
......@@ -66,7 +66,7 @@ func (s *stringSliceValue) String() string {
}
func stringSliceConv(sval string) (interface{}, error) {
sval = strings.Trim(sval, "[]")
sval = sval[1 : len(sval)-1]
// An empty string would cause a slice with one (empty) string
if len(sval) == 0 {
return []string{}, nil
......
......@@ -27,8 +27,8 @@ import (
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/errors"
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
"k8s.io/client-go/pkg/runtime/serializer"
......@@ -59,15 +59,15 @@ type CachedDiscoveryInterface interface {
type ServerGroupsInterface interface {
// ServerGroups returns the supported groups, with information like supported versions and the
// preferred version.
ServerGroups() (*unversioned.APIGroupList, error)
ServerGroups() (*metav1.APIGroupList, error)
}
// ServerResourcesInterface has methods for obtaining supported resources on the API server
type ServerResourcesInterface interface {
// ServerResourcesForGroupVersion returns the supported resources for a group and version.
ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error)
ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
// ServerResources returns the supported resources for all groups and versions.
ServerResources() (map[string]*unversioned.APIResourceList, error)
ServerResources() (map[string]*metav1.APIResourceList, error)
// ServerPreferredResources returns the supported resources with the version preferred by the
// server.
ServerPreferredResources() ([]schema.GroupVersionResource, error)
......@@ -96,12 +96,12 @@ type DiscoveryClient struct {
LegacyPrefix string
}
// Convert unversioned.APIVersions to unversioned.APIGroup. APIVersions is used by legacy v1, so
// Convert metav1.APIVersions to metav1.APIGroup. APIVersions is used by legacy v1, so
// group would be "".
func apiVersionsToAPIGroup(apiVersions *unversioned.APIVersions) (apiGroup unversioned.APIGroup) {
groupVersions := []unversioned.GroupVersionForDiscovery{}
func apiVersionsToAPIGroup(apiVersions *metav1.APIVersions) (apiGroup metav1.APIGroup) {
groupVersions := []metav1.GroupVersionForDiscovery{}
for _, version := range apiVersions.Versions {
groupVersion := unversioned.GroupVersionForDiscovery{
groupVersion := metav1.GroupVersionForDiscovery{
GroupVersion: version,
Version: version,
}
......@@ -115,11 +115,11 @@ func apiVersionsToAPIGroup(apiVersions *unversioned.APIVersions) (apiGroup unver
// ServerGroups returns the supported groups, with information like supported versions and the
// preferred version.
func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList, err error) {
func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err error) {
// Get the groupVersions exposed at /api
v := &unversioned.APIVersions{}
v := &metav1.APIVersions{}
err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do().Into(v)
apiGroup := unversioned.APIGroup{}
apiGroup := metav1.APIGroup{}
if err == nil {
apiGroup = apiVersionsToAPIGroup(v)
}
......@@ -128,14 +128,14 @@ func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList
}
// Get the groupVersions exposed at /apis
apiGroupList = &unversioned.APIGroupList{}
apiGroupList = &metav1.APIGroupList{}
err = d.restClient.Get().AbsPath("/apis").Do().Into(apiGroupList)
if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
return nil, err
}
// to be compatible with a v1.0 server, if it's a 403 or 404, ignore and return whatever we got from /api
if err != nil && (errors.IsNotFound(err) || errors.IsForbidden(err)) {
apiGroupList = &unversioned.APIGroupList{}
apiGroupList = &metav1.APIGroupList{}
}
// append the group retrieved from /api to the list
......@@ -144,7 +144,7 @@ func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList
}
// ServerResourcesForGroupVersion returns the supported resources for a group and version.
func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *unversioned.APIResourceList, err error) {
func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *metav1.APIResourceList, err error) {
url := url.URL{}
if len(groupVersion) == 0 {
return nil, fmt.Errorf("groupVersion shouldn't be empty")
......@@ -154,7 +154,7 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r
} else {
url.Path = "/apis/" + groupVersion
}
resources = &unversioned.APIResourceList{}
resources = &metav1.APIResourceList{}
err = d.restClient.Get().AbsPath(url.String()).Do().Into(resources)
if err != nil {
// ignore 403 or 404 error to be compatible with an v1.0 server.
......@@ -167,13 +167,13 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r
}
// ServerResources returns the supported resources for all groups and versions.
func (d *DiscoveryClient) ServerResources() (map[string]*unversioned.APIResourceList, error) {
func (d *DiscoveryClient) ServerResources() (map[string]*metav1.APIResourceList, error) {
apiGroups, err := d.ServerGroups()
if err != nil {
return nil, err
}
groupVersions := unversioned.ExtractGroupVersions(apiGroups)
result := map[string]*unversioned.APIResourceList{}
groupVersions := metav1.ExtractGroupVersions(apiGroups)
result := map[string]*metav1.APIResourceList{}
for _, groupVersion := range groupVersions {
resources, err := d.ServerResourcesForGroupVersion(groupVersion)
if err != nil {
......@@ -305,7 +305,7 @@ func (d *DiscoveryClient) SwaggerSchema(version schema.GroupVersion) (*swagger.A
if err != nil {
return nil, err
}
groupVersions := unversioned.ExtractGroupVersions(groupList)
groupVersions := metav1.ExtractGroupVersions(groupList)
// This check also takes care the case that kubectl is newer than the running endpoint
if stringDoesntExistIn(version.String(), groupVersions) {
return nil, fmt.Errorf("API version: %v is not supported by the server. Use one of: %v", version, groupVersions)
......
......@@ -18,8 +18,8 @@ package fake
import (
"github.com/emicklei/go-restful/swagger"
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime/schema"
"k8s.io/client-go/pkg/version"
"k8s.io/client-go/rest"
......@@ -30,7 +30,7 @@ type FakeDiscovery struct {
*testing.Fake
}
func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) {
func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) {
action := testing.ActionImpl{
Verb: "get",
Resource: schema.GroupVersionResource{Resource: "resource"},
......@@ -39,7 +39,7 @@ func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*un
return c.Resources[groupVersion], nil
}
func (c *FakeDiscovery) ServerResources() (map[string]*unversioned.APIResourceList, error) {
func (c *FakeDiscovery) ServerResources() (map[string]*metav1.APIResourceList, error) {
action := testing.ActionImpl{
Verb: "get",
Resource: schema.GroupVersionResource{Resource: "resource"},
......@@ -56,7 +56,7 @@ func (c *FakeDiscovery) ServerPreferredNamespacedResources() ([]schema.GroupVers
return nil, nil
}
func (c *FakeDiscovery) ServerGroups() (*unversioned.APIGroupList, error) {
func (c *FakeDiscovery) ServerGroups() (*metav1.APIGroupList, error) {
return nil, nil
}
......
......@@ -19,7 +19,7 @@ package discovery
import (
"fmt"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime/schema"
"k8s.io/client-go/pkg/util/sets"
"k8s.io/client-go/pkg/version"
......@@ -61,7 +61,7 @@ func NegotiateVersion(client DiscoveryInterface, requiredGV *schema.GroupVersion
// not a negotiation specific error.
return nil, err
}
versions := unversioned.ExtractGroupVersions(groups)
versions := metav1.ExtractGroupVersions(groups)
serverVersions := sets.String{}
for _, v := range versions {
serverVersions.Insert(v)
......
......@@ -29,8 +29,8 @@ import (
"k8s.io/client-go/discovery"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/testapi"
uapi "k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/apimachinery/registered"
uapi "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
"k8s.io/client-go/rest"
......
......@@ -22,7 +22,7 @@ import (
"k8s.io/client-go/pkg/api/errors"
"k8s.io/client-go/pkg/api/meta"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime/schema"
"github.com/golang/glog"
......@@ -31,10 +31,10 @@ import (
// APIGroupResources is an API group with a mapping of versions to
// resources.
type APIGroupResources struct {
Group unversioned.APIGroup
Group metav1.APIGroup
// A mapping of version string to a slice of APIResources for
// that version.
VersionedResources map[string][]unversioned.APIResource
VersionedResources map[string][]metav1.APIResource
}
// NewRESTMapper returns a PriorityRESTMapper based on the discovered
......@@ -121,7 +121,7 @@ func GetAPIGroupResources(cl DiscoveryInterface) ([]*APIGroupResources, error) {
for _, group := range apiGroups.Groups {
groupResources := &APIGroupResources{
Group: group,
VersionedResources: make(map[string][]unversioned.APIResource),
VersionedResources: make(map[string][]metav1.APIResource),
}
for _, version := range group.Versions {
resources, err := cl.ServerResourcesForGroupVersion(version.GroupVersion)
......
......@@ -21,8 +21,8 @@ import (
"testing"
"k8s.io/client-go/pkg/api/errors"
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/apimachinery/registered"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime/schema"
"k8s.io/client-go/pkg/version"
"k8s.io/client-go/rest"
......@@ -35,14 +35,14 @@ import (
func TestRESTMapper(t *testing.T) {
resources := []*APIGroupResources{
{
Group: unversioned.APIGroup{
Versions: []unversioned.GroupVersionForDiscovery{
Group: metav1.APIGroup{
Versions: []metav1.GroupVersionForDiscovery{
{Version: "v1"},
{Version: "v2"},
},
PreferredVersion: unversioned.GroupVersionForDiscovery{Version: "v1"},
PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1"},
},
VersionedResources: map[string][]unversioned.APIResource{
VersionedResources: map[string][]metav1.APIResource{
"v1": {
{Name: "pods", Namespaced: true, Kind: "Pod"},
},
......@@ -52,14 +52,14 @@ func TestRESTMapper(t *testing.T) {
},
},
{
Group: unversioned.APIGroup{
Group: metav1.APIGroup{
Name: "extensions",
Versions: []unversioned.GroupVersionForDiscovery{
Versions: []metav1.GroupVersionForDiscovery{
{Version: "v1beta"},
},
PreferredVersion: unversioned.GroupVersionForDiscovery{Version: "v1beta"},
PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1beta"},
},
VersionedResources: map[string][]unversioned.APIResource{
VersionedResources: map[string][]metav1.APIResource{
"v1beta": {
{Name: "jobs", Namespaced: true, Kind: "Job"},
},
......@@ -250,19 +250,19 @@ func (c *fakeCachedDiscoveryInterface) RESTClient() rest.Interface {
return &fake.RESTClient{}
}
func (c *fakeCachedDiscoveryInterface) ServerGroups() (*unversioned.APIGroupList, error) {
func (c *fakeCachedDiscoveryInterface) ServerGroups() (*metav1.APIGroupList, error) {
if c.enabledA {
return &unversioned.APIGroupList{
Groups: []unversioned.APIGroup{
return &metav1.APIGroupList{
Groups: []metav1.APIGroup{
{
Name: "a",
Versions: []unversioned.GroupVersionForDiscovery{
Versions: []metav1.GroupVersionForDiscovery{
{
GroupVersion: "a/v1",
Version: "v1",
},
},
PreferredVersion: unversioned.GroupVersionForDiscovery{
PreferredVersion: metav1.GroupVersionForDiscovery{
GroupVersion: "a/v1",
Version: "v1",
},
......@@ -270,14 +270,14 @@ func (c *fakeCachedDiscoveryInterface) ServerGroups() (*unversioned.APIGroupList
},
}, nil
}
return &unversioned.APIGroupList{}, nil
return &metav1.APIGroupList{}, nil
}
func (c *fakeCachedDiscoveryInterface) ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) {
func (c *fakeCachedDiscoveryInterface) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) {
if c.enabledA && groupVersion == "a/v1" {
return &unversioned.APIResourceList{
return &metav1.APIResourceList{
GroupVersion: "a/v1",
APIResources: []unversioned.APIResource{
APIResources: []metav1.APIResource{
{
Name: "foo",
Kind: "Foo",
......@@ -290,14 +290,14 @@ func (c *fakeCachedDiscoveryInterface) ServerResourcesForGroupVersion(groupVersi
return nil, errors.NewNotFound(schema.GroupResource{}, "")
}
func (c *fakeCachedDiscoveryInterface) ServerResources() (map[string]*unversioned.APIResourceList, error) {
func (c *fakeCachedDiscoveryInterface) ServerResources() (map[string]*metav1.APIResourceList, error) {
if c.enabledA {
av1, _ := c.ServerResourcesForGroupVersion("a/v1")
return map[string]*unversioned.APIResourceList{
return map[string]*metav1.APIResourceList{
"a/v1": av1,
}, nil
}
return map[string]*unversioned.APIResourceList{}, nil
return map[string]*metav1.APIResourceList{}, nil
}
func (c *fakeCachedDiscoveryInterface) ServerPreferredResources() ([]schema.GroupVersionResource, error) {
......
......@@ -27,8 +27,8 @@ import (
"strings"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/conversion/queryparams"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
......@@ -83,7 +83,7 @@ func (c *Client) GetRateLimiter() flowcontrol.RateLimiter {
// Resource returns an API interface to the specified resource for this client's
// group and version. If resource is not a namespaced resource, then namespace
// is ignored. The ResourceClient inherits the parameter codec of c.
func (c *Client) Resource(resource *unversioned.APIResource, namespace string) *ResourceClient {
func (c *Client) Resource(resource *metav1.APIResource, namespace string) *ResourceClient {
return &ResourceClient{
cl: c.cl,
resource: resource,
......@@ -104,7 +104,7 @@ func (c *Client) ParameterCodec(parameterCodec runtime.ParameterCodec) *Client {
// dynamic client.
type ResourceClient struct {
cl *rest.RESTClient
resource *unversioned.APIResource
resource *metav1.APIResource
ns string
parameterCodec runtime.ParameterCodec
}
......@@ -225,8 +225,8 @@ func (dynamicCodec) Decode(data []byte, gvk *schema.GroupVersionKind, obj runtim
return nil, nil, err
}
if _, ok := obj.(*unversioned.Status); !ok && strings.ToLower(gvk.Kind) == "status" {
obj = &unversioned.Status{}
if _, ok := obj.(*metav1.Status); !ok && strings.ToLower(gvk.Kind) == "status" {
obj = &metav1.Status{}
err := json.Unmarshal(data, obj)
if err != nil {
return nil, nil, err
......
......@@ -26,8 +26,8 @@ import (
"testing"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
"k8s.io/client-go/pkg/runtime/serializer/streaming"
......@@ -117,7 +117,7 @@ func TestList(t *testing.T) {
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "GET" {
t.Errorf("List(%q) got HTTP method %s. wanted GET", tc.name, r.Method)
......@@ -172,7 +172,7 @@ func TestGet(t *testing.T) {
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "GET" {
t.Errorf("Get(%q) got HTTP method %s. wanted GET", tc.name, r.Method)
......@@ -204,9 +204,9 @@ func TestGet(t *testing.T) {
}
func TestDelete(t *testing.T) {
statusOK := &unversioned.Status{
TypeMeta: unversioned.TypeMeta{Kind: "Status"},
Status: unversioned.StatusSuccess,
statusOK := &metav1.Status{
TypeMeta: metav1.TypeMeta{Kind: "Status"},
Status: metav1.StatusSuccess,
}
tcs := []struct {
namespace string
......@@ -225,7 +225,7 @@ func TestDelete(t *testing.T) {
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "DELETE" {
t.Errorf("Delete(%q) got HTTP method %s. wanted DELETE", tc.name, r.Method)
......@@ -253,9 +253,9 @@ func TestDelete(t *testing.T) {
}
func TestDeleteCollection(t *testing.T) {
statusOK := &unversioned.Status{
TypeMeta: unversioned.TypeMeta{Kind: "Status"},
Status: unversioned.StatusSuccess,
statusOK := &metav1.Status{
TypeMeta: metav1.TypeMeta{Kind: "Status"},
Status: metav1.StatusSuccess,
}
tcs := []struct {
namespace string
......@@ -274,7 +274,7 @@ func TestDeleteCollection(t *testing.T) {
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "DELETE" {
t.Errorf("DeleteCollection(%q) got HTTP method %s. wanted DELETE", tc.name, r.Method)
......@@ -322,7 +322,7 @@ func TestCreate(t *testing.T) {
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" {
t.Errorf("Create(%q) got HTTP method %s. wanted POST", tc.name, r.Method)
......@@ -381,7 +381,7 @@ func TestUpdate(t *testing.T) {
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "PUT" {
t.Errorf("Update(%q) got HTTP method %s. wanted PUT", tc.name, r.Method)
......@@ -448,7 +448,7 @@ func TestWatch(t *testing.T) {
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "GET" {
t.Errorf("Watch(%q) got HTTP method %s. wanted GET", tc.name, r.Method)
......@@ -508,7 +508,7 @@ func TestPatch(t *testing.T) {
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "PATCH" {
t.Errorf("Patch(%q) got HTTP method %s. wanted PATCH", tc.name, r.Method)
......
......@@ -20,7 +20,7 @@ import (
"fmt"
"k8s.io/client-go/pkg/api/meta"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
)
......@@ -35,7 +35,7 @@ func VersionInterfaces(schema.GroupVersion) (*meta.VersionInterfaces, error) {
}
// NewDiscoveryRESTMapper returns a RESTMapper based on discovery information.
func NewDiscoveryRESTMapper(resources []*unversioned.APIResourceList, versionFunc meta.VersionInterfacesFunc) (*meta.DefaultRESTMapper, error) {
func NewDiscoveryRESTMapper(resources []*metav1.APIResourceList, versionFunc meta.VersionInterfacesFunc) (*meta.DefaultRESTMapper, error) {
rm := meta.NewDefaultRESTMapper(nil, versionFunc)
for _, resourceList := range resources {
gv, err := schema.ParseGroupVersion(resourceList.GroupVersion)
......@@ -62,7 +62,7 @@ type ObjectTyper struct {
}
// NewObjectTyper constructs an ObjectTyper from discovery information.
func NewObjectTyper(resources []*unversioned.APIResourceList) (runtime.ObjectTyper, error) {
func NewObjectTyper(resources []*metav1.APIResourceList) (runtime.ObjectTyper, error) {
ot := &ObjectTyper{registered: make(map[schema.GroupVersionKind]bool)}
for _, resourceList := range resources {
gv, err := schema.ParseGroupVersion(resourceList.GroupVersion)
......
......@@ -19,15 +19,15 @@ package dynamic
import (
"testing"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime/schema"
)
func TestDiscoveryRESTMapper(t *testing.T) {
resources := []*unversioned.APIResourceList{
resources := []*metav1.APIResourceList{
{
GroupVersion: "test/beta1",
APIResources: []unversioned.APIResource{
APIResources: []metav1.APIResource{
{
Name: "test_kinds",
Namespaced: true,
......
assignees:
- bgrant0607
- erictune
- lavalamp
- smarterclayton
- thockin
approvers:
- bgrant0607
- erictune
- lavalamp
- smarterclayton
- thockin
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- bgrant0607
- deads2k
- yujuhong
- brendandburns
- derekwaynecarr
- caesarxuchao
- vishh
- mikedanese
- liggitt
- nikhiljindal
- bprashanth
- gmarek
- erictune
- davidopp
- pmorie
- sttts
- kargakis
- dchen1107
- saad-ali
- zmerlynn
- luxas
- janetkuo
- justinsb
- pwittrock
- roberthbailey
- ncdc
- timstclair
- yifan-gu
- eparis
- mwielgus
- timothysc
- soltysh
- piosz
- jsafrane
- jbeda
......@@ -20,7 +20,7 @@ import (
"fmt"
"k8s.io/client-go/pkg/api/resource"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/conversion"
"k8s.io/client-go/pkg/fields"
"k8s.io/client-go/pkg/labels"
......@@ -32,7 +32,7 @@ import (
func addConversionFuncs(scheme *runtime.Scheme) error {
return scheme.AddConversionFuncs(
Convert_unversioned_TypeMeta_To_unversioned_TypeMeta,
Convert_v1_TypeMeta_To_v1_TypeMeta,
Convert_unversioned_ListMeta_To_unversioned_ListMeta,
......@@ -154,7 +154,7 @@ func Convert_bool_To_Pointer_bool(in *bool, out **bool, s conversion.Scope) erro
}
// +k8s:conversion-fn=drop
func Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(in, out *unversioned.TypeMeta, s conversion.Scope) error {
func Convert_v1_TypeMeta_To_v1_TypeMeta(in, out *metav1.TypeMeta, s conversion.Scope) error {
// These values are explicitly not copied
//out.APIVersion = in.APIVersion
//out.Kind = in.Kind
......@@ -162,7 +162,7 @@ func Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(in, out *unversioned.T
}
// +k8s:conversion-fn=copy-only
func Convert_unversioned_ListMeta_To_unversioned_ListMeta(in, out *unversioned.ListMeta, s conversion.Scope) error {
func Convert_unversioned_ListMeta_To_unversioned_ListMeta(in, out *metav1.ListMeta, s conversion.Scope) error {
*out = *in
return nil
}
......@@ -174,14 +174,14 @@ func Convert_intstr_IntOrString_To_intstr_IntOrString(in, out *intstr.IntOrStrin
}
// +k8s:conversion-fn=copy-only
func Convert_unversioned_Time_To_unversioned_Time(in *unversioned.Time, out *unversioned.Time, s conversion.Scope) error {
func Convert_unversioned_Time_To_unversioned_Time(in *metav1.Time, out *metav1.Time, s conversion.Scope) error {
// Cannot deep copy these, because time.Time has unexported fields.
*out = *in
return nil
}
// Convert_Slice_string_To_unversioned_Time allows converting a URL query parameter value
func Convert_Slice_string_To_unversioned_Time(input *[]string, out *unversioned.Time, s conversion.Scope) error {
func Convert_Slice_string_To_unversioned_Time(input *[]string, out *metav1.Time, s conversion.Scope) error {
str := ""
if len(*input) > 0 {
str = (*input)[0]
......@@ -229,20 +229,20 @@ func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out *
return nil
}
func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *unversioned.LabelSelector, s conversion.Scope) error {
func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *metav1.LabelSelector, s conversion.Scope) error {
if in == nil {
return nil
}
out = new(unversioned.LabelSelector)
out = new(metav1.LabelSelector)
for labelKey, labelValue := range *in {
utillabels.AddLabelToSelector(out, labelKey, labelValue)
}
return nil
}
func Convert_unversioned_LabelSelector_to_map(in *unversioned.LabelSelector, out *map[string]string, s conversion.Scope) error {
func Convert_unversioned_LabelSelector_to_map(in *metav1.LabelSelector, out *map[string]string, s conversion.Scope) error {
var err error
*out, err = unversioned.LabelSelectorAsMap(in)
*out, err = metav1.LabelSelectorAsMap(in)
if err != nil {
err = field.Invalid(field.NewPath("labelSelector"), *in, fmt.Sprintf("cannot convert to old selector: %v", err))
}
......
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- bgrant0607
- deads2k
- brendandburns
- derekwaynecarr
- caesarxuchao
- mikedanese
- liggitt
- nikhiljindal
- gmarek
- erictune
- saad-ali
- janetkuo
- timstclair
- eparis
- timothysc
- dims
- spxtr
- hongchaodeng
- krousey
- satnam6502
- cjcullen
- david-mcmahon
- goltermann
......@@ -25,7 +25,7 @@ import (
"time"
"k8s.io/client-go/pkg/api/resource"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/conversion"
"k8s.io/client-go/pkg/fields"
"k8s.io/client-go/pkg/labels"
......@@ -61,7 +61,7 @@ var Semantic = conversion.EqualitiesOrDie(
// Uninitialized quantities are equivalent to 0 quantities.
return a.Cmp(b) == 0
},
func(a, b unversioned.Time) bool {
func(a, b metav1.Time) bool {
return a.UTC() == b.UTC()
},
func(a, b labels.Selector) bool {
......@@ -397,15 +397,15 @@ func containsAccessMode(modes []PersistentVolumeAccessMode, mode PersistentVolum
}
// ParseRFC3339 parses an RFC3339 date in either RFC3339Nano or RFC3339 format.
func ParseRFC3339(s string, nowFn func() unversioned.Time) (unversioned.Time, error) {
func ParseRFC3339(s string, nowFn func() metav1.Time) (metav1.Time, error) {
if t, timeErr := time.Parse(time.RFC3339Nano, s); timeErr == nil {
return unversioned.Time{Time: t}, nil
return metav1.Time{Time: t}, nil
}
t, err := time.Parse(time.RFC3339, s)
if err != nil {
return unversioned.Time{}, err
return metav1.Time{}, err
}
return unversioned.Time{Time: t}, nil
return metav1.Time{Time: t}, nil
}
// NodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement api type into a struct that implements
......
reviewers:
- lavalamp
- smarterclayton
- deads2k
- caesarxuchao
- liggitt
- nikhiljindal
- dims
- krousey
- david-mcmahon
- feihujiang
......@@ -19,7 +19,7 @@ package api
import (
"k8s.io/client-go/pkg/api/meta"
"k8s.io/client-go/pkg/api/meta/metatypes"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/conversion"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/types"
......@@ -28,7 +28,7 @@ import (
// FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta.
func FillObjectMetaSystemFields(ctx Context, meta *ObjectMeta) {
meta.CreationTimestamp = unversioned.Now()
meta.CreationTimestamp = metav1.Now()
// allows admission controllers to assign a UID earlier in the request processing
// to support tracking resources pending creation.
uid, found := UIDFrom(ctx)
......@@ -61,12 +61,12 @@ func ObjectMetaFor(obj runtime.Object) (*ObjectMeta, error) {
// ListMetaFor returns a pointer to a provided object's ListMeta,
// or an error if the object does not have that pointer.
// TODO: allow runtime.Unknown to extract this object
func ListMetaFor(obj runtime.Object) (*unversioned.ListMeta, error) {
func ListMetaFor(obj runtime.Object) (*metav1.ListMeta, error) {
v, err := conversion.EnforcePtr(obj)
if err != nil {
return nil, err
}
var meta *unversioned.ListMeta
var meta *metav1.ListMeta
err = runtime.FieldPtr(v, "ListMeta", &meta)
return meta, err
}
......@@ -75,24 +75,24 @@ func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj }
// Namespace implements meta.Object for any object with an ObjectMeta typed field. Allows
// fast, direct access to metadata fields for API objects.
func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace }
func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace }
func (meta *ObjectMeta) GetName() string { return meta.Name }
func (meta *ObjectMeta) SetName(name string) { meta.Name = name }
func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName }
func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName }
func (meta *ObjectMeta) GetUID() types.UID { return meta.UID }
func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid }
func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion }
func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version }
func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink }
func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
func (meta *ObjectMeta) GetCreationTimestamp() unversioned.Time { return meta.CreationTimestamp }
func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp unversioned.Time) {
func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace }
func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace }
func (meta *ObjectMeta) GetName() string { return meta.Name }
func (meta *ObjectMeta) SetName(name string) { meta.Name = name }
func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName }
func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName }
func (meta *ObjectMeta) GetUID() types.UID { return meta.UID }
func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid }
func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion }
func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version }
func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink }
func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { return meta.CreationTimestamp }
func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) {
meta.CreationTimestamp = creationTimestamp
}
func (meta *ObjectMeta) GetDeletionTimestamp() *unversioned.Time { return meta.DeletionTimestamp }
func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *unversioned.Time) {
func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp }
func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) {
meta.DeletionTimestamp = deletionTimestamp
}
func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels }
......
reviewers:
- thockin
- smarterclayton
- wojtek-t
- deads2k
- brendandburns
- derekwaynecarr
- caesarxuchao
- mikedanese
- liggitt
- nikhiljindal
- gmarek
- kargakis
- janetkuo
- ncdc
- eparis
- dims
- krousey
- markturansky
- fabioy
- resouer
- david-mcmahon
- mfojtik
- jianhuiz
- feihujiang
- ghodss
......@@ -18,7 +18,7 @@ package meta
import (
"k8s.io/client-go/pkg/api/meta/metatypes"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
"k8s.io/client-go/pkg/types"
......@@ -51,10 +51,10 @@ type Object interface {
SetResourceVersion(version string)
GetSelfLink() string
SetSelfLink(selfLink string)
GetCreationTimestamp() unversioned.Time
SetCreationTimestamp(timestamp unversioned.Time)
GetDeletionTimestamp() *unversioned.Time
SetDeletionTimestamp(timestamp *unversioned.Time)
GetCreationTimestamp() metav1.Time
SetCreationTimestamp(timestamp metav1.Time)
GetDeletionTimestamp() *metav1.Time
SetDeletionTimestamp(timestamp *metav1.Time)
GetLabels() map[string]string
SetLabels(labels map[string]string)
GetAnnotations() map[string]string
......@@ -76,10 +76,10 @@ type ListMetaAccessor interface {
// List lets you work with list metadata from any of the versioned or
// internal API objects. Attempting to set or retrieve a field on an object that does
// not support that field will be a no-op and return a default value.
type List unversioned.List
type List metav1.List
// Type exposes the type and APIVersion of versioned or internal API objects.
type Type unversioned.Type
type Type metav1.Type
// MetadataAccessor lets you work with object and list metadata from any of the versioned or
// internal API objects. Attempting to set or retrieve a field on an object that does
......
......@@ -21,7 +21,7 @@ import (
"reflect"
"k8s.io/client-go/pkg/api/meta/metatypes"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/conversion"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
......@@ -43,14 +43,14 @@ func ListAccessor(obj interface{}) (List, error) {
switch t := obj.(type) {
case List:
return t, nil
case unversioned.List:
case metav1.List:
return t, nil
case ListMetaAccessor:
if m := t.GetListMeta(); m != nil {
return m, nil
}
return nil, errNotList
case unversioned.ListMetaAccessor:
case metav1.ListMetaAccessor:
if m := t.GetListMeta(); m != nil {
return m, nil
}
......@@ -85,7 +85,7 @@ func Accessor(obj interface{}) (Object, error) {
return m, nil
}
return nil, errNotObject
case List, unversioned.List, ListMetaAccessor, unversioned.ListMetaAccessor:
case List, metav1.List, ListMetaAccessor, metav1.ListMetaAccessor:
return nil, errNotObject
default:
return nil, errNotObject
......@@ -372,8 +372,8 @@ type genericAccessor struct {
kind *string
resourceVersion *string
selfLink *string
creationTimestamp *unversioned.Time
deletionTimestamp **unversioned.Time
creationTimestamp *metav1.Time
deletionTimestamp **metav1.Time
labels *map[string]string
annotations *map[string]string
ownerReferences reflect.Value
......@@ -468,19 +468,19 @@ func (a genericAccessor) SetSelfLink(selfLink string) {
*a.selfLink = selfLink
}
func (a genericAccessor) GetCreationTimestamp() unversioned.Time {
func (a genericAccessor) GetCreationTimestamp() metav1.Time {
return *a.creationTimestamp
}
func (a genericAccessor) SetCreationTimestamp(timestamp unversioned.Time) {
func (a genericAccessor) SetCreationTimestamp(timestamp metav1.Time) {
*a.creationTimestamp = timestamp
}
func (a genericAccessor) GetDeletionTimestamp() *unversioned.Time {
func (a genericAccessor) GetDeletionTimestamp() *metav1.Time {
return *a.deletionTimestamp
}
func (a genericAccessor) SetDeletionTimestamp(timestamp *unversioned.Time) {
func (a genericAccessor) SetDeletionTimestamp(timestamp *metav1.Time) {
*a.deletionTimestamp = timestamp
}
......
......@@ -17,7 +17,7 @@ limitations under the License.
package api
import (
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
"k8s.io/client-go/pkg/runtime/serializer"
......@@ -76,7 +76,7 @@ func init() {
}
func addKnownTypes(scheme *runtime.Scheme) error {
if err := scheme.AddIgnoredConversionType(&unversioned.TypeMeta{}, &unversioned.TypeMeta{}); err != nil {
if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil {
return err
}
scheme.AddKnownTypes(SchemeGroupVersion,
......@@ -129,12 +129,11 @@ func addKnownTypes(scheme *runtime.Scheme) error {
// Register Unversioned types under their own special group
scheme.AddUnversionedTypes(Unversioned,
&unversioned.ExportOptions{},
&unversioned.Status{},
&unversioned.APIVersions{},
&unversioned.APIGroupList{},
&unversioned.APIGroup{},
&unversioned.APIResourceList{},
&metav1.Status{},
&metav1.APIVersions{},
&metav1.APIGroupList{},
&metav1.APIGroup{},
&metav1.APIResourceList{},
)
return nil
}
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- derekwaynecarr
- mikedanese
- saad-ali
- janetkuo
- timstclair
- eparis
- timothysc
- jbeda
- xiang90
- mbohlool
- david-mcmahon
- goltermann
......@@ -20,7 +20,7 @@ import (
"time"
"k8s.io/client-go/pkg/api/resource"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// Returns string version of ResourceName.
......@@ -81,7 +81,7 @@ func GetExistingContainerStatus(statuses []ContainerStatus, name string) Contain
// of that, there are two cases when a pod can be considered available:
// 1. minReadySeconds == 0, or
// 2. LastTransitionTime (is set) + minReadySeconds < current time
func IsPodAvailable(pod *Pod, minReadySeconds int32, now unversioned.Time) bool {
func IsPodAvailable(pod *Pod, minReadySeconds int32, now metav1.Time) bool {
if !IsPodReady(pod) {
return false
}
......@@ -144,7 +144,7 @@ func GetNodeCondition(status *NodeStatus, conditionType NodeConditionType) (int,
// status has changed.
// Returns true if pod condition has changed or has been added.
func UpdatePodCondition(status *PodStatus, condition *PodCondition) bool {
condition.LastTransitionTime = unversioned.Now()
condition.LastTransitionTime = metav1.Now()
// Try to find this pod condition.
conditionIndex, oldCondition := GetPodCondition(status, condition.Type)
......
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- caesarxuchao
- mikedanese
- liggitt
- nikhiljindal
- bprashanth
- erictune
- timstclair
- eparis
- soltysh
- madhusudancs
- markturansky
- mml
- david-mcmahon
- ericchiang
- jianhuiz
This source diff could not be displayed because it is too large. You can view the blob instead.
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- yujuhong
- brendandburns
- derekwaynecarr
- caesarxuchao
- vishh
- mikedanese
- liggitt
- nikhiljindal
- bprashanth
- gmarek
- erictune
- davidopp
- pmorie
- sttts
- kargakis
- dchen1107
- saad-ali
- zmerlynn
- luxas
- janetkuo
- justinsb
- roberthbailey
- ncdc
- timstclair
- eparis
- timothysc
- piosz
- jsafrane
- dims
- errordeveloper
- madhusudancs
- krousey
- jayunit100
- rootfs
- markturansky
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -19,7 +19,7 @@ package v1
import (
"k8s.io/client-go/pkg/api/meta"
"k8s.io/client-go/pkg/api/meta/metatypes"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/types"
)
......@@ -27,24 +27,24 @@ func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj }
// Namespace implements meta.Object for any object with an ObjectMeta typed field. Allows
// fast, direct access to metadata fields for API objects.
func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace }
func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace }
func (meta *ObjectMeta) GetName() string { return meta.Name }
func (meta *ObjectMeta) SetName(name string) { meta.Name = name }
func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName }
func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName }
func (meta *ObjectMeta) GetUID() types.UID { return meta.UID }
func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid }
func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion }
func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version }
func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink }
func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
func (meta *ObjectMeta) GetCreationTimestamp() unversioned.Time { return meta.CreationTimestamp }
func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp unversioned.Time) {
func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace }
func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace }
func (meta *ObjectMeta) GetName() string { return meta.Name }
func (meta *ObjectMeta) SetName(name string) { meta.Name = name }
func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName }
func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName }
func (meta *ObjectMeta) GetUID() types.UID { return meta.UID }
func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid }
func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion }
func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version }
func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink }
func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { return meta.CreationTimestamp }
func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) {
meta.CreationTimestamp = creationTimestamp
}
func (meta *ObjectMeta) GetDeletionTimestamp() *unversioned.Time { return meta.DeletionTimestamp }
func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *unversioned.Time) {
func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp }
func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) {
meta.DeletionTimestamp = deletionTimestamp
}
func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels }
......
......@@ -17,7 +17,7 @@ limitations under the License.
package v1
import (
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
versionedwatch "k8s.io/client-go/pkg/watch/versioned"
......@@ -29,6 +29,11 @@ const GroupName = ""
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs, addFastPathConversionFuncs)
AddToScheme = SchemeBuilder.AddToScheme
......@@ -71,7 +76,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&PersistentVolumeClaim{},
&PersistentVolumeClaimList{},
&DeleteOptions{},
&ExportOptions{},
&metav1.ExportOptions{},
&ListOptions{},
&PodAttachOptions{},
&PodLogOptions{},
......@@ -86,7 +91,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
)
// Add common types
scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.Status{})
scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{})
// Add the watch version that applies
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
......
......@@ -20,7 +20,7 @@ import (
"time"
"k8s.io/client-go/pkg/api/resource"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// Returns string version of ResourceName.
......@@ -81,7 +81,7 @@ func GetExistingContainerStatus(statuses []ContainerStatus, name string) Contain
// of that, there are two cases when a pod can be considered available:
// 1. minReadySeconds == 0, or
// 2. LastTransitionTime (is set) + minReadySeconds < current time
func IsPodAvailable(pod *Pod, minReadySeconds int32, now unversioned.Time) bool {
func IsPodAvailable(pod *Pod, minReadySeconds int32, now metav1.Time) bool {
if !IsPodReady(pod) {
return false
}
......@@ -144,7 +144,7 @@ func GetNodeCondition(status *NodeStatus, conditionType NodeConditionType) (int,
// status has changed.
// Returns true if pod condition has changed or has been added.
func UpdatePodCondition(status *PodStatus, condition *PodCondition) bool {
condition.LastTransitionTime = unversioned.Now()
condition.LastTransitionTime = metav1.Now()
// Try to find this pod condition.
conditionIndex, oldCondition := GetPodCondition(status, condition.Type)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -493,16 +493,6 @@ func (ExecAction) SwaggerDoc() map[string]string {
return map_ExecAction
}
var map_ExportOptions = map[string]string{
"": "ExportOptions is the query options to the standard REST get call.",
"export": "Should this value be exported. Export strips fields that a user can not specify.",
"exact": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'",
}
func (ExportOptions) SwaggerDoc() map[string]string {
return map_ExportOptions
}
var map_FCVolumeSource = map[string]string{
"": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.",
"targetWWNs": "Required: FC target worldwide names (WWNs)",
......@@ -901,7 +891,7 @@ var map_NodeSpec = map[string]string{
"podCIDR": "PodCIDR represents the pod IP range assigned to the node.",
"externalID": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.",
"providerID": "ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>",
"unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"",
"unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration",
}
func (NodeSpec) SwaggerDoc() map[string]string {
......
......@@ -22,7 +22,7 @@ package v1
import (
api "k8s.io/client-go/pkg/api"
unversioned "k8s.io/client-go/pkg/api/unversioned"
meta_v1 "k8s.io/client-go/pkg/apis/meta/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
types "k8s.io/client-go/pkg/types"
......@@ -119,8 +119,6 @@ func RegisterConversions(scheme *runtime.Scheme) error {
Convert_api_EventSource_To_v1_EventSource,
Convert_v1_ExecAction_To_api_ExecAction,
Convert_api_ExecAction_To_v1_ExecAction,
Convert_v1_ExportOptions_To_api_ExportOptions,
Convert_api_ExportOptions_To_v1_ExportOptions,
Convert_v1_FCVolumeSource_To_api_FCVolumeSource,
Convert_api_FCVolumeSource_To_v1_FCVolumeSource,
Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource,
......@@ -1344,26 +1342,6 @@ func Convert_api_ExecAction_To_v1_ExecAction(in *api.ExecAction, out *ExecAction
return autoConvert_api_ExecAction_To_v1_ExecAction(in, out, s)
}
func autoConvert_v1_ExportOptions_To_api_ExportOptions(in *ExportOptions, out *api.ExportOptions, s conversion.Scope) error {
out.Export = in.Export
out.Exact = in.Exact
return nil
}
func Convert_v1_ExportOptions_To_api_ExportOptions(in *ExportOptions, out *api.ExportOptions, s conversion.Scope) error {
return autoConvert_v1_ExportOptions_To_api_ExportOptions(in, out, s)
}
func autoConvert_api_ExportOptions_To_v1_ExportOptions(in *api.ExportOptions, out *ExportOptions, s conversion.Scope) error {
out.Export = in.Export
out.Exact = in.Exact
return nil
}
func Convert_api_ExportOptions_To_v1_ExportOptions(in *api.ExportOptions, out *ExportOptions, s conversion.Scope) error {
return autoConvert_api_ExportOptions_To_v1_ExportOptions(in, out, s)
}
func autoConvert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *api.FCVolumeSource, s conversion.Scope) error {
out.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs))
out.Lun = (*int32)(unsafe.Pointer(in.Lun))
......@@ -2365,7 +2343,7 @@ func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.Object
out.ResourceVersion = in.ResourceVersion
out.Generation = in.Generation
out.CreationTimestamp = in.CreationTimestamp
out.DeletionTimestamp = (*unversioned.Time)(unsafe.Pointer(in.DeletionTimestamp))
out.DeletionTimestamp = (*meta_v1.Time)(unsafe.Pointer(in.DeletionTimestamp))
out.DeletionGracePeriodSeconds = (*int64)(unsafe.Pointer(in.DeletionGracePeriodSeconds))
out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels))
out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations))
......@@ -2388,7 +2366,7 @@ func autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *Object
out.ResourceVersion = in.ResourceVersion
out.Generation = in.Generation
out.CreationTimestamp = in.CreationTimestamp
out.DeletionTimestamp = (*unversioned.Time)(unsafe.Pointer(in.DeletionTimestamp))
out.DeletionTimestamp = (*meta_v1.Time)(unsafe.Pointer(in.DeletionTimestamp))
out.DeletionGracePeriodSeconds = (*int64)(unsafe.Pointer(in.DeletionGracePeriodSeconds))
out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels))
out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations))
......@@ -2548,7 +2526,7 @@ func Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in *a
func autoConvert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in *PersistentVolumeClaimSpec, out *api.PersistentVolumeClaimSpec, s conversion.Scope) error {
out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
out.Selector = (*unversioned.LabelSelector)(unsafe.Pointer(in.Selector))
out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
return err
}
......@@ -2562,7 +2540,7 @@ func Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in *P
func autoConvert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in *api.PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, s conversion.Scope) error {
out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
out.Selector = (*unversioned.LabelSelector)(unsafe.Pointer(in.Selector))
out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
return err
}
......@@ -2825,7 +2803,7 @@ func Convert_api_PodAffinity_To_v1_PodAffinity(in *api.PodAffinity, out *PodAffi
}
func autoConvert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in *PodAffinityTerm, out *api.PodAffinityTerm, s conversion.Scope) error {
out.LabelSelector = (*unversioned.LabelSelector)(unsafe.Pointer(in.LabelSelector))
out.LabelSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces))
out.TopologyKey = in.TopologyKey
return nil
......@@ -2836,7 +2814,7 @@ func Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in *PodAffinityTerm, out
}
func autoConvert_api_PodAffinityTerm_To_v1_PodAffinityTerm(in *api.PodAffinityTerm, out *PodAffinityTerm, s conversion.Scope) error {
out.LabelSelector = (*unversioned.LabelSelector)(unsafe.Pointer(in.LabelSelector))
out.LabelSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces))
out.TopologyKey = in.TopologyKey
return nil
......@@ -2993,7 +2971,7 @@ func autoConvert_v1_PodLogOptions_To_api_PodLogOptions(in *PodLogOptions, out *a
out.Follow = in.Follow
out.Previous = in.Previous
out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds))
out.SinceTime = (*unversioned.Time)(unsafe.Pointer(in.SinceTime))
out.SinceTime = (*meta_v1.Time)(unsafe.Pointer(in.SinceTime))
out.Timestamps = in.Timestamps
out.TailLines = (*int64)(unsafe.Pointer(in.TailLines))
out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes))
......@@ -3009,7 +2987,7 @@ func autoConvert_api_PodLogOptions_To_v1_PodLogOptions(in *api.PodLogOptions, ou
out.Follow = in.Follow
out.Previous = in.Previous
out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds))
out.SinceTime = (*unversioned.Time)(unsafe.Pointer(in.SinceTime))
out.SinceTime = (*meta_v1.Time)(unsafe.Pointer(in.SinceTime))
out.Timestamps = in.Timestamps
out.TailLines = (*int64)(unsafe.Pointer(in.TailLines))
out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes))
......@@ -3160,7 +3138,7 @@ func autoConvert_v1_PodStatus_To_api_PodStatus(in *PodStatus, out *api.PodStatus
out.Reason = in.Reason
out.HostIP = in.HostIP
out.PodIP = in.PodIP
out.StartTime = (*unversioned.Time)(unsafe.Pointer(in.StartTime))
out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
out.InitContainerStatuses = *(*[]api.ContainerStatus)(unsafe.Pointer(&in.InitContainerStatuses))
out.ContainerStatuses = *(*[]api.ContainerStatus)(unsafe.Pointer(&in.ContainerStatuses))
return nil
......@@ -3177,7 +3155,7 @@ func autoConvert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus
out.Reason = in.Reason
out.HostIP = in.HostIP
out.PodIP = in.PodIP
out.StartTime = (*unversioned.Time)(unsafe.Pointer(in.StartTime))
out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
out.InitContainerStatuses = *(*[]ContainerStatus)(unsafe.Pointer(&in.InitContainerStatuses))
out.ContainerStatuses = *(*[]ContainerStatus)(unsafe.Pointer(&in.ContainerStatuses))
return nil
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
reviewers:
- thockin
- lavalamp
- smarterclayton
- deads2k
- caesarxuchao
- bprashanth
- pmorie
- sttts
- saad-ali
- ncdc
- timstclair
- timothysc
- dims
- errordeveloper
- mml
- m1093782566
- mbohlool
- david-mcmahon
- kevin-wangzefeng
- jianhuiz
......@@ -27,7 +27,7 @@ import (
codec1978 "github.com/ugorji/go/codec"
pkg2_api "k8s.io/client-go/pkg/api"
pkg4_resource "k8s.io/client-go/pkg/api/resource"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
pkg5_intstr "k8s.io/client-go/pkg/util/intstr"
"reflect"
......@@ -67,7 +67,7 @@ func init() {
if false { // reference the types, but skip this branch at build/run time
var v0 pkg2_api.ObjectMeta
var v1 pkg4_resource.Quantity
var v2 pkg1_unversioned.TypeMeta
var v2 pkg1_v1.TypeMeta
var v3 pkg3_types.UID
var v4 pkg5_intstr.IntOrString
var v5 time.Time
......@@ -648,7 +648,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.Selector == nil {
x.Selector = new(pkg1_unversioned.LabelSelector)
x.Selector = new(pkg1_v1.LabelSelector)
}
yym54 := z.DecBinary()
_ = yym54
......@@ -730,7 +730,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
}
} else {
if x.Selector == nil {
x.Selector = new(pkg1_unversioned.LabelSelector)
x.Selector = new(pkg1_v1.LabelSelector)
}
yym62 := z.DecBinary()
_ = yym62
......@@ -1265,7 +1265,7 @@ func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "metadata":
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv108 := &x.ListMeta
yym109 := z.DecBinary()
......@@ -1346,7 +1346,7 @@ func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv115 := &x.ListMeta
yym116 := z.DecBinary()
......
......@@ -18,7 +18,7 @@ package apps
import (
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// +genclient=true
......@@ -30,7 +30,7 @@ import (
// The StatefulSet guarantees that a given network identity will always
// map to the same storage identity.
type StatefulSet struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
api.ObjectMeta `json:"metadata,omitempty"`
......@@ -58,7 +58,7 @@ type StatefulSetSpec struct {
// If empty, defaulted to labels on the pod template.
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
Selector *metav1.LabelSelector `json:"selector,omitempty"`
// Template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
......@@ -96,8 +96,8 @@ type StatefulSetStatus struct {
// StatefulSetList is a collection of StatefulSets.
type StatefulSetList struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
unversioned.ListMeta `json:"metadata,omitempty"`
Items []StatefulSet `json:"items"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []StatefulSet `json:"items"`
}
......@@ -20,9 +20,9 @@ import (
"fmt"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/unversioned"
v1 "k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/pkg/apis/apps"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/conversion"
"k8s.io/client-go/pkg/runtime"
)
......@@ -58,7 +58,7 @@ func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(unversioned.LabelSelector)
*out = new(metav1.LabelSelector)
if err := s.Convert(*in, *out, 0); err != nil {
return err
}
......@@ -88,7 +88,7 @@ func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSe
*out.Replicas = in.Replicas
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(unversioned.LabelSelector)
*out = new(metav1.LabelSelector)
if err := s.Convert(*in, *out, 0); err != nil {
return err
}
......
......@@ -17,7 +17,7 @@ limitations under the License.
package v1beta1
import (
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
)
......@@ -32,7 +32,7 @@ func SetDefaults_StatefulSet(obj *StatefulSet) {
labels := obj.Spec.Template.Labels
if labels != nil {
if obj.Spec.Selector == nil {
obj.Spec.Selector = &unversioned.LabelSelector{
obj.Spec.Selector = &metav1.LabelSelector{
MatchLabels: labels,
}
}
......
......@@ -22,8 +22,8 @@ syntax = 'proto2';
package k8s.io.kubernetes.pkg.apis.apps.v1beta1;
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
import "k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/schema/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
......@@ -54,7 +54,7 @@ message StatefulSet {
// StatefulSetList is a collection of StatefulSets.
message StatefulSetList {
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
optional k8s.io.kubernetes.pkg.apis.meta.v1.ListMeta metadata = 1;
repeated StatefulSet items = 2;
}
......@@ -73,7 +73,7 @@ message StatefulSetSpec {
// If empty, defaulted to labels on the pod template.
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2;
optional k8s.io.kubernetes.pkg.apis.meta.v1.LabelSelector selector = 2;
// Template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
......
......@@ -18,6 +18,7 @@ package v1beta1
import (
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
versionedwatch "k8s.io/client-go/pkg/watch/versioned"
......@@ -29,6 +30,11 @@ const GroupName = "apps"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
AddToScheme = SchemeBuilder.AddToScheme
......@@ -41,7 +47,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&StatefulSetList{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&v1.ExportOptions{},
&metav1.ExportOptions{},
)
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
......
......@@ -26,8 +26,8 @@ import (
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg4_resource "k8s.io/client-go/pkg/api/resource"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg2_v1 "k8s.io/client-go/pkg/api/v1"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
pkg5_intstr "k8s.io/client-go/pkg/util/intstr"
"reflect"
......@@ -66,8 +66,8 @@ func init() {
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg4_resource.Quantity
var v1 pkg1_unversioned.TypeMeta
var v2 pkg2_v1.ObjectMeta
var v1 pkg2_v1.ObjectMeta
var v2 pkg1_v1.TypeMeta
var v3 pkg3_types.UID
var v4 pkg5_intstr.IntOrString
var v5 time.Time
......@@ -668,7 +668,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.Selector == nil {
x.Selector = new(pkg1_unversioned.LabelSelector)
x.Selector = new(pkg1_v1.LabelSelector)
}
yym57 := z.DecBinary()
_ = yym57
......@@ -760,7 +760,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
}
} else {
if x.Selector == nil {
x.Selector = new(pkg1_unversioned.LabelSelector)
x.Selector = new(pkg1_v1.LabelSelector)
}
yym66 := z.DecBinary()
_ = yym66
......@@ -1295,7 +1295,7 @@ func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "metadata":
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv112 := &x.ListMeta
yym113 := z.DecBinary()
......@@ -1376,7 +1376,7 @@ func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv119 := &x.ListMeta
yym120 := z.DecBinary()
......
......@@ -17,8 +17,8 @@ limitations under the License.
package v1beta1
import (
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// +genclient=true
......@@ -30,7 +30,7 @@ import (
// The StatefulSet guarantees that a given network identity will always
// map to the same storage identity.
type StatefulSet struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
......@@ -58,7 +58,7 @@ type StatefulSetSpec struct {
// If empty, defaulted to labels on the pod template.
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
// Template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
......@@ -96,8 +96,8 @@ type StatefulSetStatus struct {
// StatefulSetList is a collection of StatefulSets.
type StatefulSetList struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
}
......@@ -22,9 +22,9 @@ package v1beta1
import (
api "k8s.io/client-go/pkg/api"
unversioned "k8s.io/client-go/pkg/api/unversioned"
v1 "k8s.io/client-go/pkg/api/v1"
api_v1 "k8s.io/client-go/pkg/api/v1"
apps "k8s.io/client-go/pkg/apis/apps"
v1 "k8s.io/client-go/pkg/apis/meta/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
unsafe "unsafe"
......@@ -129,8 +129,8 @@ func autoConvert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSet
if err := api.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
return err
}
out.Selector = (*unversioned.LabelSelector)(unsafe.Pointer(in.Selector))
if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
return err
}
out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
......@@ -142,11 +142,11 @@ func autoConvert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.Statef
if err := api.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
return err
}
out.Selector = (*unversioned.LabelSelector)(unsafe.Pointer(in.Selector))
if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
return err
}
out.VolumeClaimTemplates = *(*[]v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
out.VolumeClaimTemplates = *(*[]api_v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
out.ServiceName = in.ServiceName
return nil
}
......
// +build !ignore_autogenerated
/*
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 file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1beta1
import (
v1 "k8s.io/client-go/pkg/api/v1"
meta_v1 "k8s.io/client-go/pkg/apis/meta/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
)
}
func DeepCopy_v1beta1_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatefulSet)
out := out.(*StatefulSet)
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
if err := DeepCopy_v1beta1_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
}
func DeepCopy_v1beta1_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatefulSetList)
out := out.(*StatefulSetList)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]StatefulSet, len(*in))
for i := range *in {
if err := DeepCopy_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
}
func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatefulSetSpec)
out := out.(*StatefulSetSpec)
if in.Replicas != nil {
in, out := &in.Replicas, &out.Replicas
*out = new(int32)
**out = **in
} else {
out.Replicas = nil
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(meta_v1.LabelSelector)
if err := meta_v1.DeepCopy_v1_LabelSelector(*in, *out, c); err != nil {
return err
}
} else {
out.Selector = nil
}
if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
return err
}
if in.VolumeClaimTemplates != nil {
in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
*out = make([]v1.PersistentVolumeClaim, len(*in))
for i := range *in {
if err := v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.VolumeClaimTemplates = nil
}
out.ServiceName = in.ServiceName
return nil
}
}
func DeepCopy_v1beta1_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatefulSetStatus)
out := out.(*StatefulSetStatus)
if in.ObservedGeneration != nil {
in, out := &in.ObservedGeneration, &out.ObservedGeneration
*out = new(int64)
**out = **in
} else {
out.ObservedGeneration = nil
}
out.Replicas = in.Replicas
return nil
}
}
// +build !ignore_autogenerated
/*
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 file was autogenerated by deepcopy-gen. Do not edit it manually!
package apps
import (
api "k8s.io/client-go/pkg/api"
v1 "k8s.io/client-go/pkg/apis/meta/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
)
}
func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatefulSet)
out := out.(*StatefulSet)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
if err := DeepCopy_apps_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
}
func DeepCopy_apps_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatefulSetList)
out := out.(*StatefulSetList)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]StatefulSet, len(*in))
for i := range *in {
if err := DeepCopy_apps_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
}
func DeepCopy_apps_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatefulSetSpec)
out := out.(*StatefulSetSpec)
out.Replicas = in.Replicas
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(v1.LabelSelector)
if err := v1.DeepCopy_v1_LabelSelector(*in, *out, c); err != nil {
return err
}
} else {
out.Selector = nil
}
if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
return err
}
if in.VolumeClaimTemplates != nil {
in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
*out = make([]api.PersistentVolumeClaim, len(*in))
for i := range *in {
if err := api.DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.VolumeClaimTemplates = nil
}
out.ServiceName = in.ServiceName
return nil
}
}
func DeepCopy_apps_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatefulSetStatus)
out := out.(*StatefulSetStatus)
if in.ObservedGeneration != nil {
in, out := &in.ObservedGeneration, &out.ObservedGeneration
*out = new(int64)
**out = **in
} else {
out.ObservedGeneration = nil
}
out.Replicas = in.Replicas
return nil
}
}
reviewers:
- lavalamp
- wojtek-t
- deads2k
- sttts
- timothysc
- mbohlool
- jianhuiz
......@@ -18,6 +18,7 @@ package authentication
import (
"k8s.io/client-go/pkg/api"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
)
......@@ -47,7 +48,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&api.ListOptions{},
&api.DeleteOptions{},
&api.ExportOptions{},
&metav1.ExportOptions{},
&TokenReview{},
)
......
......@@ -26,7 +26,7 @@ import (
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg2_api "k8s.io/client-go/pkg/api"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
"reflect"
"runtime"
......@@ -64,7 +64,7 @@ func init() {
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg2_api.ObjectMeta
var v1 pkg1_unversioned.TypeMeta
var v1 pkg1_v1.TypeMeta
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
......@@ -784,7 +784,7 @@ func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "creationTimestamp":
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
x.CreationTimestamp = pkg1_v1.Time{}
} else {
yyv76 := &x.CreationTimestamp
yym77 := z.DecBinary()
......@@ -801,7 +801,7 @@ func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "deletionTimestamp":
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
x.ObjectMeta.DeletionTimestamp = new(pkg1_v1.Time)
}
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
......@@ -809,7 +809,7 @@ func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
x.DeletionTimestamp = new(pkg1_v1.Time)
}
yym79 := z.DecBinary()
_ = yym79
......@@ -1080,7 +1080,7 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
x.CreationTimestamp = pkg1_v1.Time{}
} else {
yyv103 := &x.CreationTimestamp
yym104 := z.DecBinary()
......@@ -1096,7 +1096,7 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
}
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
x.ObjectMeta.DeletionTimestamp = new(pkg1_v1.Time)
}
yyj93++
if yyhl93 {
......@@ -1115,7 +1115,7 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
x.DeletionTimestamp = new(pkg1_v1.Time)
}
yym106 := z.DecBinary()
_ = yym106
......
......@@ -18,7 +18,7 @@ package authentication
import (
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
const (
......@@ -42,7 +42,7 @@ const (
// TokenReview attempts to authenticate a token to a known user.
type TokenReview struct {
unversioned.TypeMeta
metav1.TypeMeta
// ObjectMeta fulfills the meta.ObjectMetaAccessor interface so that the stock
// REST handler paths work
api.ObjectMeta
......
......@@ -1236,46 +1236,46 @@ var (
)
var fileDescriptorGenerated = []byte{
// 654 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x93, 0xcd, 0x6e, 0xd3, 0x4a,
0x14, 0xc7, 0xed, 0x7c, 0xf4, 0x26, 0x93, 0xdb, 0x7b, 0xcb, 0x48, 0x48, 0x51, 0x24, 0x9c, 0x28,
0x6c, 0x82, 0xd4, 0x8e, 0x95, 0x8a, 0x8f, 0xaa, 0x15, 0x8b, 0x5a, 0x2d, 0xa8, 0x0b, 0x84, 0x34,
0xa5, 0x08, 0x21, 0xb1, 0x98, 0x38, 0xa7, 0xae, 0x71, 0x63, 0x5b, 0xe3, 0x99, 0x94, 0xee, 0xfa,
0x08, 0x2c, 0x59, 0xf2, 0x1e, 0xbc, 0x40, 0x97, 0x5d, 0xb0, 0x60, 0x81, 0x2a, 0x12, 0x5e, 0x04,
0xcd, 0x78, 0x68, 0xd2, 0xa6, 0x41, 0xa2, 0xdd, 0x79, 0xfe, 0x73, 0xfe, 0xbf, 0xf3, 0x31, 0x3e,
0x68, 0x33, 0x5a, 0xcb, 0x48, 0x98, 0xb8, 0x91, 0xec, 0x01, 0x8f, 0x41, 0x40, 0xe6, 0xa6, 0x51,
0xe0, 0xb2, 0x34, 0xcc, 0x5c, 0x26, 0xc5, 0x01, 0xc4, 0x22, 0xf4, 0x99, 0x08, 0x93, 0xd8, 0x1d,
0x76, 0x7b, 0x20, 0x58, 0xd7, 0x0d, 0x20, 0x06, 0xce, 0x04, 0xf4, 0x49, 0xca, 0x13, 0x91, 0xe0,
0x6e, 0x8e, 0x20, 0x13, 0x04, 0x49, 0xa3, 0x80, 0x28, 0x04, 0xb9, 0x8c, 0x20, 0x06, 0xd1, 0x58,
0x09, 0x42, 0x71, 0x20, 0x7b, 0xc4, 0x4f, 0x06, 0x6e, 0x90, 0x04, 0x89, 0xab, 0x49, 0x3d, 0xb9,
0xaf, 0x4f, 0xfa, 0xa0, 0xbf, 0xf2, 0x0c, 0x8d, 0xd5, 0xb9, 0x45, 0xba, 0x1c, 0xb2, 0x44, 0x72,
0x1f, 0xae, 0x56, 0xd5, 0x78, 0x34, 0xdf, 0x23, 0xe3, 0x21, 0xf0, 0x2c, 0x4c, 0x62, 0xe8, 0xcf,
0xd8, 0x96, 0xe7, 0xdb, 0x86, 0x33, 0xad, 0x37, 0x56, 0xae, 0x8f, 0xe6, 0x32, 0x16, 0xe1, 0x60,
0xb6, 0xa6, 0x87, 0x7f, 0x0e, 0xcf, 0xfc, 0x03, 0x18, 0xb0, 0x19, 0x57, 0xf7, 0x7a, 0x97, 0x14,
0xe1, 0xa1, 0x1b, 0xc6, 0x22, 0x13, 0xfc, 0xaa, 0xa5, 0xfd, 0x04, 0xa1, 0xed, 0x0f, 0x82, 0xb3,
0xd7, 0xec, 0x50, 0x02, 0x6e, 0xa2, 0x72, 0x28, 0x60, 0x90, 0xd5, 0xed, 0x56, 0xb1, 0x53, 0xf5,
0xaa, 0xe3, 0xf3, 0x66, 0x79, 0x47, 0x09, 0x34, 0xd7, 0xd7, 0x2b, 0x9f, 0x3e, 0x37, 0xad, 0x93,
0xef, 0x2d, 0xab, 0xfd, 0xa5, 0x80, 0x6a, 0xaf, 0x92, 0x08, 0x62, 0x0a, 0xc3, 0x10, 0x8e, 0xf0,
0x1b, 0x54, 0x19, 0x80, 0x60, 0x7d, 0x26, 0x58, 0xdd, 0x6e, 0xd9, 0x9d, 0xda, 0x6a, 0x87, 0xcc,
0x7d, 0x6e, 0x32, 0xec, 0x92, 0x97, 0xbd, 0xf7, 0xe0, 0x8b, 0x17, 0x20, 0x98, 0x87, 0x4f, 0xcf,
0x9b, 0xd6, 0xf8, 0xbc, 0x89, 0x26, 0x1a, 0xbd, 0xa0, 0xe1, 0x3e, 0x2a, 0x65, 0x29, 0xf8, 0xf5,
0x82, 0xa6, 0x7a, 0xe4, 0xaf, 0x7f, 0x22, 0x32, 0x55, 0xe7, 0x6e, 0x0a, 0xbe, 0xf7, 0xaf, 0xc9,
0x57, 0x52, 0x27, 0xaa, 0xe9, 0xf8, 0x10, 0x2d, 0x64, 0x82, 0x09, 0x99, 0xd5, 0x8b, 0x3a, 0xcf,
0xd6, 0x2d, 0xf3, 0x68, 0x96, 0xf7, 0x9f, 0xc9, 0xb4, 0x90, 0x9f, 0xa9, 0xc9, 0xd1, 0x7e, 0x8c,
0xfe, 0xbf, 0x52, 0x14, 0xbe, 0x8f, 0xca, 0x42, 0x49, 0x7a, 0x7a, 0x55, 0x6f, 0xd1, 0x38, 0xcb,
0x79, 0x5c, 0x7e, 0xd7, 0xfe, 0x6a, 0xa3, 0x3b, 0x33, 0x59, 0xf0, 0x06, 0x5a, 0x9c, 0xaa, 0x08,
0xfa, 0x1a, 0x51, 0xf1, 0xee, 0x1a, 0xc4, 0xe2, 0xe6, 0xf4, 0x25, 0xbd, 0x1c, 0x8b, 0xdf, 0xa1,
0x92, 0xcc, 0x80, 0x9b, 0xf1, 0x6e, 0xdc, 0xa0, 0xed, 0xbd, 0x0c, 0xf8, 0x4e, 0xbc, 0x9f, 0x4c,
0xe6, 0xaa, 0x14, 0xaa, 0xb1, 0xaa, 0x2d, 0xe0, 0x3c, 0xe1, 0x7a, 0xac, 0x53, 0x6d, 0x6d, 0x2b,
0x91, 0xe6, 0x77, 0xed, 0x51, 0x01, 0x55, 0x7e, 0x53, 0xf0, 0x32, 0xaa, 0x28, 0x67, 0xcc, 0x06,
0x60, 0x66, 0xb1, 0x64, 0x4c, 0x3a, 0x46, 0xe9, 0xf4, 0x22, 0x02, 0xdf, 0x43, 0x45, 0x19, 0xf6,
0x75, 0xf5, 0x55, 0xaf, 0x66, 0x02, 0x8b, 0x7b, 0x3b, 0x5b, 0x54, 0xe9, 0xb8, 0x8d, 0x16, 0x02,
0x9e, 0xc8, 0x54, 0x3d, 0xab, 0xfa, 0xa5, 0x91, 0x7a, 0x8c, 0xe7, 0x5a, 0xa1, 0xe6, 0x06, 0x47,
0xa8, 0x0c, 0x6a, 0x07, 0xea, 0xa5, 0x56, 0xb1, 0x53, 0x5b, 0x7d, 0x76, 0x8b, 0x11, 0x10, 0xbd,
0x4c, 0xdb, 0xb1, 0xe0, 0xc7, 0x53, 0xad, 0x2a, 0x8d, 0xe6, 0x39, 0x1a, 0x47, 0x66, 0xe1, 0x74,
0x0c, 0x5e, 0x42, 0xc5, 0x08, 0x8e, 0xf3, 0x36, 0xa9, 0xfa, 0xc4, 0xbb, 0xa8, 0x3c, 0x54, 0xbb,
0x68, 0xde, 0xe3, 0xe9, 0x0d, 0x8a, 0x99, 0x2c, 0x34, 0xcd, 0x59, 0xeb, 0x85, 0x35, 0xdb, 0x7b,
0x70, 0x3a, 0x72, 0xac, 0xb3, 0x91, 0x63, 0x7d, 0x1b, 0x39, 0xd6, 0xc9, 0xd8, 0xb1, 0x4f, 0xc7,
0x8e, 0x7d, 0x36, 0x76, 0xec, 0x1f, 0x63, 0xc7, 0xfe, 0xf8, 0xd3, 0xb1, 0xde, 0xfe, 0x63, 0x00,
0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xce, 0xcd, 0xc2, 0x6f, 0xeb, 0x05, 0x00, 0x00,
// 644 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0x4f, 0x13, 0x41,
0x14, 0xdf, 0xed, 0x1f, 0x6c, 0xa7, 0xa2, 0x38, 0x89, 0x49, 0xd3, 0xc4, 0x6d, 0x53, 0x2f, 0x35,
0x81, 0xd9, 0x94, 0x18, 0x25, 0x10, 0x0f, 0x6c, 0x40, 0xc3, 0xc1, 0x98, 0x0c, 0x62, 0x8c, 0x89,
0x87, 0xe9, 0xf6, 0xb1, 0xac, 0x4b, 0x77, 0x37, 0x33, 0xb3, 0x45, 0x6e, 0x7c, 0x04, 0x8f, 0x1e,
0xfd, 0x1e, 0x7e, 0x01, 0x8e, 0x1c, 0x3c, 0x78, 0x30, 0xc4, 0xd6, 0x2f, 0x62, 0x66, 0x76, 0xa4,
0x85, 0x02, 0x89, 0x70, 0xdb, 0xf9, 0xcd, 0xfb, 0xfd, 0x79, 0x6f, 0xf6, 0xa1, 0xf5, 0x68, 0x45,
0x90, 0x30, 0x71, 0xa3, 0xac, 0x07, 0x3c, 0x06, 0x09, 0xc2, 0x4d, 0xa3, 0xc0, 0x65, 0x69, 0x28,
0x5c, 0x96, 0xc9, 0x3d, 0x88, 0x65, 0xe8, 0x33, 0x19, 0x26, 0xb1, 0x3b, 0xec, 0xf6, 0x40, 0xb2,
0xae, 0x1b, 0x40, 0x0c, 0x9c, 0x49, 0xe8, 0x93, 0x94, 0x27, 0x32, 0xc1, 0xdd, 0x5c, 0x82, 0x4c,
0x24, 0x48, 0x1a, 0x05, 0x44, 0x49, 0x90, 0xf3, 0x12, 0xc4, 0x48, 0x34, 0x96, 0x82, 0x50, 0xee,
0x65, 0x3d, 0xe2, 0x27, 0x03, 0x37, 0x48, 0x82, 0xc4, 0xd5, 0x4a, 0xbd, 0x6c, 0x57, 0x9f, 0xf4,
0x41, 0x7f, 0xe5, 0x0e, 0x8d, 0xe5, 0x2b, 0x43, 0xba, 0x1c, 0x44, 0x92, 0x71, 0x1f, 0x2e, 0xa6,
0x6a, 0x2c, 0x5e, 0xcd, 0x19, 0xce, 0xf4, 0x70, 0x8d, 0x83, 0x70, 0x07, 0x20, 0xd9, 0x65, 0x9c,
0xa5, 0xcb, 0x39, 0x3c, 0x8b, 0x65, 0x38, 0x98, 0x0d, 0xf4, 0xf4, 0xfa, 0x72, 0xe1, 0xef, 0xc1,
0x80, 0xcd, 0xb0, 0xba, 0x97, 0xb3, 0x32, 0x19, 0xee, 0xbb, 0x61, 0x2c, 0x85, 0xe4, 0x17, 0x29,
0xed, 0xe7, 0x08, 0x6d, 0x7e, 0x96, 0x9c, 0xbd, 0x63, 0xfb, 0x19, 0xe0, 0x26, 0x2a, 0x87, 0x12,
0x06, 0xa2, 0x6e, 0xb7, 0x8a, 0x9d, 0xaa, 0x57, 0x1d, 0x9f, 0x36, 0xcb, 0x5b, 0x0a, 0xa0, 0x39,
0xbe, 0x5a, 0xf9, 0xfa, 0xad, 0x69, 0x1d, 0xfd, 0x6a, 0x59, 0xed, 0xef, 0x05, 0x54, 0x7b, 0x9b,
0x44, 0x10, 0x53, 0x18, 0x86, 0x70, 0x80, 0xdf, 0xa3, 0x8a, 0xea, 0xbd, 0xcf, 0x24, 0xab, 0xdb,
0x2d, 0xbb, 0x53, 0x5b, 0xee, 0x90, 0x2b, 0xdf, 0x9a, 0x0c, 0xbb, 0xe4, 0x4d, 0xef, 0x13, 0xf8,
0xf2, 0x35, 0x48, 0xe6, 0xe1, 0xe3, 0xd3, 0xa6, 0x35, 0x3e, 0x6d, 0xa2, 0x09, 0x46, 0xcf, 0xd4,
0x70, 0x1f, 0x95, 0x44, 0x0a, 0x7e, 0xbd, 0xa0, 0x55, 0x3d, 0xf2, 0xdf, 0x7f, 0x10, 0x99, 0xca,
0xb9, 0x9d, 0x82, 0xef, 0xdd, 0x35, 0x7e, 0x25, 0x75, 0xa2, 0x5a, 0x1d, 0xef, 0xa3, 0x39, 0x21,
0x99, 0xcc, 0x44, 0xbd, 0xa8, 0x7d, 0x36, 0x6e, 0xe9, 0xa3, 0xb5, 0xbc, 0x7b, 0xc6, 0x69, 0x2e,
0x3f, 0x53, 0xe3, 0xd1, 0x7e, 0x86, 0xee, 0x5f, 0x08, 0x85, 0x1f, 0xa3, 0xb2, 0x54, 0x90, 0x9e,
0x5e, 0xd5, 0x9b, 0x37, 0xcc, 0x72, 0x5e, 0x97, 0xdf, 0xb5, 0x7f, 0xd8, 0xe8, 0xc1, 0x8c, 0x0b,
0x5e, 0x43, 0xf3, 0x53, 0x89, 0xa0, 0xaf, 0x25, 0x2a, 0xde, 0x43, 0x23, 0x31, 0xbf, 0x3e, 0x7d,
0x49, 0xcf, 0xd7, 0xe2, 0x8f, 0xa8, 0x94, 0x09, 0xe0, 0x66, 0xbc, 0x6b, 0x37, 0x68, 0x7b, 0x47,
0x00, 0xdf, 0x8a, 0x77, 0x93, 0xc9, 0x5c, 0x15, 0x42, 0xb5, 0xac, 0x6a, 0x0b, 0x38, 0x4f, 0xb8,
0x1e, 0xeb, 0x54, 0x5b, 0x9b, 0x0a, 0xa4, 0xf9, 0x5d, 0x7b, 0x54, 0x40, 0x95, 0x7f, 0x2a, 0x78,
0x11, 0x55, 0x14, 0x33, 0x66, 0x03, 0x30, 0xb3, 0x58, 0x30, 0x24, 0x5d, 0xa3, 0x70, 0x7a, 0x56,
0x81, 0x1f, 0xa1, 0x62, 0x16, 0xf6, 0x75, 0xfa, 0xaa, 0x57, 0x33, 0x85, 0xc5, 0x9d, 0xad, 0x0d,
0xaa, 0x70, 0xdc, 0x46, 0x73, 0x01, 0x4f, 0xb2, 0x54, 0x3d, 0xab, 0xfa, 0xa5, 0x91, 0x7a, 0x8c,
0x57, 0x1a, 0xa1, 0xe6, 0x06, 0x47, 0xa8, 0x0c, 0x6a, 0x07, 0xea, 0xa5, 0x56, 0xb1, 0x53, 0x5b,
0x7e, 0x79, 0x8b, 0x11, 0x10, 0xbd, 0x4c, 0x9b, 0xb1, 0xe4, 0x87, 0x53, 0xad, 0x2a, 0x8c, 0xe6,
0x1e, 0x8d, 0x03, 0xb3, 0x70, 0xba, 0x06, 0x2f, 0xa0, 0x62, 0x04, 0x87, 0x79, 0x9b, 0x54, 0x7d,
0xe2, 0x6d, 0x54, 0x1e, 0xaa, 0x5d, 0x34, 0xef, 0xf1, 0xe2, 0x06, 0x61, 0x26, 0x0b, 0x4d, 0x73,
0xad, 0xd5, 0xc2, 0x8a, 0xed, 0x3d, 0x39, 0x1e, 0x39, 0xd6, 0xc9, 0xc8, 0xb1, 0x7e, 0x8e, 0x1c,
0xeb, 0x68, 0xec, 0xd8, 0xc7, 0x63, 0xc7, 0x3e, 0x19, 0x3b, 0xf6, 0xef, 0xb1, 0x63, 0x7f, 0xf9,
0xe3, 0x58, 0x1f, 0xee, 0x18, 0x81, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x1c, 0x7a, 0x75,
0xe8, 0x05, 0x00, 0x00,
}
......@@ -22,8 +22,8 @@ syntax = 'proto2';
package k8s.io.kubernetes.pkg.apis.authentication.v1beta1;
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
import "k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/schema/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
......
......@@ -18,6 +18,7 @@ package v1beta1
import (
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
)
......@@ -28,6 +29,11 @@ const GroupName = "authentication.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
AddToScheme = SchemeBuilder.AddToScheme
......@@ -38,7 +44,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&v1.ListOptions{},
&v1.DeleteOptions{},
&v1.ExportOptions{},
&metav1.ExportOptions{},
&TokenReview{},
)
......
......@@ -25,8 +25,8 @@ import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg2_v1 "k8s.io/client-go/pkg/api/v1"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
"reflect"
"runtime"
......@@ -63,8 +63,8 @@ func init() {
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg1_unversioned.TypeMeta
var v1 pkg2_v1.ObjectMeta
var v0 pkg2_v1.ObjectMeta
var v1 pkg1_v1.TypeMeta
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
......
......@@ -19,8 +19,8 @@ package v1beta1
import (
"fmt"
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// +genclient=true
......@@ -31,7 +31,7 @@ import (
// Note: TokenReview requests may be cached by the webhook token authenticator
// plugin in the kube-apiserver.
type TokenReview struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
......
// +build !ignore_autogenerated
/*
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 file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1beta1
import (
v1 "k8s.io/client-go/pkg/api/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
)
}
func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*TokenReview)
out := out.(*TokenReview)
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.Spec = in.Spec
if err := DeepCopy_v1beta1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
}
func DeepCopy_v1beta1_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*TokenReviewSpec)
out := out.(*TokenReviewSpec)
out.Token = in.Token
return nil
}
}
func DeepCopy_v1beta1_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*TokenReviewStatus)
out := out.(*TokenReviewStatus)
out.Authenticated = in.Authenticated
if err := DeepCopy_v1beta1_UserInfo(&in.User, &out.User, c); err != nil {
return err
}
out.Error = in.Error
return nil
}
}
func DeepCopy_v1beta1_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*UserInfo)
out := out.(*UserInfo)
out.Username = in.Username
out.UID = in.UID
if in.Groups != nil {
in, out := &in.Groups, &out.Groups
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Groups = nil
}
if in.Extra != nil {
in, out := &in.Extra, &out.Extra
*out = make(map[string]ExtraValue)
for key, val := range *in {
if newVal, err := c.DeepCopy(&val); err != nil {
return err
} else {
(*out)[key] = *newVal.(*ExtraValue)
}
}
} else {
out.Extra = nil
}
return nil
}
}
// +build !ignore_autogenerated
/*
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 file was autogenerated by deepcopy-gen. Do not edit it manually!
package authentication
import (
api "k8s.io/client-go/pkg/api"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
)
}
func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*TokenReview)
out := out.(*TokenReview)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.Spec = in.Spec
if err := DeepCopy_authentication_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
}
func DeepCopy_authentication_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*TokenReviewSpec)
out := out.(*TokenReviewSpec)
out.Token = in.Token
return nil
}
}
func DeepCopy_authentication_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*TokenReviewStatus)
out := out.(*TokenReviewStatus)
out.Authenticated = in.Authenticated
if err := DeepCopy_authentication_UserInfo(&in.User, &out.User, c); err != nil {
return err
}
out.Error = in.Error
return nil
}
}
func DeepCopy_authentication_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*UserInfo)
out := out.(*UserInfo)
out.Username = in.Username
out.UID = in.UID
if in.Groups != nil {
in, out := &in.Groups, &out.Groups
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Groups = nil
}
if in.Extra != nil {
in, out := &in.Extra, &out.Extra
*out = make(map[string]ExtraValue)
for key, val := range *in {
if newVal, err := c.DeepCopy(&val); err != nil {
return err
} else {
(*out)[key] = *newVal.(*ExtraValue)
}
}
} else {
out.Extra = nil
}
return nil
}
}
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- liggitt
- nikhiljindal
- erictune
- sttts
- ncdc
- timothysc
- dims
- mml
- mbohlool
- david-mcmahon
- jianhuiz
......@@ -26,7 +26,7 @@ import (
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg2_api "k8s.io/client-go/pkg/api"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
"reflect"
"runtime"
......@@ -64,7 +64,7 @@ func init() {
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg2_api.ObjectMeta
var v1 pkg1_unversioned.TypeMeta
var v1 pkg1_v1.TypeMeta
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
......@@ -784,7 +784,7 @@ func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder
}
case "creationTimestamp":
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
x.CreationTimestamp = pkg1_v1.Time{}
} else {
yyv76 := &x.CreationTimestamp
yym77 := z.DecBinary()
......@@ -801,7 +801,7 @@ func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder
}
case "deletionTimestamp":
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
x.ObjectMeta.DeletionTimestamp = new(pkg1_v1.Time)
}
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
......@@ -809,7 +809,7 @@ func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
x.DeletionTimestamp = new(pkg1_v1.Time)
}
yym79 := z.DecBinary()
_ = yym79
......@@ -1080,7 +1080,7 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
x.CreationTimestamp = pkg1_v1.Time{}
} else {
yyv103 := &x.CreationTimestamp
yym104 := z.DecBinary()
......@@ -1096,7 +1096,7 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod
}
}
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
x.ObjectMeta.DeletionTimestamp = new(pkg1_v1.Time)
}
yyj93++
if yyhl93 {
......@@ -1115,7 +1115,7 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
x.DeletionTimestamp = new(pkg1_v1.Time)
}
yym106 := z.DecBinary()
_ = yym106
......@@ -2025,7 +2025,7 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Dec
}
case "creationTimestamp":
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
x.CreationTimestamp = pkg1_v1.Time{}
} else {
yyv195 := &x.CreationTimestamp
yym196 := z.DecBinary()
......@@ -2042,7 +2042,7 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Dec
}
case "deletionTimestamp":
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
x.ObjectMeta.DeletionTimestamp = new(pkg1_v1.Time)
}
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
......@@ -2050,7 +2050,7 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Dec
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
x.DeletionTimestamp = new(pkg1_v1.Time)
}
yym198 := z.DecBinary()
_ = yym198
......@@ -2321,7 +2321,7 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
x.CreationTimestamp = pkg1_v1.Time{}
} else {
yyv222 := &x.CreationTimestamp
yym223 := z.DecBinary()
......@@ -2337,7 +2337,7 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D
}
}
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
x.ObjectMeta.DeletionTimestamp = new(pkg1_v1.Time)
}
yyj212++
if yyhl212 {
......@@ -2356,7 +2356,7 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
x.DeletionTimestamp = new(pkg1_v1.Time)
}
yym225 := z.DecBinary()
_ = yym225
......@@ -3266,7 +3266,7 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.De
}
case "creationTimestamp":
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
x.CreationTimestamp = pkg1_v1.Time{}
} else {
yyv314 := &x.CreationTimestamp
yym315 := z.DecBinary()
......@@ -3283,7 +3283,7 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.De
}
case "deletionTimestamp":
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
x.ObjectMeta.DeletionTimestamp = new(pkg1_v1.Time)
}
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
......@@ -3291,7 +3291,7 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.De
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
x.DeletionTimestamp = new(pkg1_v1.Time)
}
yym317 := z.DecBinary()
_ = yym317
......@@ -3562,7 +3562,7 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
x.CreationTimestamp = pkg1_v1.Time{}
} else {
yyv341 := &x.CreationTimestamp
yym342 := z.DecBinary()
......@@ -3578,7 +3578,7 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.
}
}
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
x.ObjectMeta.DeletionTimestamp = new(pkg1_v1.Time)
}
yyj331++
if yyhl331 {
......@@ -3597,7 +3597,7 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
x.DeletionTimestamp = new(pkg1_v1.Time)
}
yym344 := z.DecBinary()
_ = yym344
......
......@@ -18,7 +18,7 @@ package authorization
import (
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// +genclient=true
......@@ -28,7 +28,7 @@ import (
// SubjectAccessReview checks whether or not a user or group can perform an action. Not filling in a
// spec.namespace means "in all namespaces".
type SubjectAccessReview struct {
unversioned.TypeMeta
metav1.TypeMeta
api.ObjectMeta
// Spec holds information about the request being evaluated
......@@ -46,7 +46,7 @@ type SubjectAccessReview struct {
// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
// to check whether they can perform an action
type SelfSubjectAccessReview struct {
unversioned.TypeMeta
metav1.TypeMeta
api.ObjectMeta
// Spec holds information about the request being evaluated.
......@@ -63,7 +63,7 @@ type SelfSubjectAccessReview struct {
// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
// checking.
type LocalSubjectAccessReview struct {
unversioned.TypeMeta
metav1.TypeMeta
api.ObjectMeta
// Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
......
......@@ -22,8 +22,8 @@ syntax = 'proto2';
package k8s.io.kubernetes.pkg.apis.authorization.v1beta1;
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
import "k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/schema/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
......
......@@ -18,6 +18,7 @@ package v1beta1
import (
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
versionedwatch "k8s.io/client-go/pkg/watch/versioned"
......@@ -29,6 +30,11 @@ const GroupName = "authorization.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
AddToScheme = SchemeBuilder.AddToScheme
......@@ -39,7 +45,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&v1.ListOptions{},
&v1.DeleteOptions{},
&v1.ExportOptions{},
&metav1.ExportOptions{},
&SelfSubjectAccessReview{},
&SubjectAccessReview{},
......
......@@ -25,8 +25,8 @@ import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg2_v1 "k8s.io/client-go/pkg/api/v1"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
"reflect"
"runtime"
......@@ -63,8 +63,8 @@ func init() {
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg1_unversioned.TypeMeta
var v1 pkg2_v1.ObjectMeta
var v0 pkg2_v1.ObjectMeta
var v1 pkg1_v1.TypeMeta
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
......
......@@ -19,8 +19,8 @@ package v1beta1
import (
"fmt"
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// +genclient=true
......@@ -29,7 +29,7 @@ import (
// SubjectAccessReview checks whether or not a user or group can perform an action.
type SubjectAccessReview struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
......@@ -49,7 +49,7 @@ type SubjectAccessReview struct {
// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
// to check whether they can perform an action
type SelfSubjectAccessReview struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
......@@ -68,7 +68,7 @@ type SelfSubjectAccessReview struct {
// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
// checking.
type LocalSubjectAccessReview struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
......
// +build !ignore_autogenerated
/*
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 file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1beta1
import (
v1 "k8s.io/client-go/pkg/api/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
)
}
func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*LocalSubjectAccessReview)
out := out.(*LocalSubjectAccessReview)
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
}
func DeepCopy_v1beta1_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*NonResourceAttributes)
out := out.(*NonResourceAttributes)
out.Path = in.Path
out.Verb = in.Verb
return nil
}
}
func DeepCopy_v1beta1_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ResourceAttributes)
out := out.(*ResourceAttributes)
out.Namespace = in.Namespace
out.Verb = in.Verb
out.Group = in.Group
out.Version = in.Version
out.Resource = in.Resource
out.Subresource = in.Subresource
out.Name = in.Name
return nil
}
}
func DeepCopy_v1beta1_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SelfSubjectAccessReview)
out := out.(*SelfSubjectAccessReview)
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
}
func DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SelfSubjectAccessReviewSpec)
out := out.(*SelfSubjectAccessReviewSpec)
if in.ResourceAttributes != nil {
in, out := &in.ResourceAttributes, &out.ResourceAttributes
*out = new(ResourceAttributes)
**out = **in
} else {
out.ResourceAttributes = nil
}
if in.NonResourceAttributes != nil {
in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
*out = new(NonResourceAttributes)
**out = **in
} else {
out.NonResourceAttributes = nil
}
return nil
}
}
func DeepCopy_v1beta1_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SubjectAccessReview)
out := out.(*SubjectAccessReview)
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
}
func DeepCopy_v1beta1_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SubjectAccessReviewSpec)
out := out.(*SubjectAccessReviewSpec)
if in.ResourceAttributes != nil {
in, out := &in.ResourceAttributes, &out.ResourceAttributes
*out = new(ResourceAttributes)
**out = **in
} else {
out.ResourceAttributes = nil
}
if in.NonResourceAttributes != nil {
in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
*out = new(NonResourceAttributes)
**out = **in
} else {
out.NonResourceAttributes = nil
}
out.User = in.User
if in.Groups != nil {
in, out := &in.Groups, &out.Groups
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Groups = nil
}
if in.Extra != nil {
in, out := &in.Extra, &out.Extra
*out = make(map[string]ExtraValue)
for key, val := range *in {
if newVal, err := c.DeepCopy(&val); err != nil {
return err
} else {
(*out)[key] = *newVal.(*ExtraValue)
}
}
} else {
out.Extra = nil
}
return nil
}
}
func DeepCopy_v1beta1_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SubjectAccessReviewStatus)
out := out.(*SubjectAccessReviewStatus)
out.Allowed = in.Allowed
out.Reason = in.Reason
out.EvaluationError = in.EvaluationError
return nil
}
}
// +build !ignore_autogenerated
/*
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 file was autogenerated by deepcopy-gen. Do not edit it manually!
package authorization
import (
api "k8s.io/client-go/pkg/api"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
)
}
func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*LocalSubjectAccessReview)
out := out.(*LocalSubjectAccessReview)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
}
func DeepCopy_authorization_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*NonResourceAttributes)
out := out.(*NonResourceAttributes)
out.Path = in.Path
out.Verb = in.Verb
return nil
}
}
func DeepCopy_authorization_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ResourceAttributes)
out := out.(*ResourceAttributes)
out.Namespace = in.Namespace
out.Verb = in.Verb
out.Group = in.Group
out.Version = in.Version
out.Resource = in.Resource
out.Subresource = in.Subresource
out.Name = in.Name
return nil
}
}
func DeepCopy_authorization_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SelfSubjectAccessReview)
out := out.(*SelfSubjectAccessReview)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
}
func DeepCopy_authorization_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SelfSubjectAccessReviewSpec)
out := out.(*SelfSubjectAccessReviewSpec)
if in.ResourceAttributes != nil {
in, out := &in.ResourceAttributes, &out.ResourceAttributes
*out = new(ResourceAttributes)
**out = **in
} else {
out.ResourceAttributes = nil
}
if in.NonResourceAttributes != nil {
in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
*out = new(NonResourceAttributes)
**out = **in
} else {
out.NonResourceAttributes = nil
}
return nil
}
}
func DeepCopy_authorization_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SubjectAccessReview)
out := out.(*SubjectAccessReview)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
}
func DeepCopy_authorization_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SubjectAccessReviewSpec)
out := out.(*SubjectAccessReviewSpec)
if in.ResourceAttributes != nil {
in, out := &in.ResourceAttributes, &out.ResourceAttributes
*out = new(ResourceAttributes)
**out = **in
} else {
out.ResourceAttributes = nil
}
if in.NonResourceAttributes != nil {
in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
*out = new(NonResourceAttributes)
**out = **in
} else {
out.NonResourceAttributes = nil
}
out.User = in.User
if in.Groups != nil {
in, out := &in.Groups, &out.Groups
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Groups = nil
}
if in.Extra != nil {
in, out := &in.Extra, &out.Extra
*out = make(map[string]ExtraValue)
for key, val := range *in {
if newVal, err := c.DeepCopy(&val); err != nil {
return err
} else {
(*out)[key] = *newVal.(*ExtraValue)
}
}
} else {
out.Extra = nil
}
return nil
}
}
func DeepCopy_authorization_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*SubjectAccessReviewStatus)
out := out.(*SubjectAccessReviewStatus)
out.Allowed = in.Allowed
out.Reason = in.Reason
out.EvaluationError = in.EvaluationError
return nil
}
}
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- caesarxuchao
- erictune
- sttts
- ncdc
- timothysc
- piosz
- dims
- errordeveloper
- madhusudancs
- krousey
- mml
- mbohlool
- david-mcmahon
- jianhuiz
......@@ -26,7 +26,7 @@ import (
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg2_api "k8s.io/client-go/pkg/api"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
"reflect"
"runtime"
......@@ -64,7 +64,7 @@ func init() {
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg2_api.ObjectMeta
var v1 pkg1_unversioned.TypeMeta
var v1 pkg1_v1.TypeMeta
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
......@@ -1665,7 +1665,7 @@ func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec19
}
} else {
if x.LastScaleTime == nil {
x.LastScaleTime = new(pkg1_unversioned.Time)
x.LastScaleTime = new(pkg1_v1.Time)
}
yym141 := z.DecBinary()
_ = yym141
......@@ -1764,7 +1764,7 @@ func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec
}
} else {
if x.LastScaleTime == nil {
x.LastScaleTime = new(pkg1_unversioned.Time)
x.LastScaleTime = new(pkg1_v1.Time)
}
yym150 := z.DecBinary()
_ = yym150
......@@ -2409,7 +2409,7 @@ func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978
}
case "metadata":
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv207 := &x.ListMeta
yym208 := z.DecBinary()
......@@ -2490,7 +2490,7 @@ func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec19
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv214 := &x.ListMeta
yym215 := z.DecBinary()
......
......@@ -18,12 +18,12 @@ package autoscaling
import (
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// Scale represents a scaling request for a resource.
type Scale struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
// +optional
api.ObjectMeta `json:"metadata,omitempty"`
......@@ -93,7 +93,7 @@ type HorizontalPodAutoscalerStatus struct {
// last time the HorizontalPodAutoscaler scaled the number of pods;
// used by the autoscaler to control how often the number of pods is changed.
// +optional
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty"`
LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty"`
// current number of replicas of pods managed by this autoscaler.
CurrentReplicas int32 `json:"currentReplicas"`
......@@ -111,7 +111,7 @@ type HorizontalPodAutoscalerStatus struct {
// configuration of a horizontal pod autoscaler.
type HorizontalPodAutoscaler struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
api.ObjectMeta `json:"metadata,omitempty"`
......@@ -126,9 +126,9 @@ type HorizontalPodAutoscaler struct {
// list of horizontal pod autoscaler objects.
type HorizontalPodAutoscalerList struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// +optional
unversioned.ListMeta `json:"metadata,omitempty"`
metav1.ListMeta `json:"metadata,omitempty"`
// list of horizontal pod autoscaler objects.
Items []HorizontalPodAutoscaler `json:"items"`
......
......@@ -22,8 +22,8 @@ syntax = 'proto2';
package k8s.io.kubernetes.pkg.apis.autoscaling.v1;
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
import "k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/schema/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
......@@ -63,7 +63,7 @@ message HorizontalPodAutoscaler {
message HorizontalPodAutoscalerList {
// Standard list metadata.
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
optional k8s.io.kubernetes.pkg.apis.meta.v1.ListMeta metadata = 1;
// list of horizontal pod autoscaler objects.
repeated HorizontalPodAutoscaler items = 2;
......@@ -97,7 +97,7 @@ message HorizontalPodAutoscalerStatus {
// last time the HorizontalPodAutoscaler scaled the number of pods;
// used by the autoscaler to control how often the number of pods is changed.
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastScaleTime = 2;
optional k8s.io.kubernetes.pkg.apis.meta.v1.Time lastScaleTime = 2;
// current number of replicas of pods managed by this autoscaler.
optional int32 currentReplicas = 3;
......
......@@ -18,6 +18,7 @@ package v1
import (
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
versionedwatch "k8s.io/client-go/pkg/watch/versioned"
......@@ -29,6 +30,11 @@ const GroupName = "autoscaling"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)
AddToScheme = SchemeBuilder.AddToScheme
......@@ -42,7 +48,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&Scale{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&v1.ExportOptions{},
&metav1.ExportOptions{},
)
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
......
......@@ -25,8 +25,8 @@ import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg2_v1 "k8s.io/client-go/pkg/api/v1"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
"reflect"
"runtime"
......@@ -63,8 +63,8 @@ func init() {
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg1_unversioned.Time
var v1 pkg2_v1.ObjectMeta
var v0 pkg2_v1.ObjectMeta
var v1 pkg1_v1.Time
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
......@@ -943,7 +943,7 @@ func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec19
}
} else {
if x.LastScaleTime == nil {
x.LastScaleTime = new(pkg1_unversioned.Time)
x.LastScaleTime = new(pkg1_v1.Time)
}
yym83 := z.DecBinary()
_ = yym83
......@@ -1042,7 +1042,7 @@ func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec
}
} else {
if x.LastScaleTime == nil {
x.LastScaleTime = new(pkg1_unversioned.Time)
x.LastScaleTime = new(pkg1_v1.Time)
}
yym92 := z.DecBinary()
_ = yym92
......@@ -1687,7 +1687,7 @@ func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978
}
case "metadata":
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv149 := &x.ListMeta
yym150 := z.DecBinary()
......@@ -1768,7 +1768,7 @@ func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec19
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv156 := &x.ListMeta
yym157 := z.DecBinary()
......
......@@ -17,8 +17,8 @@ limitations under the License.
package v1
import (
"k8s.io/client-go/pkg/api/unversioned"
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
......@@ -57,7 +57,7 @@ type HorizontalPodAutoscalerStatus struct {
// last time the HorizontalPodAutoscaler scaled the number of pods;
// used by the autoscaler to control how often the number of pods is changed.
// +optional
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
// current number of replicas of pods managed by this autoscaler.
CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
......@@ -75,7 +75,7 @@ type HorizontalPodAutoscalerStatus struct {
// configuration of a horizontal pod autoscaler.
type HorizontalPodAutoscaler struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
......@@ -91,10 +91,10 @@ type HorizontalPodAutoscaler struct {
// list of horizontal pod autoscaler objects.
type HorizontalPodAutoscalerList struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard list metadata.
// +optional
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// list of horizontal pod autoscaler objects.
Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
......@@ -102,7 +102,7 @@ type HorizontalPodAutoscalerList struct {
// Scale represents a scaling request for a resource.
type Scale struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
......
......@@ -21,8 +21,8 @@ limitations under the License.
package v1
import (
unversioned "k8s.io/client-go/pkg/api/unversioned"
autoscaling "k8s.io/client-go/pkg/apis/autoscaling"
meta_v1 "k8s.io/client-go/pkg/apis/meta/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
unsafe "unsafe"
......@@ -163,7 +163,7 @@ func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscal
func autoConvert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
out.LastScaleTime = (*unversioned.Time)(unsafe.Pointer(in.LastScaleTime))
out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
out.CurrentReplicas = in.CurrentReplicas
out.DesiredReplicas = in.DesiredReplicas
out.CurrentCPUUtilizationPercentage = (*int32)(unsafe.Pointer(in.CurrentCPUUtilizationPercentage))
......@@ -176,7 +176,7 @@ func Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutosc
func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
out.LastScaleTime = (*unversioned.Time)(unsafe.Pointer(in.LastScaleTime))
out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
out.CurrentReplicas = in.CurrentReplicas
out.DesiredReplicas = in.DesiredReplicas
out.CurrentCPUUtilizationPercentage = (*int32)(unsafe.Pointer(in.CurrentCPUUtilizationPercentage))
......
// +build !ignore_autogenerated
/*
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 file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1
import (
api_v1 "k8s.io/client-go/pkg/api/v1"
meta_v1 "k8s.io/client-go/pkg/apis/meta/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(&Scale{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
)
}
func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*CrossVersionObjectReference)
out := out.(*CrossVersionObjectReference)
out.Kind = in.Kind
out.Name = in.Name
out.APIVersion = in.APIVersion
return nil
}
}
func DeepCopy_v1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*HorizontalPodAutoscaler)
out := out.(*HorizontalPodAutoscaler)
out.TypeMeta = in.TypeMeta
if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
if err := DeepCopy_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
}
func DeepCopy_v1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*HorizontalPodAutoscalerList)
out := out.(*HorizontalPodAutoscalerList)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]HorizontalPodAutoscaler, len(*in))
for i := range *in {
if err := DeepCopy_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
}
func DeepCopy_v1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*HorizontalPodAutoscalerSpec)
out := out.(*HorizontalPodAutoscalerSpec)
out.ScaleTargetRef = in.ScaleTargetRef
if in.MinReplicas != nil {
in, out := &in.MinReplicas, &out.MinReplicas
*out = new(int32)
**out = **in
} else {
out.MinReplicas = nil
}
out.MaxReplicas = in.MaxReplicas
if in.TargetCPUUtilizationPercentage != nil {
in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage
*out = new(int32)
**out = **in
} else {
out.TargetCPUUtilizationPercentage = nil
}
return nil
}
}
func DeepCopy_v1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*HorizontalPodAutoscalerStatus)
out := out.(*HorizontalPodAutoscalerStatus)
if in.ObservedGeneration != nil {
in, out := &in.ObservedGeneration, &out.ObservedGeneration
*out = new(int64)
**out = **in
} else {
out.ObservedGeneration = nil
}
if in.LastScaleTime != nil {
in, out := &in.LastScaleTime, &out.LastScaleTime
*out = new(meta_v1.Time)
**out = (*in).DeepCopy()
} else {
out.LastScaleTime = nil
}
out.CurrentReplicas = in.CurrentReplicas
out.DesiredReplicas = in.DesiredReplicas
if in.CurrentCPUUtilizationPercentage != nil {
in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
*out = new(int32)
**out = **in
} else {
out.CurrentCPUUtilizationPercentage = nil
}
return nil
}
}
func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*Scale)
out := out.(*Scale)
out.TypeMeta = in.TypeMeta
if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.Spec = in.Spec
out.Status = in.Status
return nil
}
}
func DeepCopy_v1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ScaleSpec)
out := out.(*ScaleSpec)
out.Replicas = in.Replicas
return nil
}
}
func DeepCopy_v1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ScaleStatus)
out := out.(*ScaleStatus)
out.Replicas = in.Replicas
out.Selector = in.Selector
return nil
}
}
// +build !ignore_autogenerated
/*
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 file was autogenerated by deepcopy-gen. Do not edit it manually!
package autoscaling
import (
api "k8s.io/client-go/pkg/api"
v1 "k8s.io/client-go/pkg/apis/meta/v1"
conversion "k8s.io/client-go/pkg/conversion"
runtime "k8s.io/client-go/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(&Scale{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
)
}
func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*CrossVersionObjectReference)
out := out.(*CrossVersionObjectReference)
out.Kind = in.Kind
out.Name = in.Name
out.APIVersion = in.APIVersion
return nil
}
}
func DeepCopy_autoscaling_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*HorizontalPodAutoscaler)
out := out.(*HorizontalPodAutoscaler)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
if err := DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
}
func DeepCopy_autoscaling_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*HorizontalPodAutoscalerList)
out := out.(*HorizontalPodAutoscalerList)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]HorizontalPodAutoscaler, len(*in))
for i := range *in {
if err := DeepCopy_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
}
func DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*HorizontalPodAutoscalerSpec)
out := out.(*HorizontalPodAutoscalerSpec)
out.ScaleTargetRef = in.ScaleTargetRef
if in.MinReplicas != nil {
in, out := &in.MinReplicas, &out.MinReplicas
*out = new(int32)
**out = **in
} else {
out.MinReplicas = nil
}
out.MaxReplicas = in.MaxReplicas
if in.TargetCPUUtilizationPercentage != nil {
in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage
*out = new(int32)
**out = **in
} else {
out.TargetCPUUtilizationPercentage = nil
}
return nil
}
}
func DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*HorizontalPodAutoscalerStatus)
out := out.(*HorizontalPodAutoscalerStatus)
if in.ObservedGeneration != nil {
in, out := &in.ObservedGeneration, &out.ObservedGeneration
*out = new(int64)
**out = **in
} else {
out.ObservedGeneration = nil
}
if in.LastScaleTime != nil {
in, out := &in.LastScaleTime, &out.LastScaleTime
*out = new(v1.Time)
**out = (*in).DeepCopy()
} else {
out.LastScaleTime = nil
}
out.CurrentReplicas = in.CurrentReplicas
out.DesiredReplicas = in.DesiredReplicas
if in.CurrentCPUUtilizationPercentage != nil {
in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
*out = new(int32)
**out = **in
} else {
out.CurrentCPUUtilizationPercentage = nil
}
return nil
}
}
func DeepCopy_autoscaling_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*Scale)
out := out.(*Scale)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
out.Spec = in.Spec
out.Status = in.Status
return nil
}
}
func DeepCopy_autoscaling_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ScaleSpec)
out := out.(*ScaleSpec)
out.Replicas = in.Replicas
return nil
}
}
func DeepCopy_autoscaling_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ScaleStatus)
out := out.(*ScaleStatus)
out.Replicas = in.Replicas
out.Selector = in.Selector
return nil
}
}
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- caesarxuchao
- erictune
- sttts
- saad-ali
- ncdc
- timothysc
- soltysh
- dims
- errordeveloper
- mml
- mbohlool
- david-mcmahon
- jianhuiz
......@@ -27,7 +27,7 @@ import (
codec1978 "github.com/ugorji/go/codec"
pkg2_api "k8s.io/client-go/pkg/api"
pkg4_resource "k8s.io/client-go/pkg/api/resource"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
pkg5_intstr "k8s.io/client-go/pkg/util/intstr"
"reflect"
......@@ -67,7 +67,7 @@ func init() {
if false { // reference the types, but skip this branch at build/run time
var v0 pkg2_api.ObjectMeta
var v1 pkg4_resource.Quantity
var v2 pkg1_unversioned.TypeMeta
var v2 pkg1_v1.TypeMeta
var v3 pkg3_types.UID
var v4 pkg5_intstr.IntOrString
var v5 time.Time
......@@ -632,7 +632,7 @@ func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "metadata":
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv53 := &x.ListMeta
yym54 := z.DecBinary()
......@@ -713,7 +713,7 @@ func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv60 := &x.ListMeta
yym61 := z.DecBinary()
......@@ -1605,7 +1605,7 @@ func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.Selector == nil {
x.Selector = new(pkg1_unversioned.LabelSelector)
x.Selector = new(pkg1_v1.LabelSelector)
}
yym144 := z.DecBinary()
_ = yym144
......@@ -1747,7 +1747,7 @@ func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
} else {
if x.Selector == nil {
x.Selector = new(pkg1_unversioned.LabelSelector)
x.Selector = new(pkg1_v1.LabelSelector)
}
yym156 := z.DecBinary()
_ = yym156
......@@ -2126,7 +2126,7 @@ func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.StartTime == nil {
x.StartTime = new(pkg1_unversioned.Time)
x.StartTime = new(pkg1_v1.Time)
}
yym186 := z.DecBinary()
_ = yym186
......@@ -2147,7 +2147,7 @@ func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.CompletionTime == nil {
x.CompletionTime = new(pkg1_unversioned.Time)
x.CompletionTime = new(pkg1_v1.Time)
}
yym188 := z.DecBinary()
_ = yym188
......@@ -2232,7 +2232,7 @@ func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
} else {
if x.StartTime == nil {
x.StartTime = new(pkg1_unversioned.Time)
x.StartTime = new(pkg1_v1.Time)
}
yym196 := z.DecBinary()
_ = yym196
......@@ -2263,7 +2263,7 @@ func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
} else {
if x.CompletionTime == nil {
x.CompletionTime = new(pkg1_unversioned.Time)
x.CompletionTime = new(pkg1_v1.Time)
}
yym198 := z.DecBinary()
_ = yym198
......@@ -2630,7 +2630,7 @@ func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "lastProbeTime":
if r.TryDecodeAsNil() {
x.LastProbeTime = pkg1_unversioned.Time{}
x.LastProbeTime = pkg1_v1.Time{}
} else {
yyv231 := &x.LastProbeTime
yym232 := z.DecBinary()
......@@ -2647,7 +2647,7 @@ func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "lastTransitionTime":
if r.TryDecodeAsNil() {
x.LastTransitionTime = pkg1_unversioned.Time{}
x.LastTransitionTime = pkg1_v1.Time{}
} else {
yyv233 := &x.LastTransitionTime
yym234 := z.DecBinary()
......@@ -2732,7 +2732,7 @@ func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.LastProbeTime = pkg1_unversioned.Time{}
x.LastProbeTime = pkg1_v1.Time{}
} else {
yyv240 := &x.LastProbeTime
yym241 := z.DecBinary()
......@@ -2759,7 +2759,7 @@ func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.LastTransitionTime = pkg1_unversioned.Time{}
x.LastTransitionTime = pkg1_v1.Time{}
} else {
yyv242 := &x.LastTransitionTime
yym243 := z.DecBinary()
......@@ -3379,7 +3379,7 @@ func (x *CronJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "metadata":
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv298 := &x.ListMeta
yym299 := z.DecBinary()
......@@ -3460,7 +3460,7 @@ func (x *CronJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv305 := &x.ListMeta
yym306 := z.DecBinary()
......@@ -4114,7 +4114,7 @@ func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.LastScheduleTime == nil {
x.LastScheduleTime = new(pkg1_unversioned.Time)
x.LastScheduleTime = new(pkg1_v1.Time)
}
yym362 := z.DecBinary()
_ = yym362
......@@ -4181,7 +4181,7 @@ func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
} else {
if x.LastScheduleTime == nil {
x.LastScheduleTime = new(pkg1_unversioned.Time)
x.LastScheduleTime = new(pkg1_v1.Time)
}
yym367 := z.DecBinary()
_ = yym367
......
......@@ -18,14 +18,14 @@ package batch
import (
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/api/unversioned"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
)
// +genclient=true
// Job represents the configuration of a single job.
type Job struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
......@@ -44,11 +44,11 @@ type Job struct {
// JobList is a collection of jobs.
type JobList struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard list metadata
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
unversioned.ListMeta `json:"metadata,omitempty"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is the list of Job.
Items []Job `json:"items"`
......@@ -56,7 +56,7 @@ type JobList struct {
// JobTemplate describes a template for creating copies of a predefined pod.
type JobTemplate struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
......@@ -107,7 +107,7 @@ type JobSpec struct {
// Selector is a label query over pods that should match the pod count.
// Normally, the system sets this field for you.
// +optional
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
Selector *metav1.LabelSelector `json:"selector,omitempty"`
// ManualSelector controls generation of pod labels and pod selectors.
// Leave `manualSelector` unset unless you are certain what you are doing.
......@@ -137,13 +137,13 @@ type JobStatus struct {
// It is not guaranteed to be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC.
// +optional
StartTime *unversioned.Time `json:"startTime,omitempty"`
StartTime *metav1.Time `json:"startTime,omitempty"`
// CompletionTime represents time when the job was completed. It is not guaranteed to
// be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC.
// +optional
CompletionTime *unversioned.Time `json:"completionTime,omitempty"`
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
// Active is the number of actively running pods.
// +optional
......@@ -176,10 +176,10 @@ type JobCondition struct {
Status api.ConditionStatus `json:"status"`
// Last time the condition was checked.
// +optional
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
// Last time the condition transit from one status to another.
// +optional
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// (brief) reason for the condition's last transition.
// +optional
Reason string `json:"reason,omitempty"`
......@@ -192,7 +192,7 @@ type JobCondition struct {
// CronJob represents the configuration of a single cron job.
type CronJob struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
......@@ -211,11 +211,11 @@ type CronJob struct {
// CronJobList is a collection of cron jobs.
type CronJobList struct {
unversioned.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
// Standard list metadata
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
unversioned.ListMeta `json:"metadata,omitempty"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is the list of CronJob.
Items []CronJob `json:"items"`
......@@ -272,5 +272,5 @@ type CronJobStatus struct {
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
// +optional
LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty"`
LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
}
......@@ -22,8 +22,8 @@ syntax = 'proto2';
package k8s.io.kubernetes.pkg.apis.batch.v1;
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
import "k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/schema/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
......@@ -59,11 +59,11 @@ message JobCondition {
// Last time the condition was checked.
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3;
optional k8s.io.kubernetes.pkg.apis.meta.v1.Time lastProbeTime = 3;
// Last time the condition transit from one status to another.
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
optional k8s.io.kubernetes.pkg.apis.meta.v1.Time lastTransitionTime = 4;
// (brief) reason for the condition's last transition.
// +optional
......@@ -79,7 +79,7 @@ message JobList {
// Standard list metadata
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
optional k8s.io.kubernetes.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is the list of Job.
repeated Job items = 2;
......@@ -113,7 +113,7 @@ message JobSpec {
// Normally, the system sets this field for you.
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 4;
optional k8s.io.kubernetes.pkg.apis.meta.v1.LabelSelector selector = 4;
// ManualSelector controls generation of pod labels and pod selectors.
// Leave `manualSelector` unset unless you are certain what you are doing.
......@@ -145,13 +145,13 @@ message JobStatus {
// It is not guaranteed to be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC.
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 2;
optional k8s.io.kubernetes.pkg.apis.meta.v1.Time startTime = 2;
// CompletionTime represents time when the job was completed. It is not guaranteed to
// be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC.
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.Time completionTime = 3;
optional k8s.io.kubernetes.pkg.apis.meta.v1.Time completionTime = 3;
// Active is the number of actively running pods.
// +optional
......
......@@ -18,6 +18,7 @@ package v1
import (
"k8s.io/client-go/pkg/api/v1"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/runtime"
"k8s.io/client-go/pkg/runtime/schema"
versionedwatch "k8s.io/client-go/pkg/watch/versioned"
......@@ -29,6 +30,11 @@ const GroupName = "batch"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
AddToScheme = SchemeBuilder.AddToScheme
......@@ -41,7 +47,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&JobList{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&v1.ExportOptions{},
&metav1.ExportOptions{},
)
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
......
......@@ -26,8 +26,8 @@ import (
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg4_resource "k8s.io/client-go/pkg/api/resource"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg2_v1 "k8s.io/client-go/pkg/api/v1"
pkg1_v1 "k8s.io/client-go/pkg/apis/meta/v1"
pkg3_types "k8s.io/client-go/pkg/types"
pkg5_intstr "k8s.io/client-go/pkg/util/intstr"
"reflect"
......@@ -66,8 +66,8 @@ func init() {
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg4_resource.Quantity
var v1 pkg1_unversioned.TypeMeta
var v2 pkg2_v1.ObjectMeta
var v1 pkg2_v1.ObjectMeta
var v2 pkg1_v1.TypeMeta
var v3 pkg3_types.UID
var v4 pkg5_intstr.IntOrString
var v5 time.Time
......@@ -632,7 +632,7 @@ func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "metadata":
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv53 := &x.ListMeta
yym54 := z.DecBinary()
......@@ -713,7 +713,7 @@ func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv60 := &x.ListMeta
yym61 := z.DecBinary()
......@@ -1099,7 +1099,7 @@ func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.Selector == nil {
x.Selector = new(pkg1_unversioned.LabelSelector)
x.Selector = new(pkg1_v1.LabelSelector)
}
yym102 := z.DecBinary()
_ = yym102
......@@ -1241,7 +1241,7 @@ func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
} else {
if x.Selector == nil {
x.Selector = new(pkg1_unversioned.LabelSelector)
x.Selector = new(pkg1_v1.LabelSelector)
}
yym114 := z.DecBinary()
_ = yym114
......@@ -1620,7 +1620,7 @@ func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.StartTime == nil {
x.StartTime = new(pkg1_unversioned.Time)
x.StartTime = new(pkg1_v1.Time)
}
yym144 := z.DecBinary()
_ = yym144
......@@ -1641,7 +1641,7 @@ func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
} else {
if x.CompletionTime == nil {
x.CompletionTime = new(pkg1_unversioned.Time)
x.CompletionTime = new(pkg1_v1.Time)
}
yym146 := z.DecBinary()
_ = yym146
......@@ -1726,7 +1726,7 @@ func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
} else {
if x.StartTime == nil {
x.StartTime = new(pkg1_unversioned.Time)
x.StartTime = new(pkg1_v1.Time)
}
yym154 := z.DecBinary()
_ = yym154
......@@ -1757,7 +1757,7 @@ func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
} else {
if x.CompletionTime == nil {
x.CompletionTime = new(pkg1_unversioned.Time)
x.CompletionTime = new(pkg1_v1.Time)
}
yym156 := z.DecBinary()
_ = yym156
......@@ -2124,7 +2124,7 @@ func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "lastProbeTime":
if r.TryDecodeAsNil() {
x.LastProbeTime = pkg1_unversioned.Time{}
x.LastProbeTime = pkg1_v1.Time{}
} else {
yyv189 := &x.LastProbeTime
yym190 := z.DecBinary()
......@@ -2141,7 +2141,7 @@ func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "lastTransitionTime":
if r.TryDecodeAsNil() {
x.LastTransitionTime = pkg1_unversioned.Time{}
x.LastTransitionTime = pkg1_v1.Time{}
} else {
yyv191 := &x.LastTransitionTime
yym192 := z.DecBinary()
......@@ -2226,7 +2226,7 @@ func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.LastProbeTime = pkg1_unversioned.Time{}
x.LastProbeTime = pkg1_v1.Time{}
} else {
yyv198 := &x.LastProbeTime
yym199 := z.DecBinary()
......@@ -2253,7 +2253,7 @@ func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.LastTransitionTime = pkg1_unversioned.Time{}
x.LastTransitionTime = pkg1_v1.Time{}
} else {
yyv200 := &x.LastTransitionTime
yym201 := z.DecBinary()
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment