Skip to content

Commit 128fd88

Browse files
committed
Move cloud-specific roles out of RBAC bootstrap
1 parent f83fcbe commit 128fd88

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,13 +476,6 @@ func ClusterRoles() []rbacv1.ClusterRole {
476476
rbacv1helpers.NewRule("get", "list", "watch", "create", "update", "patch").Groups(legacyGroup).Resources("events").RuleOrDie(),
477477
},
478478
},
479-
{
480-
ObjectMeta: metav1.ObjectMeta{Name: "system:aws-cloud-provider"},
481-
Rules: []rbacv1.PolicyRule{
482-
rbacv1helpers.NewRule("get", "patch").Groups(legacyGroup).Resources("nodes").RuleOrDie(),
483-
eventsRule(),
484-
},
485-
},
486479
{
487480
// a role making the csrapprover controller approve a node client CSR
488481
ObjectMeta: metav1.ObjectMeta{Name: "system:certificates.k8s.io:certificatesigningrequests:nodeclient"},
@@ -540,7 +533,6 @@ func ClusterRoleBindings() []rbacv1.ClusterRoleBinding {
540533
rbacv1helpers.NewClusterBinding("system:kube-controller-manager").Users(user.KubeControllerManager).BindingOrDie(),
541534
rbacv1helpers.NewClusterBinding("system:kube-dns").SAs("kube-system", "kube-dns").BindingOrDie(),
542535
rbacv1helpers.NewClusterBinding("system:kube-scheduler").Users(user.KubeScheduler).BindingOrDie(),
543-
rbacv1helpers.NewClusterBinding("system:aws-cloud-provider").SAs("kube-system", "aws-cloud-provider").BindingOrDie(),
544536
rbacv1helpers.NewClusterBinding("system:volume-scheduler").Users(user.KubeScheduler).BindingOrDie(),
545537

546538
// This default binding of the system:node role to the system:nodes group is deprecated in 1.7 with the availability of the Node authorizer.

plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-role-bindings.yaml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,6 @@ items:
1717
- apiGroup: rbac.authorization.k8s.io
1818
kind: Group
1919
name: system:masters
20-
- apiVersion: rbac.authorization.k8s.io/v1
21-
kind: ClusterRoleBinding
22-
metadata:
23-
annotations:
24-
rbac.authorization.kubernetes.io/autoupdate: "true"
25-
creationTimestamp: null
26-
labels:
27-
kubernetes.io/bootstrapping: rbac-defaults
28-
name: system:aws-cloud-provider
29-
roleRef:
30-
apiGroup: rbac.authorization.k8s.io
31-
kind: ClusterRole
32-
name: system:aws-cloud-provider
33-
subjects:
34-
- kind: ServiceAccount
35-
name: aws-cloud-provider
36-
namespace: kube-system
3720
- apiVersion: rbac.authorization.k8s.io/v1
3821
kind: ClusterRoleBinding
3922
metadata:

plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -355,31 +355,6 @@ items:
355355
- subjectaccessreviews
356356
verbs:
357357
- create
358-
- apiVersion: rbac.authorization.k8s.io/v1
359-
kind: ClusterRole
360-
metadata:
361-
annotations:
362-
rbac.authorization.kubernetes.io/autoupdate: "true"
363-
creationTimestamp: null
364-
labels:
365-
kubernetes.io/bootstrapping: rbac-defaults
366-
name: system:aws-cloud-provider
367-
rules:
368-
- apiGroups:
369-
- ""
370-
resources:
371-
- nodes
372-
verbs:
373-
- get
374-
- patch
375-
- apiGroups:
376-
- ""
377-
resources:
378-
- events
379-
verbs:
380-
- create
381-
- patch
382-
- update
383358
- apiVersion: rbac.authorization.k8s.io/v1
384359
kind: ClusterRole
385360
metadata:

0 commit comments

Comments
 (0)