Skip to content

Commit

Permalink
Added ClusterRoleBinding for configmap.
Browse files Browse the repository at this point in the history
  • Loading branch information
gyliu513 committed Aug 22, 2017
1 parent 2645c93 commit e44e45c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>kubernetes-initializer-tutorial</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
4 changes: 4 additions & 0 deletions docs/cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ kubectl delete initializerconfiguration envoy
kubectl delete deployment envoy-initializer helloworld helloworld-with-annotation
```

```
kubectl delete clusterrolebindings cluster-admin-for-configmap
```

```
kubectl delete configmaps envoy envoy-initializer
```
8 changes: 8 additions & 0 deletions docs/deploy-envoy-initializer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ The Envoy Initializer is configured using a ConfigMap, identified by the `-confi
kubectl apply -f configmaps/envoy-initializer.yaml
```

### Create the ClusterRoleBinding

The `ClusterRoleBinding` is needed to make sure the user `system:serviceaccount:default:default` have permission to get data from configmap `envoy-initializer`.

```
kubectl apply -f rbac/bindings.yaml
```

### Create the Envoy Initializer Deployment

Deploy the `envoy-initializer` controller:
Expand Down
12 changes: 12 additions & 0 deletions rbac/bindings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-admin-for-configmap
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: system:serviceaccount:default:default

0 comments on commit e44e45c

Please sign in to comment.