Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update staging client
Signed-off-by: Jess Frazelle <acidburn@google.com>
  • Loading branch information
jessfraz committed Mar 1, 2017
1 parent 9b5d1af commit 5bb5313
Show file tree
Hide file tree
Showing 49 changed files with 3,242 additions and 418 deletions.
3 changes: 3 additions & 0 deletions hack/.linted_packages
Expand Up @@ -342,6 +342,8 @@ staging/src/k8s.io/client-go/informers/policy/v1beta1
staging/src/k8s.io/client-go/informers/rbac
staging/src/k8s.io/client-go/informers/rbac/v1alpha1
staging/src/k8s.io/client-go/informers/rbac/v1beta1
staging/src/k8s.io/client-go/informers/settings
staging/src/k8s.io/client-go/informers/settings/v1alpha1
staging/src/k8s.io/client-go/informers/storage
staging/src/k8s.io/client-go/informers/storage/v1beta1
staging/src/k8s.io/client-go/listers/apps/v1beta1
Expand All @@ -355,6 +357,7 @@ staging/src/k8s.io/client-go/listers/extensions/v1beta1
staging/src/k8s.io/client-go/listers/policy/v1beta1
staging/src/k8s.io/client-go/listers/rbac/v1alpha1
staging/src/k8s.io/client-go/listers/rbac/v1beta1
staging/src/k8s.io/client-go/listers/settings/v1alpha1
staging/src/k8s.io/client-go/listers/storage/v1beta1
staging/src/k8s.io/client-go/plugin/pkg/client/auth
staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp
Expand Down
6 changes: 6 additions & 0 deletions staging/src/k8s.io/client-go/informers/factory.go
Expand Up @@ -30,6 +30,7 @@ import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
policy "k8s.io/client-go/informers/policy"
rbac "k8s.io/client-go/informers/rbac"
settings "k8s.io/client-go/informers/settings"
storage "k8s.io/client-go/informers/storage"
kubernetes "k8s.io/client-go/kubernetes"
cache "k8s.io/client-go/tools/cache"
Expand Down Expand Up @@ -103,6 +104,7 @@ type SharedInformerFactory interface {
Extensions() extensions.Interface
Policy() policy.Interface
Rbac() rbac.Interface
Settings() settings.Interface
Storage() storage.Interface
}

Expand Down Expand Up @@ -138,6 +140,10 @@ func (f *sharedInformerFactory) Rbac() rbac.Interface {
return rbac.New(f)
}

func (f *sharedInformerFactory) Settings() settings.Interface {
return settings.New(f)
}

