Skip to content

Commit a7b4280

Browse files
authored
Add clusterrolebinding to UI's default service account (#235)
To be allowed to create tokenreviews to query token's username.
1 parent 33caa41 commit a7b4280

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

deploy-ui/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function deploy_ui() {
4646
render_file manifests/oauth-client.yaml
4747
render_file manifests/service.yaml
4848
render_file manifests/route.yaml
49+
render_file manifests/clusterrolbinding.yaml
4950
}
5051

5152
function verify_ui() {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Enable creating tokenreviews
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRoleBinding
4+
metadata:
5+
name: sa-default-rbac
6+
labels:
7+
app: ztpfw-ui
8+
roleRef:
9+
kind: ClusterRole
10+
apiGroup: rbac.authorization.k8s.io
11+
name: system:auth-delegator
12+
subjects:
13+
- kind: ServiceAccount
14+
# name: system:serviceaccount:ztpfw-ui:default
15+
name: default
16+
namespace: $UI_NS
17+

0 commit comments

Comments
 (0)