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
bc2849b6
Commit
bc2849b6
authored
Feb 01, 2017
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RBAC for TTL controller
parent
6c0535a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
controller_policy.go
...auth/authorizer/rbac/bootstrappolicy/controller_policy.go
+7
-0
controller-role-bindings.yaml
...ac/bootstrappolicy/testdata/controller-role-bindings.yaml
+15
-0
controller-roles.yaml
...rizer/rbac/bootstrappolicy/testdata/controller-roles.yaml
+25
-0
No files found.
plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go
View file @
bc2849b6
...
@@ -265,6 +265,13 @@ func init() {
...
@@ -265,6 +265,13 @@ func init() {
},
},
})
})
addControllerRole
(
rbac
.
ClusterRole
{
addControllerRole
(
rbac
.
ClusterRole
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
saRolePrefix
+
"ttl-controller"
},
Rules
:
[]
rbac
.
PolicyRule
{
rbac
.
NewRule
(
"update"
,
"patch"
,
"list"
,
"watch"
)
.
Groups
(
legacyGroup
)
.
Resources
(
"nodes"
)
.
RuleOrDie
(),
eventsRule
(),
},
})
addControllerRole
(
rbac
.
ClusterRole
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
saRolePrefix
+
"certificate-controller"
},
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
saRolePrefix
+
"certificate-controller"
},
Rules
:
[]
rbac
.
PolicyRule
{
Rules
:
[]
rbac
.
PolicyRule
{
rbac
.
NewRule
(
"get"
,
"list"
,
"watch"
)
.
Groups
(
certificatesGroup
)
.
Resources
(
"certificatesigningrequests"
)
.
RuleOrDie
(),
rbac
.
NewRule
(
"get"
,
"list"
,
"watch"
)
.
Groups
(
certificatesGroup
)
.
Resources
(
"certificatesigningrequests"
)
.
RuleOrDie
(),
...
...
plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml
View file @
bc2849b6
...
@@ -315,5 +315,20 @@ items:
...
@@ -315,5 +315,20 @@ items:
-
kind
:
ServiceAccount
-
kind
:
ServiceAccount
name
:
statefulset-controller
name
:
statefulset-controller
namespace
:
kube-system
namespace
:
kube-system
-
apiVersion
:
rbac.authorization.k8s.io/v1beta1
kind
:
ClusterRoleBinding
metadata
:
creationTimestamp
:
null
labels
:
kubernetes.io/bootstrapping
:
rbac-defaults
name
:
system:controller:ttl-controller
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
kind
:
ClusterRole
name
:
system:controller:ttl-controller
subjects
:
-
kind
:
ServiceAccount
name
:
ttl-controller
namespace
:
kube-system
kind
:
List
kind
:
List
metadata
:
{}
metadata
:
{}
plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml
View file @
bc2849b6
...
@@ -905,5 +905,30 @@ items:
...
@@ -905,5 +905,30 @@ items:
-
create
-
create
-
patch
-
patch
-
update
-
update
-
apiVersion
:
rbac.authorization.k8s.io/v1beta1
kind
:
ClusterRole
metadata
:
creationTimestamp
:
null
labels
:
kubernetes.io/bootstrapping
:
rbac-defaults
name
:
system:controller:ttl-controller
rules
:
-
apiGroups
:
-
"
"
resources
:
-
nodes
verbs
:
-
list
-
patch
-
update
-
watch
-
apiGroups
:
-
"
"
resources
:
-
events
verbs
:
-
create
-
patch
-
update
kind
:
List
kind
:
List
metadata
:
{}
metadata
:
{}
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