func (f *sharedInformerFactory) Storage() storage.Interface {
return storage.New(f)
}
5 changes: 5 additions & 0 deletions staging/src/k8s.io/client-go/informers/generic.go
Expand Up @@ -32,6 +32,7 @@ import (
policy_v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
settings_v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
storage_v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
Expand Down Expand Up @@ -162,6 +163,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil

// Group=Settings, Version=V1alpha1
case settings_v1alpha1.SchemeGroupVersion.WithResource("podpresets"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil

// Group=Storage, Version=V1beta1
case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil
Expand Down
44 changes: 44 additions & 0 deletions staging/src/k8s.io/client-go/informers/settings/interface.go
@@ -0,0 +1,44 @@
/*
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 file was automatically generated by informer-gen

package settings

import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1alpha1 "k8s.io/client-go/informers/settings/v1alpha1"
)

// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
}

type group struct {
internalinterfaces.SharedInformerFactory
}

// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory) Interface {
return &group{f}
}

// V1alpha1 returns a new v1alpha1.Interface.
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.New(g.SharedInformerFactory)
}
@@ -0,0 +1,43 @@
/*
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 file was automatically generated by informer-gen

package v1alpha1

import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)

// Interface provides access to all the informers in this group version.
type Interface interface {
// PodPresets returns a PodPresetInformer.
PodPresets() PodPresetInformer
}

type version struct {
internalinterfaces.SharedInformerFactory
}

// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory) Interface {
return &version{f}
}

// PodPresets returns a PodPresetInformer.
func (v *version) PodPresets() PodPresetInformer {
return &podPresetInformer{factory: v.SharedInformerFactory}
}
@@ -0,0 +1,68 @@
/*
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 file was automatically generated by informer-gen

package v1alpha1

import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/settings/v1alpha1"
settings_v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)

// PodPresetInformer provides access to a shared informer and lister for
// PodPresets.
type PodPresetInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.PodPresetLister
}

type podPresetInformer struct {
factory internalinterfaces.SharedInformerFactory
}

func newPodPresetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
sharedIndexInformer := cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return client.SettingsV1alpha1().PodPresets(v1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return client.SettingsV1alpha1().PodPresets(v1.NamespaceAll).Watch(options)
},
},
&settings_v1alpha1.PodPreset{},
resyncPeriod,
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
)

return sharedIndexInformer
}

func (f *podPresetInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&settings_v1alpha1.PodPreset{}, newPodPresetInformer)
}

func (f *podPresetInformer) Lister() v1alpha1.PodPresetLister {
return v1alpha1.NewPodPresetLister(f.Informer().GetIndexer())
}
28 changes: 28 additions & 0 deletions staging/src/k8s.io/client-go/kubernetes/clientset.go
Expand Up @@ -34,6 +34,7 @@ import (
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
Expand Down Expand Up @@ -76,6 +77,9 @@ type Interface interface {
// Deprecated: please explicitly pick a version if possible.
Rbac() rbacv1beta1.RbacV1beta1Interface
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface
// Deprecated: please explicitly pick a version if possible.
Settings() settingsv1alpha1.SettingsV1alpha1Interface
StorageV1beta1() storagev1beta1.StorageV1beta1Interface
// Deprecated: please explicitly pick a version if possible.
Storage() storagev1beta1.StorageV1beta1Interface
Expand All @@ -100,6 +104,7 @@ type Clientset struct {
*policyv1beta1.PolicyV1beta1Client
*rbacv1beta1.RbacV1beta1Client
*rbacv1alpha1.RbacV1alpha1Client
*settingsv1alpha1.SettingsV1alpha1Client
*storagev1beta1.StorageV1beta1Client
}

Expand Down Expand Up @@ -313,6 +318,23 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return c.RbacV1alpha1Client
}

// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
if c == nil {
return nil
}
return c.SettingsV1alpha1Client
}

// Deprecated: Settings retrieves the default version of SettingsClient.
// Please explicitly pick a version.
func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
if c == nil {
return nil
}
return c.SettingsV1alpha1Client
}

// StorageV1beta1 retrieves the StorageV1beta1Client
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
if c == nil {
Expand Down Expand Up @@ -406,6 +428,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.SettingsV1alpha1Client, err = settingsv1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.StorageV1beta1Client, err = storagev1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
Expand Down Expand Up @@ -438,6 +464,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.PolicyV1beta1Client = policyv1beta1.NewForConfigOrDie(c)
cs.RbacV1beta1Client = rbacv1beta1.NewForConfigOrDie(c)
cs.RbacV1alpha1Client = rbacv1alpha1.NewForConfigOrDie(c)
cs.SettingsV1alpha1Client = settingsv1alpha1.NewForConfigOrDie(c)
cs.StorageV1beta1Client = storagev1beta1.NewForConfigOrDie(c)

cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
Expand All @@ -462,6 +489,7 @@ func New(c rest.Interface) *Clientset {
cs.PolicyV1beta1Client = policyv1beta1.New(c)
cs.RbacV1beta1Client = rbacv1beta1.New(c)
cs.RbacV1alpha1Client = rbacv1alpha1.New(c)
cs.SettingsV1alpha1Client = settingsv1alpha1.New(c)
cs.StorageV1beta1Client = storagev1beta1.New(c)

cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
Expand Down
Expand Up @@ -52,6 +52,8 @@ import (
fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake"
settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
fakesettingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake"
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
fakestoragev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake"
"k8s.io/client-go/testing"
Expand Down Expand Up @@ -215,6 +217,16 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
}

// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
}

// Settings retrieves the SettingsV1alpha1Client
func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
}

// StorageV1beta1 retrieves the StorageV1beta1Client
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
return &fakestoragev1beta1.FakeStorageV1beta1{Fake: &c.Fake}
Expand Down
2 changes: 2 additions & 0 deletions staging/src/k8s.io/client-go/kubernetes/fake/register.go
Expand Up @@ -33,6 +33,7 @@ import (
extensions "k8s.io/client-go/pkg/apis/extensions/install"
policy "k8s.io/client-go/pkg/apis/policy/install"
rbac "k8s.io/client-go/pkg/apis/rbac/install"
settings "k8s.io/client-go/pkg/apis/settings/install"
storage "k8s.io/client-go/pkg/apis/storage/install"
os "os"
)
Expand Down Expand Up @@ -61,6 +62,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
extensions.Install(groupFactoryRegistry, registry, scheme)
policy.Install(groupFactoryRegistry, registry, scheme)
rbac.Install(groupFactoryRegistry, registry, scheme)
settings.Install(groupFactoryRegistry, registry, scheme)
storage.Install(groupFactoryRegistry, registry, scheme)

}
Expand Up @@ -31,6 +31,7 @@ import (
_ "k8s.io/client-go/pkg/apis/extensions/install"
_ "k8s.io/client-go/pkg/apis/policy/install"
_ "k8s.io/client-go/pkg/apis/rbac/install"
_ "k8s.io/client-go/pkg/apis/settings/install"
_ "k8s.io/client-go/pkg/apis/storage/install"
)

Expand Down
2 changes: 2 additions & 0 deletions staging/src/k8s.io/client-go/kubernetes/scheme/register.go
Expand Up @@ -36,6 +36,7 @@ import (
policyv1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
rbacv1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
rbacv1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
settingsv1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
storagev1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
)

Expand Down Expand Up @@ -78,6 +79,7 @@ func AddToScheme(scheme *runtime.Scheme) {
policyv1beta1.AddToScheme(scheme)
rbacv1beta1.AddToScheme(scheme)
rbacv1alpha1.AddToScheme(scheme)
settingsv1alpha1.AddToScheme(scheme)
storagev1beta1.AddToScheme(scheme)

}
@@ -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 custom arguments.

// This package has the automatically generated typed clients.
package v1alpha1

0 comments on commit 5bb5313

Please sign in to comment.