diff --git a/pkg/context/controller_manager_context.go b/pkg/context/controller_manager_context.go index df5d3e5d0f..87f8ba284a 100644 --- a/pkg/context/controller_manager_context.go +++ b/pkg/context/controller_manager_context.go @@ -77,7 +77,6 @@ type ControllerManagerContext struct { // endpoints. Password string - // EnableKeepAlive is a session feature to enable keep alive handler // for better load management on vSphere api server EnableKeepAlive bool diff --git a/pkg/manager/options.go b/pkg/manager/options.go index 14651fc254..24e2fabbbe 100644 --- a/pkg/manager/options.go +++ b/pkg/manager/options.go @@ -47,6 +47,10 @@ type Options struct { // LeaderElectionEnabled is a flag that enables leader election. LeaderElectionEnabled bool + // EnableKeepAlive is a session feature to enable keep alive handler + // for better load management on vSphere api server + EnableKeepAlive bool + // LeaderElectionID is the name of the config map to use as the // locking resource when configuring leader election. LeaderElectionID string @@ -98,10 +102,6 @@ type Options struct { // endpoints. Password string - // EnableKeepAlive is a session feature to enable keep alive handler - // for better load management on vSphere api server - EnableKeepAlive bool - // KeepAliveDuration is the idle time interval in between send() requests // in keepalive handler KeepAliveDuration time.Duration diff --git a/pkg/session/session.go b/pkg/session/session.go index 485dfbf71e..adb50b0fe2 100644 --- a/pkg/session/session.go +++ b/pkg/session/session.go @@ -47,7 +47,7 @@ type Session struct { type GetOrCreateContext struct { context context.Context - logger logr.Logger + logger logr.Logger } func NewGetOrCreateContext(ctx context.Context, logger logr.Logger) GetOrCreateContext { @@ -57,9 +57,8 @@ func NewGetOrCreateContext(ctx context.Context, logger logr.Logger) GetOrCreateC } } - type Feature struct { - EnableKeepAlive bool + EnableKeepAlive bool KeepAliveDuration time.Duration }