Skip to content

Commit f797fdb

Browse files
iQQBotroboquat
authored andcommitted
[ws-proxy] Add missing kube-rbac-proxy rolebinding
1 parent 1787d38 commit f797fdb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

install/installer/pkg/components/ws-proxy/rolebinding.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ import (
1616

1717
func rolebinding(ctx *common.RenderContext) ([]runtime.Object, error) {
1818
return []runtime.Object{
19+
&rbacv1.ClusterRoleBinding{
20+
TypeMeta: common.TypeMetaClusterRoleBinding,
21+
ObjectMeta: metav1.ObjectMeta{
22+
Name: fmt.Sprintf("%s-%s-kube-rbac-proxy", ctx.Namespace, Component),
23+
Labels: common.DefaultLabels(Component),
24+
},
25+
RoleRef: rbacv1.RoleRef{
26+
Kind: "ClusterRole",
27+
Name: fmt.Sprintf("%s-kube-rbac-proxy", ctx.Namespace),
28+
APIGroup: "rbac.authorization.k8s.io",
29+
},
30+
Subjects: []rbacv1.Subject{
31+
{
32+
Kind: "ServiceAccount",
33+
Name: Component,
34+
Namespace: ctx.Namespace,
35+
},
36+
},
37+
},
1938
&rbacv1.RoleBinding{
2039
TypeMeta: common.TypeMetaRoleBinding,
2140
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)