Skip to content

Commit aa68ea1

Browse files
ArthurSensroboquat
authored andcommitted
component/content-service: Add rolebinding for kube-rbac-proxy token verification
Signed-off-by: ArthurSens <[email protected]>
1 parent c0cb54c commit aa68ea1

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

install/installer/pkg/components/content-service/rolebinding.go

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,24 @@ func rolebinding(ctx *common.RenderContext) ([]runtime.Object, error) {
3131
Kind: "ServiceAccount",
3232
Name: Component,
3333
}},
34-
}}, nil
34+
}, &rbacv1.ClusterRoleBinding{
35+
TypeMeta: common.TypeMetaClusterRoleBinding,
36+
ObjectMeta: metav1.ObjectMeta{
37+
Name: fmt.Sprintf("%s-%s-rb-kube-rbac-proxy", ctx.Namespace, Component),
38+
Labels: common.DefaultLabels(Component),
39+
},
40+
RoleRef: rbacv1.RoleRef{
41+
Kind: "ClusterRole",
42+
Name: fmt.Sprintf("%s-kube-rbac-proxy", ctx.Namespace),
43+
APIGroup: "rbac.authorization.k8s.io",
44+
},
45+
Subjects: []rbacv1.Subject{
46+
{
47+
Kind: "ServiceAccount",
48+
Name: Component,
49+
Namespace: ctx.Namespace,
50+
},
51+
},
52+
},
53+
}, nil
3554
}

0 commit comments

Comments
 (0)