Vendor: Update k8s version

Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
This commit is contained in:
Michał Żyłowski 2017-02-03 14:41:32 +01:00
parent dfa93414c5
commit 52baf68d50
3756 changed files with 113013 additions and 92675 deletions

View file

@ -2,6 +2,8 @@ package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
@ -23,6 +25,7 @@ filegroup(
"//federation/cmd/federation-controller-manager:all-srcs",
"//federation/cmd/genfeddocs:all-srcs",
"//federation/cmd/kubefed:all-srcs",
"//federation/develop:all-srcs",
"//federation/pkg/dnsprovider:all-srcs",
"//federation/pkg/federation-controller:all-srcs",
"//federation/pkg/kubefed:all-srcs",
@ -30,3 +33,12 @@ filegroup(
],
tags = ["automanaged"],
)
pkg_tar(
name = "release",
files = glob([
"deploy/**",
"manifests/**",
]) + ["//federation/cluster:all-srcs"],
package_dir = "federation",
)

View file

@ -1,6 +1,13 @@
assignees:
- quinton-hoole
- madhusudancs
- mml
- nikhiljindal
reviewers:
- colhom
- csbell
- irfanurrehman
- madhusudancs
- mwielgus
- nikhiljindal
- shashidharatd
approvers:
- csbell
- madhusudancs
- mwielgus
- nikhiljindal

View file

@ -11,15 +11,12 @@ go_library(
name = "go_default_library",
srcs = [
"conversion.go",
"defaults.go",
"register.go",
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/fields:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",

View file

@ -99,7 +99,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper {
"DeleteOptions",
"Status")
mapper := api.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, core.Scheme)
mapper := meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, core.Scheme)
// setup aliases for groups of resources
mapper.AddResourceAlias("all", userResources...)

View file

@ -54,7 +54,7 @@ func Resource(resource string) schema.GroupResource {
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addConversionFuncs)
AddToScheme = SchemeBuilder.AddToScheme
)
@ -67,8 +67,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&api.Service{},
&api.Namespace{},
&api.NamespaceList{},
&api.ListOptions{},
&api.DeleteOptions{},
&api.Secret{},
&api.SecretList{},
&api.Event{},
@ -79,7 +77,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
// Register Unversioned types under their own special group
scheme.AddUnversionedTypes(Unversioned,
&metav1.ExportOptions{},
&metav1.Status{},
&metav1.APIVersions{},
&metav1.APIGroupList{},

View file

@ -41,8 +41,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&v1.Namespace{},
&v1.NamespaceList{},
&v1.ServiceList{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&v1.Secret{},
&v1.SecretList{},
&v1.Event{},

View file

@ -92,7 +92,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper {
ignoredKinds := sets.NewString()
return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
return meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, api.Scheme)
}
// interfacesFor returns the default Codec and ResourceVersioner for a given version

View file

@ -28,7 +28,7 @@ import (
)
func TestResourceVersioner(t *testing.T) {
cluster := federation.Cluster{ObjectMeta: api.ObjectMeta{ResourceVersion: "10"}}
cluster := federation.Cluster{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "10"}}
version, err := accessor.ResourceVersion(&cluster)
if err != nil {
t.Fatalf("unexpected error: %v", err)
@ -105,7 +105,7 @@ func TestRESTMapper(t *testing.T) {
t.Errorf("unexpected: %#v, expected: %#v", mapping, interfaces)
}
rc := &federation.Cluster{ObjectMeta: api.ObjectMeta{Name: "foo"}}
rc := &federation.Cluster{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}
name, err := mapping.MetadataAccessor.Name(rc)
if err != nil {
t.Errorf("unexpected error: %v", err)

View file

@ -19,7 +19,6 @@ package federation
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/api"
)
// GroupName is the group name use in this package
@ -47,8 +46,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Cluster{},
&ClusterList{},
&api.ListOptions{},
&api.DeleteOptions{},
)
return nil
}

View file

