Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to client-go release 1.6 #80

Merged
merged 1 commit into from
Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
53 changes: 35 additions & 18 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@

[[constraint]]
name = "k8s.io/client-go"
branch = "release-5.0"
version = "6.0.0"

[[constraint]]
name = "k8s.io/apiextensions-apiserver"
branch = "release-1.8"
version = "kubernetes-1.9.2"

[[constraint]]
name = "k8s.io/apimachinery"
branch = "release-1.8"
version = "kubernetes-1.9.2"

[[constraint]]
name = "github.com/golang/groupcache"
revision = "02826c3e79038b59d737d3b1c0a1d937f71a4433"
name = "k8s.io/api"
version = "kubernetes-1.9.2"

[[constraint]]
name = "github.com/stretchr/testify"
Expand Down
2 changes: 1 addition & 1 deletion build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ RUN go get -u github.com/golang/dep/cmd/dep && \

# install the release branch of the code generator tools
RUN mkdir -p /go/src && cd /go/src && mkdir -p k8s.io && cd k8s.io && \
git clone -b release-1.8 --depth=3 https://github.com/kubernetes/code-generator.git
git clone -b kubernetes-1.9.2 --depth=3 https://github.com/kubernetes/code-generator.git

# make sure we keep the path to go
RUN echo "export PATH=/usr/local/go/bin:/go/bin/:\$PATH" >> /root/.bashrc
Expand Down
36 changes: 0 additions & 36 deletions pkg/apis/stable/v1alpha1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,45 +21,9 @@
package v1alpha1

import (
reflect "reflect"

conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
)

func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GameServer).DeepCopyInto(out.(*GameServer))
return nil
}, InType: reflect.TypeOf(&GameServer{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GameServerList).DeepCopyInto(out.(*GameServerList))
return nil
}, InType: reflect.TypeOf(&GameServerList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GameServerSpec).DeepCopyInto(out.(*GameServerSpec))
return nil
}, InType: reflect.TypeOf(&GameServerSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GameServerStatus).DeepCopyInto(out.(*GameServerStatus))
return nil
}, InType: reflect.TypeOf(&GameServerStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Health).DeepCopyInto(out.(*Health))
return nil
}, InType: reflect.TypeOf(&Health{})},
)
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GameServer) DeepCopyInto(out *GameServer) {
*out = *in
Expand Down
3 changes: 0 additions & 3 deletions pkg/client/clientset/versioned/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
// limitations under the License.

// This code was autogenerated. Do not edit directly.

// This package is generated by client-gen with custom arguments.

// This package has the automatically generated clientset.
package versioned
3 changes: 0 additions & 3 deletions pkg/client/clientset/versioned/fake/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
// limitations under the License.

// This code was autogenerated. Do not edit directly.

// This package is generated by client-gen with custom arguments.

// This package has the automatically generated fake clientset.
package fake
3 changes: 0 additions & 3 deletions pkg/client/clientset/versioned/scheme/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
// limitations under the License.

// This code was autogenerated. Do not edit directly.

// This package is generated by client-gen with custom arguments.

// This package contains the scheme of the automatically generated clientset.
package scheme
3 changes: 0 additions & 3 deletions pkg/client/clientset/versioned/typed/stable/v1alpha1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
// limitations under the License.

// This code was autogenerated. Do not edit directly.

// This package is generated by client-gen with custom arguments.

// This package has the automatically generated typed clients.
package v1alpha1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
// limitations under the License.

// This code was autogenerated. Do not edit directly.

// This package is generated by client-gen with custom arguments.

// Package fake has the automatically generated clients.
package fake
20 changes: 16 additions & 4 deletions pkg/client/informers/externalversions/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ import (
versioned "agones.dev/agones/pkg/client/clientset/versioned"
internalinterfaces "agones.dev/agones/pkg/client/informers/externalversions/internalinterfaces"
stable "agones.dev/agones/pkg/client/informers/externalversions/stable"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
cache "k8s.io/client-go/tools/cache"
)

type sharedInformerFactory struct {
client versioned.Interface
lock sync.Mutex
defaultResync time.Duration
client versioned.Interface
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
lock sync.Mutex
defaultResync time.Duration

informers map[reflect.Type]cache.SharedIndexInformer
// startedInformers is used for tracking which informers have been started.
Expand All @@ -44,8 +47,17 @@ type sharedInformerFactory struct {

// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory {
return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil)
}

// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory.
// Listers obtained via this SharedInformerFactory will be subject to the same filters
// as specified here.
func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory {
return &sharedInformerFactory{
client: client,
namespace: namespace,
tweakListOptions: tweakListOptions,
defaultResync: defaultResync,
informers: make(map[reflect.Type]cache.SharedIndexInformer),
startedInformers: make(map[reflect.Type]bool),
Expand Down Expand Up @@ -115,5 +127,5 @@ type SharedInformerFactory interface {
}

func (f *sharedInformerFactory) Stable() stable.Interface {
return stable.New(f)
return stable.New(f, f.namespace, f.tweakListOptions)
}
2 changes: 1 addition & 1 deletion pkg/client/informers/externalversions/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (f *genericInformer) Lister() cache.GenericLister {
// TODO extend this to unknown resources with a client pool
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
switch resource {
// Group=Stable, Version=V1alpha1
// Group=stable.agones.dev, Version=v1alpha1
case v1alpha1.SchemeGroupVersion.WithResource("gameservers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Stable().V1alpha1().GameServers().Informer()}, nil

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
time "time"

versioned "agones.dev/agones/pkg/client/clientset/versioned"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
cache "k8s.io/client-go/tools/cache"
)
Expand All @@ -33,3 +34,5 @@ type SharedInformerFactory interface {
Start(stopCh <-chan struct{})
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
}

type TweakListOptionsFunc func(*v1.ListOptions)
Loading