Skip to content

Commit

Permalink
Fixes to adapt to 1.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Alena Prokharchyk committed Jul 3, 2018
1 parent c0370fe commit cf6dace
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 109 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/dist
*.swp
/.trash-cache
/trash.lock
4 changes: 2 additions & 2 deletions controller/generic_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"sync"
"time"

"github.com/juju/ratelimit"
errors2 "github.com/pkg/errors"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/types"
"github.com/sirupsen/logrus"
"golang.org/x/time/rate"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -69,7 +69,7 @@ func NewGenericController(name string, genericClient Backend) GenericController
rl := workqueue.NewMaxOfRateLimiter(
workqueue.NewItemExponentialFailureRateLimiter(500*time.Millisecond, 1000*time.Second),
// 10 qps, 100 bucket size. This is only for retry speed and its only the overall factor (not per item)
&workqueue.BucketRateLimiter{Bucket: ratelimit.NewBucketWithRate(float64(10), int64(100))},
&workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)},
)

return &genericController{
Expand Down
4 changes: 2 additions & 2 deletions leader/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (

"github.com/sirupsen/logrus"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes"
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/tools/leaderelection"
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/client-go/tools/record"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/client/leaderelectionconfig"
)

Expand Down Expand Up @@ -73,5 +73,5 @@ func createRecorder(name string, kubeClient kubernetes.Interface) record.EventRe
eventBroadcaster := record.NewBroadcaster()
eventBroadcaster.StartLogging(logrus.Infof)
eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(kubeClient.CoreV1().RESTClient()).Events("")})
return eventBroadcaster.NewRecorder(api.Scheme, v1.EventSource{Component: name})
return eventBroadcaster.NewRecorder(runtime.NewScheme(), v1.EventSource{Component: name})
}
84 changes: 42 additions & 42 deletions trash.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,63 @@ package: github.com/rancher/norman
import:
- package: k8s.io/kubernetes
version: v1.10.5
- package: golang.org/x/tools
version: 2382e3994d48b1d22acc2c86bcad0a2aff028e32
- package: k8s.io/gengo
version: 01a732e01d00cb9a81bb0ca050d3e6d2b947927b
- package: github.com/spf13/pflag
version: 583c0c0531f06d5278b7d917446061adc344b5cd
- package: github.com/davecgh/go-spew
version: 782f4967f2dc4564575ca782fe2d04090b5faca8
- package: github.com/gogo/protobuf
version: c0656edd0d9eab7c66d1eb0c568f9039345796f7
- package: github.com/pkg/errors
version: 645ef00459ed84a119197bfb8d8205042c6df63d
- package: github.com/golang/glog
version: 44145f04b68cf362d9c4df2182967c2275eaefed
- package: github.com/json-iterator/go
version: f2b4162afba35581b6d4a50d3b8f34e33c144682
- package: golang.org/x/text
version: b19bf474d317b857955b12035d2c5acb57ce8b01
- package: github.com/golang/groupcache
version: 02826c3e79038b59d737d3b1c0a1d937f71a4433
- package: k8s.io/kube-openapi
version: 39cb288412c48cb533ba4be5d6c28620b9a0c1b4
- package: github.com/imdario/mergo
version: 6633656539c1639d9d78127b7d47c622b5d7b6dc
- package: github.com/howeyc/gopass
version: bf9dde6d0d2c004a008c27aaee91170c786f6db8
- package: github.com/pmezard/go-difflib
version: d8ed2627bdf02c080bf22230dbb337003b7aba2d
- package: github.com/golang/protobuf
version: 1643683e1b54a9e88ad26d98f81400c8c9d9f4f9
- package: gopkg.in/yaml.v2
version: 670d4cfef0544295bc27a114dbac37980d83185a
- package: github.com/json-iterator/go
version: f2b4162afba35581b6d4a50d3b8f34e33c144682
- package: gopkg.in/inf.v0
version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
- package: github.com/ghodss/yaml
version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee
- package: github.com/modern-go/concurrent
version: bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94
- package: github.com/gorilla/websocket
version: 6eb6ad425a89d9da7a5549bc6da8f79ba5c17844
- package: github.com/howeyc/gopass
version: bf9dde6d0d2c004a008c27aaee91170c786f6db8
- package: golang.org/x/crypto
version: 81e90905daefcd6fd217b62423c0908922eadb30
- package: github.com/google/gofuzz
version: 44d81051d367757e1c7c6a5a86423ece9afcf63c
- package: github.com/hashicorp/golang-lru
version: a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4
- package: github.com/modern-go/reflect2
version: 05fbef0ca5da472bbf96c9322b84a53edc03c9fd
- package: github.com/googleapis/gnostic
version: 0c5108395e2debce0d731cf0287ddf7242066aba
- package: golang.org/x/net
version: 1c05540f6879653db88113bc4a2b70aec4bd491f
- package: github.com/modern-go/reflect2
version: 05fbef0ca5da472bbf96c9322b84a53edc03c9fd
- package: gopkg.in/yaml.v2
version: 670d4cfef0544295bc27a114dbac37980d83185a
- package: github.com/gogo/protobuf
version: c0656edd0d9eab7c66d1eb0c568f9039345796f7
- package: github.com/imdario/mergo
version: 6633656539c1639d9d78127b7d47c622b5d7b6dc
- package: github.com/davecgh/go-spew
version: 782f4967f2dc4564575ca782fe2d04090b5faca8
- package: github.com/stretchr/testify
version: f6abca593680b2315d2075e0f5e2a9751e3f431a
- package: github.com/sirupsen/logrus
version: 89742aefa4b206dcf400792f3bd35b542998eb3b
- package: golang.org/x/crypto
version: 81e90905daefcd6fd217b62423c0908922eadb30
- package: github.com/pkg/errors
version: 645ef00459ed84a119197bfb8d8205042c6df63d
- package: gopkg.in/inf.v0
version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
- package: k8s.io/gengo
version: 01a732e01d00cb9a81bb0ca050d3e6d2b947927b
- package: github.com/hashicorp/golang-lru
version: a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4
- package: github.com/ghodss/yaml
version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee
- package: k8s.io/kube-openapi
version: 39cb288412c48cb533ba4be5d6c28620b9a0c1b4
- package: golang.org/x/time
version: f51c12702a4d776e4c1fa9b0fabab841babae631
- package: github.com/golang/groupcache
version: 02826c3e79038b59d737d3b1c0a1d937f71a4433
- package: github.com/pmezard/go-difflib
version: d8ed2627bdf02c080bf22230dbb337003b7aba2d
- package: github.com/sirupsen/logrus
version: 89742aefa4b206dcf400792f3bd35b542998eb3b
- package: golang.org/x/sys
version: 95c6576299259db960f6c5b9b69ea52422860fce
- package: github.com/modern-go/concurrent
version: bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94
- package: github.com/googleapis/gnostic
version: 0c5108395e2debce0d731cf0287ddf7242066aba
- package: github.com/spf13/pflag
version: 583c0c0531f06d5278b7d917446061adc344b5cd
- package: golang.org/x/tools
version: 2382e3994d48b1d22acc2c86bcad0a2aff028e32
59 changes: 0 additions & 59 deletions vendor/k8s.io/client-go/util/workqueue/BUILD

This file was deleted.

4 changes: 0 additions & 4 deletions vendor/k8s.io/kubernetes/pkg/api/OWNERS

This file was deleted.

0 comments on commit cf6dace

Please sign in to comment.