@ -99,7 +99,7 @@ type Cluster struct {
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
api.ObjectMeta
metav1.ObjectMeta
// Spec defines the behavior of the Cluster.
// +optional

View file

@ -468,7 +468,7 @@ func (this *Cluster) String() string {
return "nil"
}
s := strings.Join([]string{`&Cluster{`,
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterSpec", "ClusterSpec", 1), `&`, ``, 1) + `,`,
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "ClusterStatus", "ClusterStatus", 1), `&`, ``, 1) + `,`,
`}`,
@ -1487,56 +1487,56 @@ var (
)
var fileDescriptorGenerated = []byte{
// 806 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6a, 0xeb, 0x46,
0x14, 0xb6, 0xfc, 0x7b, 0x3d, 0xa9, 0xdb, 0xcb, 0xd0, 0x82, 0xeb, 0x85, 0x7c, 0x31, 0xa5, 0xf8,
0x96, 0x56, 0xc2, 0xa6, 0x94, 0x0b, 0xa5, 0x85, 0x2b, 0x5f, 0x0a, 0x01, 0x87, 0x94, 0x49, 0x28,
0x25, 0x14, 0x8a, 0x2c, 0x1f, 0x2b, 0xaa, 0xad, 0x1f, 0x66, 0x46, 0x06, 0x67, 0xd5, 0x07, 0xe8,
0xa2, 0x0f, 0xd1, 0x37, 0x28, 0x7d, 0x87, 0xec, 0x9a, 0x45, 0x17, 0x59, 0x99, 0xc6, 0x7d, 0x8b,
0xac, 0xca, 0x8c, 0x46, 0xb2, 0x15, 0xc5, 0x69, 0x6f, 0xb2, 0xd3, 0x39, 0x3a, 0xe7, 0xfb, 0xbe,
0x39, 0x7f, 0xe8, 0xcd, 0xfc, 0x15, 0x33, 0xbc, 0xd0, 0x9c, 0xc7, 0x13, 0xa0, 0x01, 0x70, 0x60,
0xe6, 0x0c, 0xa6, 0x40, 0x6d, 0xee, 0x85, 0x81, 0x69, 0x47, 0x5e, 0xce, 0x5e, 0x0e, 0x26, 0xc0,
0xed, 0x81, 0xe9, 0x42, 0x20, 0x5c, 0x30, 0x35, 0x22, 0x1a, 0xf2, 0x10, 0x7f, 0x9e, 0xa0, 0x18,
0x5b, 0x14, 0x63, 0x9b, 0x65, 0x08, 0x94, 0x5d, 0x5b, 0xa1, 0x74, 0x3e, 0x73, 0x3d, 0x7e, 0x1e,
0x4f, 0x0c, 0x27, 0xf4, 0x4d, 0x37, 0x74, 0x43, 0x53, 0x82, 0x4d, 0xe2, 0x99, 0xb4, 0xa4, 0x21,
0xbf, 0x12, 0x92, 0x8e, 0x22, 0x11, 0xa2, 0x7c, 0xdb, 0x39, 0xf7, 0x02, 0xa0, 0x2b, 0x33, 0x9a,
0xbb, 0x89, 0x4a, 0x1f, 0xb8, 0x6d, 0x2e, 0x0b, 0xd2, 0x3a, 0xe6, 0xbe, 0x2c, 0x1a, 0x07, 0xdc,
0xf3, 0xa1, 0x90, 0xf0, 0xc5, 0x7f, 0x25, 0x30, 0xe7, 0x1c, 0x7c, 0xbb, 0x90, 0x37, 0x2c, 0x56,
0x52, 0x89, 0x33, 0x29, 0xb0, 0x30, 0xa6, 0x4e, 0x91, 0xeb, 0xd3, 0xfd, 0x39, 0xf7, 0x3c, 0x65,
0x70, 0x7f, 0x74, 0xcc, 0xbd, 0x85, 0xe9, 0x05, 0x9c, 0x71, 0x7a, 0x37, 0xa5, 0xf7, 0x47, 0x19,
0x35, 0x46, 0x8b, 0x98, 0x71, 0xa0, 0xf8, 0x7b, 0xf4, 0x4c, 0x14, 0x69, 0x6a, 0x73, 0xbb, 0xad,
0xbd, 0xd0, 0xfa, 0x07, 0xc3, 0xbe, 0x51, 0xec, 0x5b, 0x34, 0x77, 0x45, 0xc3, 0x8c, 0xe5, 0xc0,
0x38, 0x9e, 0xfc, 0x04, 0x0e, 0x3f, 0x02, 0x6e, 0x5b, 0xf8, 0x72, 0xdd, 0x2d, 0x6d, 0xd6, 0x5d,
0xb4, 0xf5, 0x91, 0x0c, 0x0d, 0x3b, 0xa8, 0xca, 0x22, 0x70, 0xda, 0x65, 0x89, 0xfa, 0xda, 0x78,
0xcc, 0x34, 0x18, 0x4a, 0xe6, 0x49, 0x04, 0x8e, 0xf5, 0x8e, 0xa2, 0xab, 0x0a, 0x8b, 0x48, 0x70,
0x3c, 0x47, 0x75, 0xc6, 0x6d, 0x1e, 0xb3, 0x76, 0x45, 0xd2, 0x8c, 0x9e, 0x46, 0x23, 0xa1, 0xac,
0x77, 0x15, 0x51, 0x3d, 0xb1, 0x89, 0xa2, 0xe8, 0x5d, 0x57, 0xd0, 0x73, 0x15, 0x39, 0x0a, 0x83,
0xa9, 0x27, 0x20, 0xf0, 0x2b, 0x54, 0xe5, 0xab, 0x08, 0x64, 0xf1, 0x9a, 0xd6, 0x47, 0xa9, 0xc6,
0xd3, 0x55, 0x04, 0xb7, 0xeb, 0xee, 0xfb, 0x77, 0xe3, 0x85, 0x9f, 0xc8, 0x0c, 0xfc, 0x5d, 0xa6,
0xbd, 0x2c, 0x73, 0xbf, 0xce, 0xd3, 0xde, 0xae, 0xbb, 0x0f, 0x4e, 0x82, 0x91, 0x61, 0xe6, 0x65,
0x62, 0x17, 0xb5, 0x16, 0x36, 0xe3, 0xdf, 0xd2, 0x70, 0x02, 0xa7, 0x9e, 0x0f, 0xaa, 0x34, 0x9f,
0xa4, 0xa5, 0xd9, 0x9d, 0xe1, 0xb4, 0xb3, 0xcc, 0x10, 0x7d, 0x13, 0xfd, 0x15, 0x19, 0xd6, 0x07,
0x4a, 0x4a, 0x6b, 0xbc, 0x0b, 0x44, 0xf2, 0xb8, 0x78, 0x89, 0xb0, 0x70, 0x9c, 0x52, 0x3b, 0x60,
0xc9, 0xe3, 0x04, 0x5b, 0xf5, 0xad, 0xd9, 0x3a, 0x8a, 0x0d, 0x8f, 0x0b, 0x68, 0xe4, 0x1e, 0x06,
0xfc, 0x31, 0xaa, 0x53, 0xb0, 0x59, 0x18, 0xb4, 0x6b, 0xb2, 0x70, 0x59, 0xbf, 0x88, 0xf4, 0x12,
0xf5, 0x17, 0xbf, 0x44, 0x0d, 0x1f, 0x18, 0xb3, 0x5d, 0x68, 0xd7, 0x65, 0xe0, 0x7b, 0x2a, 0xb0,
0x71, 0x94, 0xb8, 0x49, 0xfa, 0xbf, 0xf7, 0xa7, 0x86, 0x0e, 0x54, 0xab, 0xc6, 0x1e, 0xe3, 0xf8,
0x87, 0xc2, 0x5a, 0x18, 0xff, 0xef, 0x41, 0x22, 0x5b, 0x2e, 0xc7, 0x73, 0xc5, 0xf5, 0x2c, 0xf5,
0xec, 0xac, 0xc6, 0x04, 0xd5, 0x3c, 0x0e, 0xbe, 0x68, 0x7c, 0xa5, 0x7f, 0x30, 0xfc, 0xea, 0x49,
0x43, 0x6b, 0xb5, 0x14, 0x53, 0xed, 0x50, 0x60, 0x92, 0x04, 0xba, 0xf7, 0x5b, 0x39, 0x7b, 0x91,
0xd8, 0x17, 0xfc, 0xbb, 0x86, 0x3a, 0x0c, 0xe8, 0x12, 0xe8, 0xeb, 0xe9, 0x94, 0x02, 0x63, 0xd6,
0x6a, 0xb4, 0xf0, 0x20, 0xe0, 0xa3, 0xc3, 0x37, 0x84, 0xb5, 0x35, 0xa9, 0xe4, 0xf8, 0x71, 0x4a,
0x4e, 0xf6, 0xe1, 0x5a, 0x3d, 0xa5, 0xad, 0xb3, 0x37, 0x84, 0x91, 0x07, 0x64, 0xe1, 0x1f, 0x51,
0x93, 0x81, 0x43, 0x81, 0x13, 0x98, 0xa9, 0x4b, 0x32, 0x7c, 0xf8, 0x3e, 0x8d, 0x43, 0xc7, 0x5e,
0x24, 0x07, 0x89, 0xc0, 0x0c, 0x28, 0x04, 0x0e, 0x58, 0xad, 0xcd, 0xba, 0xdb, 0x3c, 0x49, 0x81,
0xc8, 0x16, 0xb3, 0xf7, 0x97, 0x86, 0x5a, 0xb9, 0xed, 0xc7, 0x17, 0x08, 0x39, 0xe9, 0x66, 0xa5,
0x75, 0xf9, 0xe6, 0x49, 0x1d, 0xca, 0x16, 0x75, 0x7b, 0x31, 0x33, 0x17, 0x23, 0x3b, 0x6c, 0xb8,
0x8b, 0x6a, 0x17, 0x61, 0x00, 0xac, 0x5d, 0x7b, 0x51, 0xe9, 0x37, 0xad, 0xa6, 0xe8, 0xea, 0x99,
0x70, 0x90, 0xc4, 0x9f, 0x8c, 0xbe, 0xeb, 0x85, 0x81, 0x9a, 0xe8, 0x9d, 0xd1, 0x17, 0x5e, 0xa2,
0xfe, 0xf6, 0x7e, 0xd1, 0xd0, 0x87, 0x7b, 0x4b, 0x8e, 0x87, 0x08, 0x39, 0x99, 0xa5, 0x2e, 0xd7,
0x56, 0x5a, 0xf6, 0x87, 0xec, 0x44, 0xe1, 0x2f, 0x51, 0x2b, 0xd7, 0x27, 0x75, 0xb4, 0xb2, 0x4b,
0x91, 0x63, 0x23, 0xf9, 0x58, 0xeb, 0xe5, 0xe5, 0x8d, 0x5e, 0xba, 0xba, 0xd1, 0x4b, 0xd7, 0x37,
0x7a, 0xe9, 0xe7, 0x8d, 0xae, 0x5d, 0x6e, 0x74, 0xed, 0x6a, 0xa3, 0x6b, 0x7f, 0x6f, 0x74, 0xed,
0xd7, 0x7f, 0xf4, 0xd2, 0x59, 0x43, 0xd5, 0xec, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x15, 0xe8,
0xc4, 0x9a, 0x7c, 0x08, 0x00, 0x00,
// 802 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6b, 0x33, 0x55,
0x14, 0xce, 0xe4, 0xb3, 0xb9, 0x35, 0x5a, 0x2e, 0x0a, 0x31, 0x8b, 0x49, 0x09, 0x22, 0xad, 0xe8,
0x8c, 0x09, 0x22, 0x05, 0x51, 0xe8, 0xa4, 0x08, 0x85, 0x96, 0xca, 0x6d, 0x71, 0x51, 0x04, 0x9d,
0x4c, 0x4e, 0xa6, 0x63, 0x32, 0x1f, 0xdc, 0x7b, 0x27, 0x90, 0xae, 0xfc, 0x01, 0x2e, 0xfc, 0x11,
0xfe, 0x03, 0xd7, 0xee, 0xbb, 0xb3, 0x0b, 0x17, 0x5d, 0x05, 0x1b, 0xff, 0x45, 0x57, 0x2f, 0xf7,
0xce, 0xcd, 0x24, 0xd3, 0x24, 0x7d, 0xfb, 0xb6, 0xbb, 0x39, 0x67, 0xce, 0x79, 0x9e, 0xe7, 0x9e,
0x2f, 0x74, 0x34, 0x3c, 0x60, 0x86, 0x17, 0x9a, 0xc3, 0xb8, 0x07, 0x34, 0x00, 0x0e, 0xcc, 0x1c,
0x40, 0x1f, 0xa8, 0xcd, 0xbd, 0x30, 0x30, 0xed, 0xc8, 0xcb, 0xd8, 0xe3, 0x76, 0x0f, 0xb8, 0xdd,
0x36, 0x5d, 0x08, 0x84, 0x0b, 0xfa, 0x46, 0x44, 0x43, 0x1e, 0xe2, 0xaf, 0x12, 0x14, 0x63, 0x81,
0x62, 0x2c, 0xb2, 0x0c, 0x81, 0xb2, 0x6c, 0x2b, 0x94, 0xc6, 0x17, 0xae, 0xc7, 0xaf, 0xe2, 0x9e,
0xe1, 0x84, 0xbe, 0xe9, 0x86, 0x6e, 0x68, 0x4a, 0xb0, 0x5e, 0x3c, 0x90, 0x96, 0x34, 0xe4, 0x57,
0x42, 0xd2, 0x50, 0x24, 0x42, 0x94, 0x6f, 0x3b, 0x57, 0x5e, 0x00, 0x74, 0x62, 0x46, 0x43, 0x37,
0x51, 0xe9, 0x03, 0xb7, 0xcd, 0xf1, 0x8a, 0xb4, 0x86, 0xb9, 0x29, 0x8b, 0xc6, 0x01, 0xf7, 0x7c,
0x58, 0x49, 0xf8, 0xfa, 0x6d, 0x09, 0xcc, 0xb9, 0x02, 0xdf, 0x5e, 0xc9, 0xeb, 0xac, 0x56, 0x52,
0x89, 0x33, 0x29, 0xb0, 0x30, 0xa6, 0xce, 0x2a, 0xd7, 0xe7, 0x9b, 0x73, 0xd6, 0x3c, 0xa5, 0xbd,
0x3e, 0x3a, 0xe6, 0xde, 0xc8, 0xf4, 0x02, 0xce, 0x38, 0x7d, 0x9c, 0xd2, 0xfa, 0x3b, 0x8f, 0x2a,
0xdd, 0x51, 0xcc, 0x38, 0x50, 0xfc, 0x0b, 0xda, 0x12, 0x45, 0xea, 0xdb, 0xdc, 0xae, 0x6b, 0xbb,
0xda, 0xde, 0x76, 0xe7, 0x4b, 0x43, 0xf5, 0x6d, 0xf9, 0xad, 0x46, 0x34, 0x74, 0x93, 0x96, 0x89,
0x68, 0x63, 0xdc, 0x36, 0xce, 0x7a, 0xbf, 0x82, 0xc3, 0x4f, 0x81, 0xdb, 0x16, 0xbe, 0x99, 0x36,
0x73, 0xb3, 0x69, 0x13, 0x2d, 0x7c, 0x24, 0x45, 0xc5, 0x0e, 0x2a, 0xb2, 0x08, 0x9c, 0x7a, 0x5e,
0xa2, 0x1f, 0x1a, 0x2f, 0x99, 0x0a, 0x43, 0xc9, 0x3d, 0x8f, 0xc0, 0xb1, 0xde, 0x53, 0x74, 0x45,
0x61, 0x11, 0x09, 0x8e, 0x87, 0xa8, 0xcc, 0xb8, 0xcd, 0x63, 0x56, 0x2f, 0x48, 0x9a, 0xee, 0xeb,
0x68, 0x24, 0x94, 0xf5, 0xbe, 0x22, 0x2a, 0x27, 0x36, 0x51, 0x14, 0xad, 0xbb, 0x02, 0xda, 0x51,
0x91, 0xdd, 0x30, 0xe8, 0x7b, 0x02, 0x02, 0x1f, 0xa0, 0x22, 0x9f, 0x44, 0x20, 0x8b, 0x58, 0xb5,
0x3e, 0x99, 0x6b, 0xbc, 0x98, 0x44, 0xf0, 0x30, 0x6d, 0x7e, 0xf8, 0x38, 0x5e, 0xf8, 0x89, 0xcc,
0xc0, 0x3f, 0xa6, 0xda, 0xf3, 0x32, 0xf7, 0xbb, 0x2c, 0xed, 0xc3, 0xb4, 0xf9, 0xe4, 0x44, 0x18,
0x29, 0x66, 0x56, 0x26, 0x76, 0x51, 0x6d, 0x64, 0x33, 0xfe, 0x03, 0x0d, 0x7b, 0x70, 0xe1, 0xf9,
0xa0, 0x4a, 0xf3, 0xd9, 0xf3, 0xfa, 0x2b, 0x32, 0xac, 0x8f, 0x94, 0x94, 0xda, 0xc9, 0x32, 0x10,
0xc9, 0xe2, 0xe2, 0x31, 0xc2, 0xc2, 0x71, 0x41, 0xed, 0x80, 0x25, 0x8f, 0x13, 0x6c, 0xc5, 0x77,
0x66, 0x6b, 0x28, 0x36, 0x7c, 0xb2, 0x82, 0x46, 0xd6, 0x30, 0xe0, 0x4f, 0x51, 0x99, 0x82, 0xcd,
0xc2, 0xa0, 0x5e, 0x92, 0x85, 0x4b, 0xfb, 0x45, 0xa4, 0x97, 0xa8, 0xbf, 0x78, 0x1f, 0x55, 0x7c,
0x60, 0xcc, 0x76, 0xa1, 0x5e, 0x96, 0x81, 0x1f, 0xa8, 0xc0, 0xca, 0x69, 0xe2, 0x26, 0xf3, 0xff,
0xad, 0x7f, 0x34, 0xb4, 0xad, 0x5a, 0x75, 0xe2, 0x31, 0x8e, 0x7f, 0x5a, 0x59, 0x0f, 0xe3, 0x79,
0x0f, 0x12, 0xd9, 0x72, 0x39, 0x76, 0x14, 0xd7, 0xd6, 0xdc, 0xb3, 0xb4, 0x1a, 0x3d, 0x54, 0xf2,
0x38, 0xf8, 0xa2, 0xf1, 0x85, 0xbd, 0xed, 0xce, 0xb7, 0xaf, 0x1a, 0x5a, 0xab, 0xa6, 0x98, 0x4a,
0xc7, 0x02, 0x93, 0x24, 0xd0, 0xad, 0x3f, 0xf3, 0xe9, 0x8b, 0xc4, 0xbe, 0xe0, 0xbf, 0x34, 0xd4,
0x60, 0x40, 0xc7, 0x40, 0x0f, 0xfb, 0x7d, 0x0a, 0x8c, 0x59, 0x93, 0xee, 0xc8, 0x83, 0x80, 0x77,
0x8f, 0x8f, 0x08, 0xab, 0x6b, 0x52, 0xc9, 0xd9, 0xcb, 0x94, 0x9c, 0x6f, 0xc2, 0xb5, 0x5a, 0x4a,
0x5b, 0x63, 0x63, 0x08, 0x23, 0x4f, 0xc8, 0xc2, 0x3f, 0xa3, 0x2a, 0x03, 0x87, 0x02, 0x27, 0x30,
0x50, 0x97, 0xa4, 0xb3, 0x46, 0xa3, 0x6a, 0x83, 0x6c, 0x40, 0xe8, 0xd8, 0xa3, 0xe4, 0x20, 0x11,
0x18, 0x00, 0x85, 0xc0, 0x01, 0xab, 0x36, 0x9b, 0x36, 0xab, 0xe7, 0x73, 0x20, 0xb2, 0xc0, 0x6c,
0xfd, 0xab, 0xa1, 0x5a, 0x66, 0xfb, 0xf1, 0x35, 0x42, 0xce, 0x7c, 0xb3, 0xe6, 0x75, 0xf9, 0xfe,
0x55, 0x1d, 0x4a, 0x17, 0x75, 0x71, 0x31, 0x53, 0x17, 0x23, 0x4b, 0x6c, 0xb8, 0x89, 0x4a, 0xd7,
0x61, 0x00, 0xac, 0x5e, 0xda, 0x2d, 0xec, 0x55, 0xad, 0xaa, 0xe8, 0xea, 0xa5, 0x70, 0x90, 0xc4,
0x9f, 0x8c, 0xbe, 0xeb, 0x85, 0x81, 0x9a, 0xe8, 0xa5, 0xd1, 0x17, 0x5e, 0xa2, 0xfe, 0xb6, 0x7e,
0xd7, 0xd0, 0xc7, 0x1b, 0x4b, 0x8e, 0x3b, 0x08, 0x39, 0xa9, 0xa5, 0x2e, 0xd7, 0x42, 0x5a, 0xfa,
0x87, 0x2c, 0x45, 0xe1, 0x6f, 0x50, 0x2d, 0xd3, 0x27, 0x75, 0xb4, 0xd2, 0x4b, 0x91, 0x61, 0x23,
0xd9, 0x58, 0x6b, 0xff, 0xe6, 0x5e, 0xcf, 0xdd, 0xde, 0xeb, 0xb9, 0xbb, 0x7b, 0x3d, 0xf7, 0xdb,
0x4c, 0xd7, 0x6e, 0x66, 0xba, 0x76, 0x3b, 0xd3, 0xb5, 0xff, 0x66, 0xba, 0xf6, 0xc7, 0xff, 0x7a,
0xee, 0xb2, 0xa2, 0x6a, 0xf6, 0x26, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x52, 0x01, 0x24, 0x84, 0x08,
0x00, 0x00,
}

View file

@ -36,7 +36,7 @@ message Cluster {
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines the behavior of the Cluster.
// +optional

View file

@ -20,7 +20,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/api/v1"
)
// GroupName is the group name use in this package
@ -38,10 +37,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Cluster{},
&ClusterList{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&metav1.ExportOptions{},
&metav1.GetOptions{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View file

@ -1441,7 +1441,13 @@ func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] {
yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e)
yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(yy10) {
} else {
z.EncFallback(yy10)
}
} else {
r.EncodeNil()
}
@ -1451,7 +1457,13 @@ func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy12 := &x.ObjectMeta
yy12.CodecEncodeSelf(e)
yym13 := z.EncBinary()
_ = yym13
if false {
} else if z.HasExtensions() && z.EncExt(yy12) {
} else {
z.EncFallback(yy12)
}
}
}
if yyr2 || yy2arr2 {
@ -1575,24 +1587,30 @@ func (x *Cluster) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "metadata":
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg1_v1.ObjectMeta{}
x.ObjectMeta = pkg2_v1.ObjectMeta{}
} else {
yyv8 := &x.ObjectMeta
yyv8.CodecDecodeSelf(d)
yym9 := z.DecBinary()
_ = yym9
if false {
} else if z.HasExtensions() && z.DecExt(yyv8) {
} else {
z.DecFallback(yyv8, false)
}
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = ClusterSpec{}
} else {
yyv9 := &x.Spec
yyv9.CodecDecodeSelf(d)
yyv10 := &x.Spec
yyv10.CodecDecodeSelf(d)
}
case "status":
if r.TryDecodeAsNil() {
x.Status = ClusterStatus{}
} else {
yyv10 := &x.Status
yyv10.CodecDecodeSelf(d)
yyv11 := &x.Status
yyv11.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys3)
@ -1605,16 +1623,16 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj11 int
var yyb11 bool
var yyhl11 bool = l >= 0
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
var yyj12 int
var yyb12 bool
var yyhl12 bool = l >= 0
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1622,21 +1640,21 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
yyv12 := &x.Kind
yym13 := z.DecBinary()
_ = yym13
yyv13 := &x.Kind
yym14 := z.DecBinary()
_ = yym14
if false {
} else {
*((*string)(yyv12)) = r.DecodeString()
*((*string)(yyv13)) = r.DecodeString()
}
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1644,38 +1662,44 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
yyv14 := &x.APIVersion
yym15 := z.DecBinary()
_ = yym15
yyv15 := &x.APIVersion
yym16 := z.DecBinary()
_ = yym16
if false {
} else {
*((*string)(yyv14)) = r.DecodeString()
*((*string)(yyv15)) = r.DecodeString()
}
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg1_v1.ObjectMeta{}
x.ObjectMeta = pkg2_v1.ObjectMeta{}
} else {
yyv16 := &x.ObjectMeta
yyv16.CodecDecodeSelf(d)
yyv17 := &x.ObjectMeta
yym18 := z.DecBinary()
_ = yym18
if false {
} else if z.HasExtensions() && z.DecExt(yyv17) {
} else {
z.DecFallback(yyv17, false)
}
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1683,16 +1707,16 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Spec = ClusterSpec{}
} else {
yyv17 := &x.Spec
yyv17.CodecDecodeSelf(d)
yyv19 := &x.Spec
yyv19.CodecDecodeSelf(d)
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1700,21 +1724,21 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Status = ClusterStatus{}
} else {
yyv18 := &x.Status
yyv18.CodecDecodeSelf(d)
yyv20 := &x.Status
yyv20.CodecDecodeSelf(d)
}
for {
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj11-1, "")
z.DecStructFieldNotFound(yyj12-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

View file

@ -99,7 +99,7 @@ type Cluster struct {
// Standard object's 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"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the behavior of the Cluster.
// +optional

View file

@ -53,10 +53,7 @@ func RegisterConversions(scheme *runtime.Scheme) error {
}
func autoConvert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error {
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
return err
}
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
@ -71,10 +68,7 @@ func Convert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.
}
func autoConvert_federation_Cluster_To_v1beta1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error {
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
return err
}
out.ObjectMeta = in.ObjectMeta
if err := Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}

