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
0682372b
Unverified
Commit
0682372b
authored
Dec 13, 2017
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define default role for full kubelet API access
parent
ee134441
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
policy.go
plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go
+11
-0
cluster-roles.yaml
...thorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml
+34
-0
No files found.
plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go
View file @
0682372b
...
...
@@ -341,6 +341,17 @@ func ClusterRoles() []rbac.ClusterRole {
},
},
{
// a role to use for full access to the kubelet API
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
"system:kubelet-api-admin"
},
Rules
:
[]
rbac
.
PolicyRule
{
// Allow read-only access to the Node API objects
rbac
.
NewRule
(
"get"
,
"list"
,
"watch"
)
.
Groups
(
legacyGroup
)
.
Resources
(
"nodes"
)
.
RuleOrDie
(),
// Allow all API calls to the nodes
rbac
.
NewRule
(
"proxy"
)
.
Groups
(
legacyGroup
)
.
Resources
(
"nodes"
)
.
RuleOrDie
(),
rbac
.
NewRule
(
"*"
)
.
Groups
(
legacyGroup
)
.
Resources
(
"nodes/proxy"
,
"nodes/metrics"
,
"nodes/spec"
,
"nodes/stats"
,
"nodes/log"
)
.
RuleOrDie
(),
},
},
{
// a role to use for bootstrapping a node's client certificates
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
"system:node-bootstrapper"
},
Rules
:
[]
rbac
.
PolicyRule
{
...
...
plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml
View file @
0682372b
...
...
@@ -850,6 +850,40 @@ items:
creationTimestamp
:
null
labels
:
kubernetes.io/bootstrapping
:
rbac-defaults
name
:
system:kubelet-api-admin
rules
:
-
apiGroups
:
-
"
"
resources
:
-
nodes
verbs
:
-
get
-
list
-
watch
-
apiGroups
:
-
"
"
resources
:
-
nodes
verbs
:
-
proxy
-
apiGroups
:
-
"
"
resources
:
-
nodes/log
-
nodes/metrics
-
nodes/proxy
-
nodes/spec
-
nodes/stats
verbs
:
-
'
*'
-
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
ClusterRole
metadata
:
annotations
:
rbac.authorization.kubernetes.io/autoupdate
:
"
true"
creationTimestamp
:
null
labels
:
kubernetes.io/bootstrapping
:
rbac-defaults
name
:
system:node
rules
:
-
apiGroups
:
...
...
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