Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
501092c7
Unverified
Commit
501092c7
authored
May 29, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
May 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #78232 from SataQiu/fix-golint-20190523
Fix golint failures of pkg/controller/namespace/deletion pkg/controller/serviceaccount
parents
5cb9405a
b87d006a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
5 deletions
+6
-5
.golint_failures
hack/.golint_failures
+0
-2
namespaced_resources_deleter.go
...roller/namespace/deletion/namespaced_resources_deleter.go
+2
-1
namespaced_resources_deleter_test.go
...r/namespace/deletion/namespaced_resources_deleter_test.go
+1
-1
serviceaccounts_controller.go
pkg/controller/serviceaccount/serviceaccounts_controller.go
+2
-0
tokens_controller.go
pkg/controller/serviceaccount/tokens_controller.go
+1
-1
No files found.
hack/.golint_failures
View file @
501092c7
...
...
@@ -70,7 +70,6 @@ pkg/controller/job
pkg/controller/job/config/v1alpha1
pkg/controller/namespace
pkg/controller/namespace/config/v1alpha1
pkg/controller/namespace/deletion
pkg/controller/nodeipam/config/v1alpha1
pkg/controller/nodelifecycle/config/v1alpha1
pkg/controller/podautoscaler
...
...
@@ -87,7 +86,6 @@ pkg/controller/resourcequota/config/v1alpha1
pkg/controller/route
pkg/controller/service
pkg/controller/service/config/v1alpha1
pkg/controller/serviceaccount
pkg/controller/serviceaccount/config/v1alpha1
pkg/controller/statefulset
pkg/controller/ttl
...
...
pkg/controller/namespace/deletion/namespaced_resources_deleter.go
View file @
501092c7
...
...
@@ -37,11 +37,12 @@ import (
v1clientset
"k8s.io/client-go/kubernetes/typed/core/v1"
)
//
I
nterface to delete a namespace with all resources in it.
//
NamespacedResourcesDeleterInterface is the i
nterface to delete a namespace with all resources in it.
type
NamespacedResourcesDeleterInterface
interface
{
Delete
(
nsName
string
)
error
}
// NewNamespacedResourcesDeleter returns a new NamespacedResourcesDeleter.
func
NewNamespacedResourcesDeleter
(
nsClient
v1clientset
.
NamespaceInterface
,
dynamicClient
dynamic
.
Interface
,
podsGetter
v1clientset
.
PodsGetter
,
discoverResourcesFn
func
()
([]
*
metav1
.
APIResourceList
,
error
),
...
...
pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go
View file @
501092c7
...
...
@@ -213,7 +213,7 @@ func TestRetryOnConflictError(t *testing.T) {
retryOnce
:=
func
(
namespace
*
v1
.
Namespace
)
(
*
v1
.
Namespace
,
error
)
{
numTries
++
if
numTries
<=
1
{
return
namespace
,
errors
.
NewConflict
(
api
.
Resource
(
"namespaces"
),
namespace
.
Name
,
fmt
.
Errorf
(
"ERROR
!
"
))
return
namespace
,
errors
.
NewConflict
(
api
.
Resource
(
"namespaces"
),
namespace
.
Name
,
fmt
.
Errorf
(
"ERROR"
))
}
return
namespace
,
nil
}
...
...
pkg/controller/serviceaccount/serviceaccounts_controller.go
View file @
501092c7
...
...
@@ -52,6 +52,7 @@ type ServiceAccountsControllerOptions struct {
NamespaceResync
time
.
Duration
}
// DefaultServiceAccountsControllerOptions returns the default options for creating a ServiceAccountsController.
func
DefaultServiceAccountsControllerOptions
()
ServiceAccountsControllerOptions
{
return
ServiceAccountsControllerOptions
{
ServiceAccounts
:
[]
v1
.
ServiceAccount
{
...
...
@@ -108,6 +109,7 @@ type ServiceAccountsController struct {
queue
workqueue
.
RateLimitingInterface
}
// Run runs the ServiceAccountsController blocks until receiving signal from stopCh.
func
(
c
*
ServiceAccountsController
)
Run
(
workers
int
,
stopCh
<-
chan
struct
{})
{
defer
utilruntime
.
HandleCrash
()
defer
c
.
queue
.
ShutDown
()
...
...
pkg/controller/serviceaccount/tokens_controller.go
View file @
501092c7
...
...
@@ -162,7 +162,7 @@ type TokensController struct {
maxRetries
int
}
// Runs controller blocks until stopCh is closed
// Run
run
s controller blocks until stopCh is closed
func
(
e
*
TokensController
)
Run
(
workers
int
,
stopCh
<-
chan
struct
{})
{
// Shut down queues
defer
utilruntime
.
HandleCrash
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment