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
afc55647
Commit
afc55647
authored
Feb 10, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #20645 from pmorie/namespace-controller-config
Auto commit by PR queue bot
parents
86a7a953
3a505ac3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
namespace_controller_test.go
pkg/controller/namespace/namespace_controller_test.go
+1
-0
namespace_controller_utils.go
pkg/controller/namespace/namespace_controller_utils.go
+8
-0
No files found.
pkg/controller/namespace/namespace_controller_test.go
View file @
afc55647
...
...
@@ -108,6 +108,7 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *unversioned.APIV
strings
.
Join
([]
string
{
"list"
,
"pods"
,
""
},
"-"
),
strings
.
Join
([]
string
{
"delete-collection"
,
"resourcequotas"
,
""
},
"-"
),
strings
.
Join
([]
string
{
"delete-collection"
,
"secrets"
,
""
},
"-"
),
strings
.
Join
([]
string
{
"delete-collection"
,
"configmaps"
,
""
},
"-"
),
strings
.
Join
([]
string
{
"delete-collection"
,
"limitranges"
,
""
},
"-"
),
strings
.
Join
([]
string
{
"delete-collection"
,
"events"
,
""
},
"-"
),
strings
.
Join
([]
string
{
"delete-collection"
,
"serviceaccounts"
,
""
},
"-"
),
...
...
pkg/controller/namespace/namespace_controller_utils.go
View file @
afc55647
...
...
@@ -128,6 +128,10 @@ func deleteAllContent(kubeClient clientset.Interface, versions *unversioned.APIV
if
err
!=
nil
{
return
estimate
,
err
}
err
=
deleteConfigMaps
(
kubeClient
,
namespace
)
if
err
!=
nil
{
return
estimate
,
err
}
err
=
deletePersistentVolumeClaims
(
kubeClient
,
namespace
)
if
err
!=
nil
{
return
estimate
,
err
...
...
@@ -315,6 +319,10 @@ func deleteSecrets(kubeClient clientset.Interface, ns string) error {
return
kubeClient
.
Core
()
.
Secrets
(
ns
)
.
DeleteCollection
(
nil
,
api
.
ListOptions
{})
}
func
deleteConfigMaps
(
kubeClient
clientset
.
Interface
,
ns
string
)
error
{
return
kubeClient
.
Core
()
.
ConfigMaps
(
ns
)
.
DeleteCollection
(
nil
,
api
.
ListOptions
{})
}
func
deletePersistentVolumeClaims
(
kubeClient
clientset
.
Interface
,
ns
string
)
error
{
return
kubeClient
.
Core
()
.
PersistentVolumeClaims
(
ns
)
.
DeleteCollection
(
nil
,
api
.
ListOptions
{})
}
...
...
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