Skip to content
Closed
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
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/google/go-cmp v0.5.5
github.com/google/uuid v1.1.2
github.com/imdario/mergo v0.3.8 // indirect
github.com/openshift/api v0.0.0-20220504105152-6f735e7109c8
github.com/openshift/api v0.0.0-20220802140642-dc2694e95008
github.com/openshift/client-go v0.0.0-20220504114320-6aec01bb0754
github.com/openshift/library-go v0.0.0-20220523142556-5bcfed822fc6
github.com/pkg/errors v0.9.1
Expand All @@ -18,13 +18,13 @@ require (
github.com/prometheus/common v0.28.0
github.com/spf13/cobra v1.2.1
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
gopkg.in/fsnotify.v1 v1.4.7
k8s.io/api v0.23.0
k8s.io/api v0.24.3
k8s.io/apiextensions-apiserver v0.23.0
k8s.io/apimachinery v0.23.0
k8s.io/client-go v0.23.0
k8s.io/klog/v2 v2.30.0
k8s.io/apimachinery v0.24.3
k8s.io/client-go v0.24.3
k8s.io/klog/v2 v2.60.1
k8s.io/kube-aggregator v0.23.0
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
)
61 changes: 48 additions & 13 deletions go.sum

Large diffs are not rendered by default.

19 changes: 6 additions & 13 deletions pkg/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (o *Options) Run(ctx context.Context) error {
// and then attempts a clean shutdown limited by an internal context
// with a two-minute cap. It returns after it successfully collects all
// launched goroutines.
func (o *Options) run(ctx context.Context, controllerCtx *Context, lock *resourcelock.ConfigMapLock, restConfig *rest.Config, burstRestConfig *rest.Config) {
func (o *Options) run(ctx context.Context, controllerCtx *Context, lock resourcelock.Interface, restConfig *rest.Config, burstRestConfig *rest.Config) {
runContext, runCancel := context.WithCancel(ctx) // so we can cancel internally on errors or TERM
defer runCancel()
shutdownContext, shutdownCancel := context.WithCancel(context.Background()) // extends beyond ctx
Expand Down Expand Up @@ -305,7 +305,7 @@ func (o *Options) run(ctx context.Context, controllerCtx *Context, lock *resourc
}

// createResourceLock initializes the lock.
func createResourceLock(cb *ClientBuilder, namespace, name string) (*resourcelock.ConfigMapLock, error) {
func createResourceLock(cb *ClientBuilder, namespace, name string) (resourcelock.Interface, error) {
client := cb.KubeClientOrDie("leader-election")
eventBroadcaster := record.NewBroadcaster()
eventBroadcaster.StartLogging(klog.Infof)
Expand All @@ -324,17 +324,10 @@ func createResourceLock(cb *ClientBuilder, namespace, name string) (*resourceloc
// add a uniquifier so that two processes on the same host don't accidentally both become active
id = id + "_" + uuid.String()

return &resourcelock.ConfigMapLock{
ConfigMapMeta: metav1.ObjectMeta{
Namespace: namespace,
Name: name,
},
Client: client.CoreV1(),
LockConfig: resourcelock.ResourceLockConfig{
Identity: id,
EventRecorder: eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: namespace}),
},
}, nil
return resourcelock.New(resourcelock.ConfigMapsLeasesResourceLock, namespace, name, client.CoreV1(), client.CoordinationV1(), resourcelock.ResourceLockConfig{
Identity: id,
EventRecorder: eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: namespace}),
})
}

func resyncPeriod(minResyncPeriod time.Duration) func() time.Duration {
Expand Down

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

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

12 changes: 12 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/LICENSE

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

188 changes: 188 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/README.md

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

Loading