Skip to content

Commit

Permalink
Fix go vet errors
Browse files Browse the repository at this point in the history
Signed-off-by: Monis Khan <mkhan@redhat.com>
  • Loading branch information
enj committed Aug 29, 2017
1 parent 35c1027 commit 2b121fc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/server/kubernetes/node/node_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func BuildKubernetesNodeConfig(options configapi.NodeConfig, enableProxy, enable
},
Webhook: componentconfig.KubeletWebhookAuthentication{
Enabled: true,
CacheTTL: metav1.Duration{authnTTL},
CacheTTL: metav1.Duration{Duration: authnTTL},
},
Anonymous: componentconfig.KubeletAnonymousAuthentication{
Enabled: true,
Expand All @@ -214,8 +214,8 @@ func BuildKubernetesNodeConfig(options configapi.NodeConfig, enableProxy, enable
server.Authorization = componentconfig.KubeletAuthorization{
Mode: componentconfig.KubeletAuthorizationModeWebhook,
Webhook: componentconfig.KubeletWebhookAuthorization{
CacheAuthorizedTTL: metav1.Duration{authzTTL},
CacheUnauthorizedTTL: metav1.Duration{authzTTL},
CacheAuthorizedTTL: metav1.Duration{Duration: authzTTL},
CacheUnauthorizedTTL: metav1.Duration{Duration: authzTTL},
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/origin/openshift_apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ func (c *OpenshiftAPIConfig) ensureOpenShiftInfraNamespace(context genericapiser
// Ensure we have the bootstrap SA for Nodes
_, err = c.KubeClientInternal.Core().ServiceAccounts(ns).Create(&kapi.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: bootstrappolicy.InfraNodeBootstrapServiceAccountName}})
if err != nil && !kapierror.IsAlreadyExists(err) {
glog.Errorf("Error creating service account %s/%s: %v", namespace, bootstrappolicy.InfraNodeBootstrapServiceAccountName, err)
glog.Errorf("Error creating service account %s/%s: %v", ns, bootstrappolicy.InfraNodeBootstrapServiceAccountName, err)
}

EnsureNamespaceServiceAccountRoleBindings(c.KubeClientInternal, c.DeprecatedOpenshiftClient, namespace)
Expand Down
4 changes: 2 additions & 2 deletions pkg/router/controller/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (factory *RouterControllerFactory) Create(plugin router.Plugin, watchNodes,
field: factory.Fields,
label: factory.Labels,
}
cache.NewReflector(&cache.ListWatch{rLW.List, rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()
cache.NewReflector(&cache.ListWatch{ListFunc: rLW.List, WatchFunc: rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()

endpointsEventQueue := oscache.NewEventQueue(routerKeyFn)
cache.NewReflector(&endpointsLW{
Expand Down Expand Up @@ -223,7 +223,7 @@ func (factory *RouterControllerFactory) CreateNotifier(changed func()) RoutesByH
field: factory.Fields,
label: factory.Labels,
}
cache.NewReflector(&cache.ListWatch{rLW.List, rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()
cache.NewReflector(&cache.ListWatch{ListFunc: rLW.List, WatchFunc: rLW.Watch}, &routeapi.Route{}, routeEventQueue, factory.ResyncInterval).Run()

endpointStore := cache.NewStore(keyFn)
endpointsEventQueue := oscache.NewEventQueueForStore(keyFn, endpointStore)
Expand Down

0 comments on commit 2b121fc

Please sign in to comment.