View file

@ -21,9 +21,10 @@ limitations under the License.
package v1beta1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1 "k8s.io/kubernetes/pkg/api/v1"
api_v1 "k8s.io/kubernetes/pkg/api/v1"
reflect "reflect"
)
@ -49,8 +50,10 @@ func DeepCopy_v1beta1_Cluster(in interface{}, out interface{}, c *conversion.Clo
in := in.(*Cluster)
out := out.(*Cluster)
*out = *in
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
return err
} else {
out.ObjectMeta = *newVal.(*v1.ObjectMeta)
}
if err := DeepCopy_v1beta1_ClusterSpec(&in.Spec, &out.Spec, c); err != nil {
return err
@ -99,13 +102,11 @@ func DeepCopy_v1beta1_ClusterSpec(in interface{}, out interface{}, c *conversion
if in.ServerAddressByClientCIDRs != nil {
in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]ServerAddressByClientCIDR, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
copy(*out, *in)
}
if in.SecretRef != nil {
in, out := &in.SecretRef, &out.SecretRef
*out = new(v1.LocalObjectReference)
*out = new(api_v1.LocalObjectReference)
**out = **in
}
return nil

View file

@ -27,6 +27,7 @@ go_test(
deps = [
"//federation/apis/federation:go_default_library",
"//pkg/api:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
],
)

View file

@ -19,6 +19,7 @@ package validation
import (
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/federation/apis/federation"
"k8s.io/kubernetes/pkg/api"
)
@ -26,7 +27,7 @@ import (
func TestValidateCluster(t *testing.T) {
successCases := []federation.Cluster{
{
ObjectMeta: api.ObjectMeta{Name: "cluster-s"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{
{
@ -46,15 +47,15 @@ func TestValidateCluster(t *testing.T) {
errorCases := map[string]federation.Cluster{
"missing cluster addresses": {
ObjectMeta: api.ObjectMeta{Name: "cluster-f"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-f"},
},
"empty cluster addresses": {
ObjectMeta: api.ObjectMeta{Name: "cluster-f"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-f"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{},
}},
"invalid_label": {
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "cluster-f",
Labels: map[string]string{
"NoUppercaseOrSpecialCharsLike=Equals": "bar",
@ -62,7 +63,7 @@ func TestValidateCluster(t *testing.T) {
},
},
"invalid cluster name (is a subdomain)": {
ObjectMeta: api.ObjectMeta{Name: "mycluster.mycompany"},
ObjectMeta: metav1.ObjectMeta{Name: "mycluster.mycompany"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{
{
@ -89,7 +90,7 @@ func TestValidateClusterUpdate(t *testing.T) {
successCases := []clusterUpdateTest{
{
old: federation.Cluster{
ObjectMeta: api.ObjectMeta{Name: "cluster-s"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{
{
@ -100,7 +101,7 @@ func TestValidateClusterUpdate(t *testing.T) {
},
},
update: federation.Cluster{
ObjectMeta: api.ObjectMeta{Name: "cluster-s"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{
{
@ -124,7 +125,7 @@ func TestValidateClusterUpdate(t *testing.T) {
errorCases := map[string]clusterUpdateTest{
"cluster name changed": {
old: federation.Cluster{
ObjectMeta: api.ObjectMeta{Name: "cluster-s"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{
{
@ -135,7 +136,7 @@ func TestValidateClusterUpdate(t *testing.T) {
},
},
update: federation.Cluster{
ObjectMeta: api.ObjectMeta{Name: "cluster-newname"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-newname"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{
{
@ -163,7 +164,7 @@ func TestValidateClusterStatusUpdate(t *testing.T) {
successCases := []clusterUpdateTest{
{
old: federation.Cluster{
ObjectMeta: api.ObjectMeta{Name: "cluster-s"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{
{
@ -179,7 +180,7 @@ func TestValidateClusterStatusUpdate(t *testing.T) {
},
},
update: federation.Cluster{
ObjectMeta: api.ObjectMeta{Name: "cluster-s"},
ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"},
Spec: federation.ClusterSpec{
ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{
{

View file

@ -21,6 +21,7 @@ limitations under the License.
package federation
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
api "k8s.io/kubernetes/pkg/api"
@ -51,8 +52,10 @@ func DeepCopy_federation_Cluster(in interface{}, out interface{}, c *conversion.
in := in.(*Cluster)
out := out.(*Cluster)
*out = *in
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
return err
} else {
out.ObjectMeta = *newVal.(*v1.ObjectMeta)
}
if err := DeepCopy_federation_ClusterSpec(&in.Spec, &out.Spec, c); err != nil {
return err
@ -115,9 +118,7 @@ func DeepCopy_federation_ClusterSpec(in interface{}, out interface{}, c *convers
if in.ServerAddressByClientCIDRs != nil {
in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]ServerAddressByClientCIDR, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
copy(*out, *in)
}
if in.SecretRef != nil {
in, out := &in.SecretRef, &out.SecretRef

File diff suppressed because it is too large Load diff

View file

@ -4640,6 +4640,10 @@
"affinity": {
"$ref": "v1.Affinity",
"description": "If specified, the pod's scheduling constraints"
},
"schedulername": {
"type": "string",
"description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler."
}
}
},
@ -4857,12 +4861,16 @@
"items": {
"$ref": "v1.KeyToPath"
},
"description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'."
"description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'."
},
"defaultMode": {
"type": "integer",
"format": "int32",
"description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set."
},
"optional": {
"type": "boolean",
"description": "Specify whether the Secret or it's keys must be defined"
}
}
},
@ -5288,12 +5296,16 @@
"items": {
"$ref": "v1.KeyToPath"
},
"description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'."
"description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'."
},
"defaultMode": {
"type": "integer",
"format": "int32",
"description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set."
},
"optional": {
"type": "boolean",
"description": "Specify whether the ConfigMap or it's keys must be defined"
}
}
},
@ -5474,7 +5486,11 @@
},
"terminationMessagePath": {
"type": "string",
"description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated."
"description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated."
},
"terminationMessagePolicy": {
"type": "string",
"description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated."
},
"imagePullPolicy": {
"type": "string",
@ -5540,6 +5556,10 @@
"configMapRef": {
"$ref": "v1.ConfigMapEnvSource",
"description": "The ConfigMap to select from"
},
"secretRef": {
"$ref": "v1.SecretEnvSource",
"description": "The Secret to select from"
}
}
},
@ -5550,6 +5570,24 @@
"name": {
"type": "string",
"description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
},
"optional": {
"type": "boolean",
"description": "Specify whether the ConfigMap must be defined"
}
}
},
"v1.SecretEnvSource": {
"id": "v1.SecretEnvSource",
"description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.",
"properties": {
"name": {
"type": "string",
"description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
},
"optional": {
"type": "boolean",
"description": "Specify whether the Secret must be defined"
}
}
},
@ -5610,6 +5648,10 @@
"key": {
"type": "string",
"description": "The key to select."
},
"optional": {
"type": "boolean",
"description": "Specify whether the ConfigMap or it's key must be defined"
}
}
},
@ -5627,6 +5669,10 @@
"key": {
"type": "string",
"description": "The key of the secret to select from. Must be a valid secret key."
},
"optional": {
"type": "boolean",
"description": "Specify whether the Secret or it's key must be defined"
}
}
},
@ -6269,7 +6315,7 @@
},
"v1.DeleteOptions": {
"id": "v1.DeleteOptions",
"description": "DeleteOptions may be provided when deleting an API object",
"description": "DeleteOptions may be provided when deleting an API object.",
"properties": {
"kind": {
"type": "string",

View file

@ -1050,7 +1050,7 @@
},
"v1.DeleteOptions": {
"id": "v1.DeleteOptions",
"description": "DeleteOptions may be provided when deleting an API object",
"description": "DeleteOptions may be provided when deleting an API object.",
"properties": {
"kind": {
"type": "string",

View file

@ -48,6 +48,14 @@
{
"path": "/apis/batch",
"description": "get information of a group"
},
{
"path": "/apis/autoscaling/v1",
"description": "API at /apis/autoscaling/v1"
},
{
"path": "/apis/autoscaling",
"description": "get information of a group"
}
],
"apiVersion": "",

View file

@ -4466,7 +4466,7 @@
},
"v1.DeleteOptions": {
"id": "v1.DeleteOptions",
"description": "DeleteOptions may be provided when deleting an API object",
"description": "DeleteOptions may be provided when deleting an API object.",
"properties": {
"kind": {
"type": "string",

View file

@ -17,15 +17,16 @@ go_library(
tags = ["automanaged"],
deps = [
"//federation/apis/federation/install:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/typed/discovery:go_default_library",
"//pkg/util/flowcontrol:go_default_library",
"//plugin/pkg/client/auth:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
],
)
@ -41,6 +42,7 @@ filegroup(
srcs = [
":package-srcs",
"//federation/client/clientset_generated/federation_clientset/fake:all-srcs",
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:all-srcs",
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:all-srcs",
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:all-srcs",
"//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:all-srcs",

View file

@ -18,14 +18,15 @@ package federation_clientset
import (
"github.com/golang/glog"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
v1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1"
v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1"
v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1"
v1beta1extensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1"
v1beta1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
"k8s.io/kubernetes/pkg/util/flowcontrol"
_ "k8s.io/kubernetes/plugin/pkg/client/auth"
)
type Interface interface {
@ -33,6 +34,9 @@ type Interface interface {
CoreV1() v1core.CoreV1Interface
// Deprecated: please explicitly pick a version if possible.
Core() v1core.CoreV1Interface
AutoscalingV1() v1autoscaling.AutoscalingV1Interface
// Deprecated: please explicitly pick a version if possible.
Autoscaling() v1autoscaling.AutoscalingV1Interface
BatchV1() v1batch.BatchV1Interface
// Deprecated: please explicitly pick a version if possible.
Batch() v1batch.BatchV1Interface
@ -49,6 +53,7 @@ type Interface interface {
type Clientset struct {
*discovery.DiscoveryClient
*v1core.CoreV1Client
*v1autoscaling.AutoscalingV1Client
*v1batch.BatchV1Client
*v1beta1extensions.ExtensionsV1beta1Client
*v1beta1federation.FederationV1beta1Client
@ -71,6 +76,23 @@ func (c *Clientset) Core() v1core.CoreV1Interface {
return c.CoreV1Client
}
// AutoscalingV1 retrieves the AutoscalingV1Client
func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
if c == nil {
return nil
}
return c.AutoscalingV1Client
}
// Deprecated: Autoscaling retrieves the default version of AutoscalingClient.
// Please explicitly pick a version.
func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
if c == nil {
return nil
}
return c.AutoscalingV1Client
}
// BatchV1 retrieves the BatchV1Client
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
if c == nil {
@ -131,7 +153,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
}
// NewForConfig creates a new Clientset for the given config.
func NewForConfig(c *restclient.Config) (*Clientset, error) {
func NewForConfig(c *rest.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
@ -142,6 +164,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.AutoscalingV1Client, err = v1autoscaling.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.BatchV1Client, err = v1batch.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@ -165,9 +191,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *Clientset {
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.CoreV1Client = v1core.NewForConfigOrDie(c)
cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c)
cs.BatchV1Client = v1batch.NewForConfigOrDie(c)
cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c)
cs.FederationV1beta1Client = v1beta1federation.NewForConfigOrDie(c)
@ -177,9 +204,10 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset {
}
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
func New(c rest.Interface) *Clientset {
var cs Clientset
cs.CoreV1Client = v1core.New(c)
cs.AutoscalingV1Client = v1autoscaling.New(c)
cs.BatchV1Client = v1batch.New(c)
cs.ExtensionsV1beta1Client = v1beta1extensions.New(c)
cs.FederationV1beta1Client = v1beta1federation.New(c)

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// This package has the automatically generated clientset.
package federation_clientset

View file

@ -16,6 +16,8 @@ go_library(
tags = ["automanaged"],
deps = [
"//federation/client/clientset_generated/federation_clientset:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library",

View file

@ -20,6 +20,8 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset"
v1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1"
fakev1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake"
v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1"
fakev1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake"
v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1"
@ -77,6 +79,16 @@ func (c *Clientset) Core() v1core.CoreV1Interface {
return &fakev1core.FakeCoreV1{Fake: &c.Fake}
}
// AutoscalingV1 retrieves the AutoscalingV1Client
func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
}
// Autoscaling retrieves the AutoscalingV1Client
func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
}
// BatchV1 retrieves the BatchV1Client
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
return &fakev1batch.FakeBatchV1{Fake: &c.Fake}

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// This package has the automatically generated fake clientset.
package fake

View file

@ -0,0 +1,45 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"autoscaling_client.go",
"doc.go",
"generated_expansion.go",
"horizontalpodautoscaler.go",
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/apis/autoscaling/v1:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake:all-srcs",
],
tags = ["automanaged"],
)

View file

@ -0,0 +1,97 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
fmt "fmt"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
)
type AutoscalingV1Interface interface {
RESTClient() rest.Interface
HorizontalPodAutoscalersGetter
}
// AutoscalingV1Client is used to interact with features provided by the autoscaling group.
type AutoscalingV1Client struct {
restClient rest.Interface
}
func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
return newHorizontalPodAutoscalers(c, namespace)
}
// NewForConfig creates a new AutoscalingV1Client for the given config.
func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &AutoscalingV1Client{client}, nil
}
// NewForConfigOrDie creates a new AutoscalingV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new AutoscalingV1Client for the given RESTClient.
func New(c rest.Interface) *AutoscalingV1Client {
return &AutoscalingV1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv, err := schema.ParseGroupVersion("autoscaling/v1")
if err != nil {
return err
}
// if autoscaling/v1 is not enabled, return an error
if !api.Registry.IsEnabledVersion(gv) {
return fmt.Errorf("autoscaling/v1 is not enabled")
}
config.APIPath = "/apis"
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
copyGroupVersion := gv
config.GroupVersion = &copyGroupVersion
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AutoscalingV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View file

@ -0,0 +1,20 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// This package has the automatically generated typed clients.
package v1

View file

@ -0,0 +1,42 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_autoscaling_client.go",
"fake_horizontalpodautoscaler.go",
],
tags = ["automanaged"],
deps = [
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library",
"//pkg/apis/autoscaling/v1:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

View file

@ -0,0 +1,20 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// Package fake has the automatically generated clients.
package fake

View file

@ -0,0 +1,38 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
import (
rest "k8s.io/client-go/rest"
v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
type FakeAutoscalingV1 struct {
*core.Fake
}
func (c *FakeAutoscalingV1) HorizontalPodAutoscalers(namespace string) v1.HorizontalPodAutoscalerInterface {
return &FakeHorizontalPodAutoscalers{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAutoscalingV1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View file

@ -0,0 +1,128 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
type FakeHorizontalPodAutoscalers struct {
Fake *FakeAutoscalingV1
ns string
}
var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v1", Resource: "horizontalpodautoscalers"}
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v1.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v1.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v1.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
return err
}
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{})
return err
}
func (c *FakeHorizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v1.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1.HorizontalPodAutoscalerList{}
for _, item := range obj.(*v1.HorizontalPodAutoscalerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v1.HorizontalPodAutoscaler), err
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2016 The Kubernetes Authors.
Copyright 2017 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.
@ -14,24 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package core
package v1
import (
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/fields"
)
func addDefaultingFuncs(scheme *runtime.Scheme) error {
return scheme.AddDefaultingFuncs(
func(obj *api.ListOptions) {
if obj.LabelSelector == nil {
obj.LabelSelector = labels.Everything()
}
if obj.FieldSelector == nil {
obj.FieldSelector = fields.Everything()
}
},
)
}
type HorizontalPodAutoscalerExpansion interface{}

View file

@ -0,0 +1,172 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
)
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
// A group's client should implement this interface.
type HorizontalPodAutoscalersGetter interface {
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
}
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
type HorizontalPodAutoscalerInterface interface {
Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
type horizontalPodAutoscalers struct {
client rest.Interface
ns string
}
// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *horizontalPodAutoscalers {
return &horizontalPodAutoscalers{
client: c.RESTClient(),
ns: namespace,
}
}
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Post().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
SubResource("status").
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&listOptions, api.ParameterCodec).
Body(options).
Do().
Error()
}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
VersionedParams(&options, api.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
result = &v1.HorizontalPodAutoscalerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, api.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, api.ParameterCodec).
Watch()
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("horizontalpodautoscalers").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View file

@ -18,13 +18,13 @@ go_library(
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apis/batch/v1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View file

@ -20,18 +20,18 @@ import (
fmt "fmt"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
type BatchV1Interface interface {
RESTClient() restclient.Interface
RESTClient() rest.Interface
JobsGetter
}
// BatchV1Client is used to interact with features provided by the batch group.
type BatchV1Client struct {
restClient restclient.Interface
restClient rest.Interface
}
func (c *BatchV1Client) Jobs(namespace string) JobInterface {
@ -39,12 +39,12 @@ func (c *BatchV1Client) Jobs(namespace string) JobInterface {
}
// NewForConfig creates a new BatchV1Client for the given config.
func NewForConfig(c *restclient.Config) (*BatchV1Client, error) {
func NewForConfig(c *rest.Config) (*BatchV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := restclient.RESTClientFor(&config)
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*BatchV1Client, error) {
// NewForConfigOrDie creates a new BatchV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *BatchV1Client {
func NewForConfigOrDie(c *rest.Config) *BatchV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV1Client {
}
// New creates a new BatchV1Client for the given RESTClient.
func New(c restclient.Interface) *BatchV1Client {
func New(c rest.Interface) *BatchV1Client {
return &BatchV1Client{c}
}
func setConfigDefaults(config *restclient.Config) error {
func setConfigDefaults(config *rest.Config) error {
gv, err := schema.ParseGroupVersion("batch/v1")
if err != nil {
return err
@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error {
}
config.APIPath = "/apis"
if config.UserAgent == "" {
config.UserAgent = restclient.DefaultKubernetesUserAgent()
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
copyGroupVersion := gv
config.GroupVersion = &copyGroupVersion
@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *BatchV1Client) RESTClient() restclient.Interface {
func (c *BatchV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// This package has the automatically generated typed clients.
package v1

View file

@ -17,15 +17,14 @@ go_library(
tags = ["automanaged"],
deps = [
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apis/batch/v1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// Package fake has the automatically generated clients.
package fake

View file

@ -17,8 +17,8 @@ limitations under the License.
package fake
import (
rest "k8s.io/client-go/rest"
v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -32,7 +32,7 @@ func (c *FakeBatchV1) Jobs(namespace string) v1.JobInterface {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeBatchV1) RESTClient() restclient.Interface {
var ret *restclient.RESTClient
func (c *FakeBatchV1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View file

@ -20,9 +20,8 @@ import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
api_v1 "k8s.io/kubernetes/pkg/api/v1"
v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -65,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *v1.Job) (*v1.Job, error) {
return obj.(*v1.Job), err
}
func (c *FakeJobs) Delete(name string, options *api_v1.DeleteOptions) error {
func (c *FakeJobs) Delete(name string, options *meta_v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &v1.Job{})
return err
}
func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
func (c *FakeJobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.JobList{})
@ -89,7 +88,7 @@ func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job,
return obj.(*v1.Job), err
}
func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1.JobList{})
@ -111,14 +110,14 @@ func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error)
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *FakeJobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
func (c *FakeJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))
}
// Patch applies the patch and returns the patched job.
func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v1.Job{})

View file

@ -18,11 +18,11 @@ package v1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
api_v1 "k8s.io/kubernetes/pkg/api/v1"
v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// JobsGetter has a method to return a JobInterface.
@ -36,18 +36,18 @@ type JobInterface interface {
Create(*v1.Job) (*v1.Job, error)
Update(*v1.Job) (*v1.Job, error)
UpdateStatus(*v1.Job) (*v1.Job, error)
Delete(name string, options *api_v1.DeleteOptions) error
DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error
Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Job, error)
List(opts api_v1.ListOptions) (*v1.JobList, error)
Watch(opts api_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
List(opts meta_v1.ListOptions) (*v1.JobList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
JobExpansion
}
// jobs implements JobInterface
type jobs struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -101,7 +101,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
}
// Delete takes name of the job and deletes it. Returns an error if one occurs.
func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error {
func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("jobs").
@ -112,7 +112,7 @@ func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("jobs").
@ -136,7 +136,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err
}
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
result = &v1.JobList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
@ -158,7 +158,7 @@ func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched job.
func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
result = &v1.Job{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -24,11 +24,12 @@ go_library(
deps = [
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View file

@ -18,10 +18,11 @@ package v1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// ConfigMapsGetter has a method to return a ConfigMapInterface.
@ -34,18 +35,18 @@ type ConfigMapsGetter interface {
type ConfigMapInterface interface {
Create(*v1.ConfigMap) (*v1.ConfigMap, error)
Update(*v1.ConfigMap) (*v1.ConfigMap, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error)
List(opts v1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
ConfigMapExpansion
}
// configMaps implements ConfigMapInterface
type configMaps struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -83,7 +84,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err
}
// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error {
func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("configmaps").
@ -94,7 +95,7 @@ func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("configmaps").
@ -118,7 +119,7 @@ func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.Co
}
// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) {
func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
result = &v1.ConfigMapList{}
err = c.client.Get().
Namespace(c.ns).
@ -130,7 +131,7 @@ func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err er
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
@ -140,7 +141,7 @@ func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched configMap.
func (c *configMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
result = &v1.ConfigMap{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -20,12 +20,12 @@ import (
fmt "fmt"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
type CoreV1Interface interface {
RESTClient() restclient.Interface
RESTClient() rest.Interface
ConfigMapsGetter
EventsGetter
NamespacesGetter
@ -35,7 +35,7 @@ type CoreV1Interface interface {
// CoreV1Client is used to interact with features provided by the group.
type CoreV1Client struct {
restClient restclient.Interface
restClient rest.Interface
}
func (c *CoreV1Client) ConfigMaps(namespace string) ConfigMapInterface {
@ -59,12 +59,12 @@ func (c *CoreV1Client) Services(namespace string) ServiceInterface {
}
// NewForConfig creates a new CoreV1Client for the given config.
func NewForConfig(c *restclient.Config) (*CoreV1Client, error) {
func NewForConfig(c *rest.Config) (*CoreV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := restclient.RESTClientFor(&config)
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
@ -73,7 +73,7 @@ func NewForConfig(c *restclient.Config) (*CoreV1Client, error) {
// NewForConfigOrDie creates a new CoreV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *CoreV1Client {
func NewForConfigOrDie(c *rest.Config) *CoreV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@ -82,11 +82,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreV1Client {
}
// New creates a new CoreV1Client for the given RESTClient.
func New(c restclient.Interface) *CoreV1Client {
func New(c rest.Interface) *CoreV1Client {
return &CoreV1Client{c}
}
func setConfigDefaults(config *restclient.Config) error {
func setConfigDefaults(config *rest.Config) error {
gv, err := schema.ParseGroupVersion("/v1")
if err != nil {
return err
@ -97,7 +97,7 @@ func setConfigDefaults(config *restclient.Config) error {
}
config.APIPath = "/api"
if config.UserAgent == "" {
config.UserAgent = restclient.DefaultKubernetesUserAgent()
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
copyGroupVersion := gv
config.GroupVersion = &copyGroupVersion
@ -109,7 +109,7 @@ func setConfigDefaults(config *restclient.Config) error {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *CoreV1Client) RESTClient() restclient.Interface {
func (c *CoreV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// This package has the automatically generated typed clients.
package v1

View file

@ -18,10 +18,11 @@ package v1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// EventsGetter has a method to return a EventInterface.
@ -34,18 +35,18 @@ type EventsGetter interface {
type EventInterface interface {
Create(*v1.Event) (*v1.Event, error)
Update(*v1.Event) (*v1.Event, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Event, error)
List(opts v1.ListOptions) (*v1.EventList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
List(opts meta_v1.ListOptions) (*v1.EventList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
EventExpansion
}
// events implements EventInterface
type events struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -83,7 +84,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
}
// Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *events) Delete(name string, options *v1.DeleteOptions) error {
func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
@ -94,7 +95,7 @@ func (c *events) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
@ -118,7 +119,7 @@ func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event,
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) {
func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
result = &v1.EventList{}
err = c.client.Get().
Namespace(c.ns).
@ -130,7 +131,7 @@ func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) {
}
// Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
@ -140,7 +141,7 @@ func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched event.
func (c *events) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -22,14 +22,14 @@ go_library(
tags = ["automanaged"],
deps = [
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// Package fake has the automatically generated clients.
package fake

View file

@ -20,8 +20,8 @@ import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -54,14 +54,14 @@ func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap,
return obj.(*v1.ConfigMap), err
}
func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeConfigMaps) Delete(name string, options *meta_v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
return err
}
func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeConfigMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.ConfigMapList{})
@ -78,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options meta_v1.GetOptions) (result *v
return obj.(*v1.ConfigMap), err
}
func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) {
func (c *FakeConfigMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{})
@ -100,14 +100,14 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, er
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeConfigMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))
}
// Patch applies the patch and returns the patched configMap.
func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &v1.ConfigMap{})

View file

@ -17,8 +17,8 @@ limitations under the License.
package fake
import (
rest "k8s.io/client-go/rest"
v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -48,7 +48,7 @@ func (c *FakeCoreV1) Services(namespace string) v1.ServiceInterface {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCoreV1) RESTClient() restclient.Interface {
var ret *restclient.RESTClient
func (c *FakeCoreV1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View file

@ -20,8 +20,8 @@ import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -54,14 +54,14 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
return obj.(*v1.Event), err
}
func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeEvents) Delete(name string, options *meta_v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{})
return err
}
func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeEvents) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.EventList{})
@ -78,7 +78,7 @@ func (c *FakeEvents) Get(name string, options meta_v1.GetOptions) (result *v1.Ev
return obj.(*v1.Event), err
}
func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) {
func (c *FakeEvents) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{})
@ -100,14 +100,14 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error)
}
// Watch returns a watch.Interface that watches the requested events.
func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeEvents) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))
}
// Patch applies the patch and returns the patched event.
func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &v1.Event{})

View file

@ -20,8 +20,8 @@ import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -60,13 +60,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e
return obj.(*v1.Namespace), err
}
func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeNamespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{})
return err
}
func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeNamespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1.NamespaceList{})
@ -82,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options meta_v1.GetOptions) (result *v
return obj.(*v1.Namespace), err
}
func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) {
func (c *FakeNamespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
if obj == nil {
@ -103,13 +103,13 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, er
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeNamespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
}
// Patch applies the patch and returns the patched namespace.
func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &v1.Namespace{})
if obj == nil {

View file

@ -20,8 +20,8 @@ import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -54,14 +54,14 @@ func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
return obj.(*v1.Secret), err
}
func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeSecrets) Delete(name string, options *meta_v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &v1.Secret{})
return err
}
func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeSecrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.SecretList{})
@ -78,7 +78,7 @@ func (c *FakeSecrets) Get(name string, options meta_v1.GetOptions) (result *v1.S
return obj.(*v1.Secret), err
}
func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) {
func (c *FakeSecrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{})
@ -100,14 +100,14 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err erro
}
// Watch returns a watch.Interface that watches the requested secrets.
func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeSecrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts))
}
// Patch applies the patch and returns the patched secret.
func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) {
func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &v1.Secret{})

View file

@ -20,8 +20,8 @@ import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -64,14 +64,14 @@ func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) {
return obj.(*v1.Service), err
}
func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeServices) Delete(name string, options *meta_v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &v1.Service{})
return err
}
func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeServices) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.ServiceList{})
@ -88,7 +88,7 @@ func (c *FakeServices) Get(name string, options meta_v1.GetOptions) (result *v1.
return obj.(*v1.Service), err
}
func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err error) {
func (c *FakeServices) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{})
@ -110,14 +110,14 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err er
}
// Watch returns a watch.Interface that watches the requested services.
func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeServices) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts))
}
// Patch applies the patch and returns the patched service.
func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &v1.Service{})

View file

@ -18,10 +18,11 @@ package v1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// NamespacesGetter has a method to return a NamespaceInterface.
@ -35,18 +36,18 @@ type NamespaceInterface interface {
Create(*v1.Namespace) (*v1.Namespace, error)
Update(*v1.Namespace) (*v1.Namespace, error)
UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error)
List(opts v1.ListOptions) (*v1.NamespaceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error)
List(opts meta_v1.ListOptions) (*v1.NamespaceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error)
NamespaceExpansion
}
// namespaces implements NamespaceInterface
type namespaces struct {
client restclient.Interface
client rest.Interface
}
// newNamespaces returns a Namespaces
@ -95,7 +96,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace
}
// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error {
func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
return c.client.Delete().
Resource("namespaces").
Name(name).
@ -105,7 +106,7 @@ func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Resource("namespaces").
VersionedParams(&listOptions, api.ParameterCodec).
@ -127,7 +128,7 @@ func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Na
}
// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) {
func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
result = &v1.NamespaceList{}
err = c.client.Get().
Resource("namespaces").
@ -138,7 +139,7 @@ func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err er
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("namespaces").
@ -147,7 +148,7 @@ func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched namespace.
func (c *namespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
result = &v1.Namespace{}
err = c.client.Patch(pt).
Resource("namespaces").

View file

@ -18,10 +18,11 @@ package v1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// SecretsGetter has a method to return a SecretInterface.
@ -34,18 +35,18 @@ type SecretsGetter interface {
type SecretInterface interface {
Create(*v1.Secret) (*v1.Secret, error)
Update(*v1.Secret) (*v1.Secret, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Secret, error)
List(opts v1.ListOptions) (*v1.SecretList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
List(opts meta_v1.ListOptions) (*v1.SecretList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
SecretExpansion
}
// secrets implements SecretInterface
type secrets struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -83,7 +84,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
}
// Delete takes name of the secret and deletes it. Returns an error if one occurs.
func (c *secrets) Delete(name string, options *v1.DeleteOptions) error {
func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("secrets").
@ -94,7 +95,7 @@ func (c *secrets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("secrets").
@ -118,7 +119,7 @@ func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secre
}
// List takes label and field selectors, and returns the list of Secrets that match those selectors.
func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) {
func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) {
result = &v1.SecretList{}
err = c.client.Get().
Namespace(c.ns).
@ -130,7 +131,7 @@ func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) {
}
// Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
@ -140,7 +141,7 @@ func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched secret.
func (c *secrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) {
func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) {
result = &v1.Secret{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -18,10 +18,11 @@ package v1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// ServicesGetter has a method to return a ServiceInterface.
@ -35,18 +36,18 @@ type ServiceInterface interface {
Create(*v1.Service) (*v1.Service, error)
Update(*v1.Service) (*v1.Service, error)
UpdateStatus(*v1.Service) (*v1.Service, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Service, error)
List(opts v1.ListOptions) (*v1.ServiceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error)
List(opts meta_v1.ListOptions) (*v1.ServiceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error)
ServiceExpansion
}
// services implements ServiceInterface
type services struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -100,7 +101,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er
}
// Delete takes name of the service and deletes it. Returns an error if one occurs.
func (c *services) Delete(name string, options *v1.DeleteOptions) error {
func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("services").
@ -111,7 +112,7 @@ func (c *services) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("services").
@ -135,7 +136,7 @@ func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Serv
}
// List takes label and field selectors, and returns the list of Services that match those selectors.
func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) {
func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) {
result = &v1.ServiceList{}
err = c.client.Get().
Namespace(c.ns).
@ -147,7 +148,7 @@ func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error)
}
// Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
@ -157,7 +158,7 @@ func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched service.
func (c *services) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
result = &v1.Service{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -22,13 +22,13 @@ go_library(
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apis/extensions/v1beta1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View file

@ -17,12 +17,12 @@ limitations under the License.
package v1beta1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// DaemonSetsGetter has a method to return a DaemonSetInterface.
@ -38,16 +38,16 @@ type DaemonSetInterface interface {
UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.DaemonSet, error)
Get(name string, options v1.GetOptions) (*v1beta1.DaemonSet, error)
List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error)
DaemonSetExpansion
}
// daemonSets implements DaemonSetInterface
type daemonSets struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -123,7 +123,7 @@ func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
}
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.DaemonSet, err error) {
func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) {
result = &v1beta1.DaemonSet{}
err = c.client.Get().
Namespace(c.ns).
@ -158,7 +158,7 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched daemonSet.
func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) {
func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) {
result = &v1beta1.DaemonSet{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -17,12 +17,12 @@ limitations under the License.
package v1beta1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// DeploymentsGetter has a method to return a DeploymentInterface.
@ -38,16 +38,16 @@ type DeploymentInterface interface {
UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.Deployment, error)
Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
DeploymentExpansion
}
// deployments implements DeploymentInterface
type deployments struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -123,7 +123,7 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1
}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Deployment, err error) {
func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
result = &v1beta1.Deployment{}
err = c.client.Get().
Namespace(c.ns).
@ -158,7 +158,7 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched deployment.
func (c *deployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
result = &v1beta1.Deployment{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// This package has the automatically generated typed clients.
package v1beta1

View file

@ -20,12 +20,12 @@ import (
fmt "fmt"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
type ExtensionsV1beta1Interface interface {
RESTClient() restclient.Interface
RESTClient() rest.Interface
DaemonSetsGetter
DeploymentsGetter
IngressesGetter
@ -34,7 +34,7 @@ type ExtensionsV1beta1Interface interface {
// ExtensionsV1beta1Client is used to interact with features provided by the extensions group.
type ExtensionsV1beta1Client struct {
restClient restclient.Interface
restClient rest.Interface
}
func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface {
@ -54,12 +54,12 @@ func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterf
}
// NewForConfig creates a new ExtensionsV1beta1Client for the given config.
func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) {
func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := restclient.RESTClientFor(&config)
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
@ -68,7 +68,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) {
// NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client {
func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@ -77,11 +77,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client {
}
// New creates a new ExtensionsV1beta1Client for the given RESTClient.
func New(c restclient.Interface) *ExtensionsV1beta1Client {
func New(c rest.Interface) *ExtensionsV1beta1Client {
return &ExtensionsV1beta1Client{c}
}
func setConfigDefaults(config *restclient.Config) error {
func setConfigDefaults(config *rest.Config) error {
gv, err := schema.ParseGroupVersion("extensions/v1beta1")
if err != nil {
return err
@ -92,7 +92,7 @@ func setConfigDefaults(config *restclient.Config) error {
}
config.APIPath = "/apis"
if config.UserAgent == "" {
config.UserAgent = restclient.DefaultKubernetesUserAgent()
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
copyGroupVersion := gv
config.GroupVersion = &copyGroupVersion
@ -104,7 +104,7 @@ func setConfigDefaults(config *restclient.Config) error {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *ExtensionsV1beta1Client) RESTClient() restclient.Interface {
func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}

View file

@ -21,15 +21,14 @@ go_library(
tags = ["automanaged"],
deps = [
"//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apis/extensions/v1beta1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// Package fake has the automatically generated clients.
package fake

View file

@ -17,12 +17,11 @@ limitations under the License.
package fake
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -79,7 +78,7 @@ func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions
return err
}
func (c *FakeDaemonSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.DaemonSet, err error) {
func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(core.NewGetAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{})
@ -118,7 +117,7 @@ func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched daemonSet.
func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) {
func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &v1beta1.DaemonSet{})

View file

@ -17,12 +17,11 @@ limitations under the License.
package fake
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -79,7 +78,7 @@ func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOption
return err
}
func (c *FakeDeployments) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Deployment, err error) {
func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
obj, err := c.Fake.
Invokes(core.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
@ -118,7 +117,7 @@ func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched deployment.
func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &v1beta1.Deployment{})

View file

@ -17,8 +17,8 @@ limitations under the License.
package fake
import (
rest "k8s.io/client-go/rest"
v1beta1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -44,7 +44,7 @@ func (c *FakeExtensionsV1beta1) ReplicaSets(namespace string) v1beta1.ReplicaSet
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeExtensionsV1beta1) RESTClient() restclient.Interface {
var ret *restclient.RESTClient
func (c *FakeExtensionsV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View file

@ -17,12 +17,11 @@ limitations under the License.
package fake
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -79,7 +78,7 @@ func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions
return err
}
func (c *FakeIngresses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Ingress, err error) {
func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) {
obj, err := c.Fake.
Invokes(core.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{})
@ -118,7 +117,7 @@ func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched ingress.
func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) {
func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(ingressesResource, c.ns, name, data, subresources...), &v1beta1.Ingress{})

View file

@ -17,12 +17,11 @@ limitations under the License.
package fake
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -79,7 +78,7 @@ func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOption
return err
}
func (c *FakeReplicaSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(core.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})
@ -118,7 +117,7 @@ func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched replicaSet.
func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &v1beta1.ReplicaSet{})

View file

@ -17,12 +17,12 @@ limitations under the License.
package v1beta1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// IngressesGetter has a method to return a IngressInterface.
@ -38,16 +38,16 @@ type IngressInterface interface {
UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.Ingress, error)
Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error)
List(opts v1.ListOptions) (*v1beta1.IngressList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error)
IngressExpansion
}
// ingresses implements IngressInterface
type ingresses struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -123,7 +123,7 @@ func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L
}
// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any.
func (c *ingresses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Ingress, err error) {
func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) {
result = &v1beta1.Ingress{}
err = c.client.Get().
Namespace(c.ns).
@ -158,7 +158,7 @@ func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched ingress.
func (c *ingresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) {
func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) {
result = &v1beta1.Ingress{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -17,12 +17,12 @@ limitations under the License.
package v1beta1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
@ -38,16 +38,16 @@ type ReplicaSetInterface interface {
UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.ReplicaSet, error)
Get(name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error)
List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error)
ReplicaSetExpansion
}
// replicaSets implements ReplicaSetInterface
type replicaSets struct {
client restclient.Interface
client rest.Interface
ns string
}
@ -123,7 +123,7 @@ func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1
}
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ReplicaSet, err error) {
func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) {
result = &v1beta1.ReplicaSet{}
err = c.client.Get().
Namespace(c.ns).
@ -158,7 +158,7 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched replicaSet.
func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
result = &v1beta1.ReplicaSet{}
err = c.client.Patch(pt).
Namespace(c.ns).

View file

@ -19,12 +19,12 @@ go_library(
deps = [
"//federation/apis/federation/v1beta1:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View file

@ -17,12 +17,12 @@ limitations under the License.
package v1beta1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// ClustersGetter has a method to return a ClusterInterface.
@ -38,16 +38,16 @@ type ClusterInterface interface {
UpdateStatus(*v1beta1.Cluster) (*v1beta1.Cluster, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.Cluster, error)
Get(name string, options v1.GetOptions) (*v1beta1.Cluster, error)
List(opts v1.ListOptions) (*v1beta1.ClusterList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error)
ClusterExpansion
}
// clusters implements ClusterInterface
type clusters struct {
client restclient.Interface
client rest.Interface
}
// newClusters returns a Clusters
@ -116,7 +116,7 @@ func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
}
// Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any.
func (c *clusters) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Cluster, err error) {
func (c *clusters) Get(name string, options v1.GetOptions) (result *v1beta1.Cluster, err error) {
result = &v1beta1.Cluster{}
err = c.client.Get().
Resource("clusters").
@ -148,7 +148,7 @@ func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched cluster.
func (c *clusters) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) {
func (c *clusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) {
result = &v1beta1.Cluster{}
err = c.client.Patch(pt).
Resource("clusters").

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// This package has the automatically generated typed clients.
package v1beta1

View file

@ -18,14 +18,13 @@ go_library(
deps = [
"//federation/apis/federation/v1beta1:go_default_library",
"//federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
// Package fake has the automatically generated clients.
package fake

View file

@ -17,13 +17,12 @@ limitations under the License.
package fake
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -74,7 +73,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
return err
}
func (c *FakeClusters) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Cluster, err error) {
func (c *FakeClusters) Get(name string, options v1.GetOptions) (result *v1beta1.Cluster, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(clustersResource, name), &v1beta1.Cluster{})
if obj == nil {
@ -110,7 +109,7 @@ func (c *FakeClusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) {
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(clustersResource, name, data, subresources...), &v1beta1.Cluster{})
if obj == nil {

View file

@ -17,8 +17,8 @@ limitations under the License.
package fake
import (
rest "k8s.io/client-go/rest"
v1beta1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@ -32,7 +32,7 @@ func (c *FakeFederationV1beta1) Clusters() v1beta1.ClusterInterface {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeFederationV1beta1) RESTClient() restclient.Interface {
var ret *restclient.RESTClient
func (c *FakeFederationV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View file

@ -20,18 +20,18 @@ import (
fmt "fmt"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
type FederationV1beta1Interface interface {
RESTClient() restclient.Interface
RESTClient() rest.Interface
ClustersGetter
}
// FederationV1beta1Client is used to interact with features provided by the federation group.
type FederationV1beta1Client struct {
restClient restclient.Interface
restClient rest.Interface
}
func (c *FederationV1beta1Client) Clusters() ClusterInterface {
@ -39,12 +39,12 @@ func (c *FederationV1beta1Client) Clusters() ClusterInterface {
}
// NewForConfig creates a new FederationV1beta1Client for the given config.
func NewForConfig(c *restclient.Config) (*FederationV1beta1Client, error) {
func NewForConfig(c *rest.Config) (*FederationV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := restclient.RESTClientFor(&config)
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*FederationV1beta1Client, error) {
// NewForConfigOrDie creates a new FederationV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *FederationV1beta1Client {
func NewForConfigOrDie(c *rest.Config) *FederationV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *FederationV1beta1Client {
}
// New creates a new FederationV1beta1Client for the given RESTClient.
func New(c restclient.Interface) *FederationV1beta1Client {
func New(c rest.Interface) *FederationV1beta1Client {
return &FederationV1beta1Client{c}
}
func setConfigDefaults(config *restclient.Config) error {
func setConfigDefaults(config *rest.Config) error {
gv, err := schema.ParseGroupVersion("federation/v1beta1")
if err != nil {
return err
@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error {
}
config.APIPath = "/apis"
if config.UserAgent == "" {
config.UserAgent = restclient.DefaultKubernetesUserAgent()
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
copyGroupVersion := gv
config.GroupVersion = &copyGroupVersion
@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FederationV1beta1Client) RESTClient() restclient.Interface {
func (c *FederationV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}

View file

@ -17,15 +17,16 @@ go_library(
tags = ["automanaged"],
deps = [
"//federation/apis/federation/install:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/typed/discovery:go_default_library",
"//pkg/util/flowcontrol:go_default_library",
"//plugin/pkg/client/auth:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
],
)
@ -41,6 +42,7 @@ filegroup(
srcs = [
":package-srcs",
"//federation/client/clientset_generated/federation_internalclientset/fake:all-srcs",
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:all-srcs",
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:all-srcs",
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:all-srcs",
"//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:all-srcs",

View file

@ -18,20 +18,23 @@ package federation_internalclientset
import (
"github.com/golang/glog"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
internalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion"
internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion"
internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion"
internalversionextensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion"
internalversionfederation "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion"
restclient "k8s.io/kubernetes/pkg/client/restclient"
discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
"k8s.io/kubernetes/pkg/util/flowcontrol"
_ "k8s.io/kubernetes/plugin/pkg/client/auth"
)
type Interface interface {
Discovery() discovery.DiscoveryInterface
Core() internalversioncore.CoreInterface
Autoscaling() internalversionautoscaling.AutoscalingInterface
Batch() internalversionbatch.BatchInterface
Extensions() internalversionextensions.ExtensionsInterface
@ -44,6 +47,7 @@ type Interface interface {
type Clientset struct {
*discovery.DiscoveryClient
*internalversioncore.CoreClient
*internalversionautoscaling.AutoscalingClient
*internalversionbatch.BatchClient
*internalversionextensions.ExtensionsClient
*internalversionfederation.FederationClient
@ -57,6 +61,14 @@ func (c *Clientset) Core() internalversioncore.CoreInterface {
return c.CoreClient
}
// Autoscaling retrieves the AutoscalingClient
func (c *Clientset) Autoscaling() internalversionautoscaling.AutoscalingInterface {
if c == nil {
return nil
}
return c.AutoscalingClient
}
// Batch retrieves the BatchClient
func (c *Clientset) Batch() internalversionbatch.BatchInterface {
if c == nil {
@ -90,7 +102,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
}
// NewForConfig creates a new Clientset for the given config.
func NewForConfig(c *restclient.Config) (*Clientset, error) {
func NewForConfig(c *rest.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
@ -101,6 +113,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.AutoscalingClient, err = internalversionautoscaling.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.BatchClient, err = internalversionbatch.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@ -124,9 +140,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *Clientset {
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.CoreClient = internalversioncore.NewForConfigOrDie(c)
cs.AutoscalingClient = internalversionautoscaling.NewForConfigOrDie(c)
cs.BatchClient = internalversionbatch.NewForConfigOrDie(c)
cs.ExtensionsClient = internalversionextensions.NewForConfigOrDie(c)
cs.FederationClient = internalversionfederation.NewForConfigOrDie(c)
@ -136,9 +153,10 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset {
}
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
func New(c rest.Interface) *Clientset {
var cs Clientset
cs.CoreClient = internalversioncore.New(c)
cs.AutoscalingClient = internalversionautoscaling.New(c)
cs.BatchClient = internalversionbatch.New(c)
cs.ExtensionsClient = internalversionextensions.New(c)
cs.FederationClient = internalversionfederation.New(c)

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
// This package has the automatically generated clientset.
package federation_internalclientset

View file

@ -16,6 +16,8 @@ go_library(
tags = ["automanaged"],
deps = [
"//federation/client/clientset_generated/federation_internalclientset:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake:go_default_library",
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library",

View file

@ -20,6 +20,8 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset"
internalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion"
fakeinternalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake"
internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion"
fakeinternalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake"
internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion"
@ -72,6 +74,11 @@ func (c *Clientset) Core() internalversioncore.CoreInterface {
return &fakeinternalversioncore.FakeCore{Fake: &c.Fake}
}
// Autoscaling retrieves the AutoscalingClient
func (c *Clientset) Autoscaling() internalversionautoscaling.AutoscalingInterface {
return &fakeinternalversionautoscaling.FakeAutoscaling{Fake: &c.Fake}
}
// Batch retrieves the BatchClient
func (c *Clientset) Batch() internalversionbatch.BatchInterface {
return &fakeinternalversionbatch.FakeBatch{Fake: &c.Fake}

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
// This package has the automatically generated fake clientset.
package fake

View file

@ -0,0 +1,43 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"autoscaling_client.go",
"doc.go",
"generated_expansion.go",
"horizontalpodautoscaler.go",
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/apis/autoscaling:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake:all-srcs",
],
tags = ["automanaged"],
)

View file

@ -0,0 +1,98 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package internalversion
import (
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
)
type AutoscalingInterface interface {
RESTClient() rest.Interface
HorizontalPodAutoscalersGetter
}
// AutoscalingClient is used to interact with features provided by the autoscaling group.
type AutoscalingClient struct {
restClient rest.Interface
}
func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
return newHorizontalPodAutoscalers(c, namespace)
}
// NewForConfig creates a new AutoscalingClient for the given config.
func NewForConfig(c *rest.Config) (*AutoscalingClient, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &AutoscalingClient{client}, nil
}
// NewForConfigOrDie creates a new AutoscalingClient for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AutoscalingClient {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new AutoscalingClient for the given RESTClient.
func New(c rest.Interface) *AutoscalingClient {
return &AutoscalingClient{c}
}
func setConfigDefaults(config *rest.Config) error {
// if autoscaling group is not registered, return an error
g, err := api.Registry.Group("autoscaling")
if err != nil {
return err
}
config.APIPath = "/apis"
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
copyGroupVersion := g.GroupVersion
config.GroupVersion = &copyGroupVersion
}
config.NegotiatedSerializer = api.Codecs
if config.QPS == 0 {
config.QPS = 5
}
if config.Burst == 0 {
config.Burst = 10
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AutoscalingClient) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View file

@ -0,0 +1,20 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
// This package has the automatically generated typed clients.
package internalversion

View file

@ -0,0 +1,42 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_autoscaling_client.go",
"fake_horizontalpodautoscaler.go",
],
tags = ["automanaged"],
deps = [
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library",
"//pkg/apis/autoscaling:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

View file

@ -0,0 +1,20 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
// Package fake has the automatically generated clients.
package fake

View file

@ -0,0 +1,38 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
import (
rest "k8s.io/client-go/rest"
internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
type FakeAutoscaling struct {
*core.Fake
}
func (c *FakeAutoscaling) HorizontalPodAutoscalers(namespace string) internalversion.HorizontalPodAutoscalerInterface {
return &FakeHorizontalPodAutoscalers{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAutoscaling) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View file

@ -0,0 +1,128 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
type FakeHorizontalPodAutoscalers struct {
Fake *FakeAutoscaling
ns string
}
var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "", Resource: "horizontalpodautoscalers"}
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{})
return err
}
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &autoscaling.HorizontalPodAutoscalerList{})
return err
}
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &autoscaling.HorizontalPodAutoscalerList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &autoscaling.HorizontalPodAutoscalerList{}
for _, item := range obj.(*autoscaling.HorizontalPodAutoscalerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscaling.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling.HorizontalPodAutoscaler), err
}

View file

@ -0,0 +1,19 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package internalversion
type HorizontalPodAutoscalerExpansion interface{}

Some files were not shown because too many files have changed in this diff Show more