Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ClusterRoleBinding for configmap. #3

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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