Skip to content

Commit

Permalink
fix: commands in docs (#825)
Browse files Browse the repository at this point in the history
  • Loading branch information
VaibhavPage committed Aug 10, 2020
1 parent 757dbe7 commit fa33eb3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
17 changes: 6 additions & 11 deletions docs/service-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,20 @@ For example, if you want to watch actions on `Deployment` objects, you need to:

1. Create a Service Account

```sh
kubectl -n your-namespace create sa my-sa
```
kubectl -n your-namespace create sa my-sa


2. Grant RBAC privileges to it

```sh
kubectl -n your-namespace create role deployments-watcher --verb=list,watch --resource=deployments.apps
kubectl -n your-namespace create role deployments-watcher --verb=list,watch --resource=deployments.apps

kubectl -n your-namespace create rolebinding deployments-watcher-role-binding --role=deployments-watcher --serviceaccount=your-namespace:my-sa
```
kubectl -n your-namespace create rolebinding deployments-watcher-role-binding --role=deployments-watcher --serviceaccount=your-namespace:my-sa

or (if you want to watch cluster scope)

```sh
kubectl create clusterrole deployments-watcher --verb=list,watch --resource=deployments.apps
kubectl create clusterrole deployments-watcher --verb=list,watch --resource=deployments.apps

kubectl create clusterrolebinding deployments-watcher-clusterrole-binding --clusterrole=deployments-watcher --serviceaccount=your-namespace:my-sa
```
kubectl create clusterrolebinding deployments-watcher-clusterrole-binding --clusterrole=deployments-watcher --serviceaccount=your-namespace:my-sa

## Service Account for Sensors

Expand Down
7 changes: 6 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ nav:
- 'setup/redis.md'
- 'setup/resource.md'
- 'setup/webhook.md'
- 'setup/pulsar.md'
- Tutorials:
- 'tutorials/01-introduction.md'
- 'tutorials/02-parameterization.md'
Expand All @@ -53,7 +54,6 @@ nav:
- 'tutorials/06-circuit-and-switch.md'
- 'tutorials/07-filters.md'
- 'tutorials/08-policy.md'
- 'tutorials/09-service-account.md'
- Triggers:
- 'triggers/argo-workflow.md'
- 'triggers/aws-lambda.md'
Expand All @@ -65,6 +65,11 @@ nav:
- 'triggers/slack-trigger.md'
- 'triggers/build-your-own-trigger.md'
- 'developer_guide.md'
- 'eventsource-deployment-strategies.md'
- 'eventsource-names.md'
- 'eventsource-with-multiple-events.md'
- 'managed-namespace.md'
- 'service-accounts.md'
- 'FAQ.md'
- Releases ⧉: https://github.com/argoproj/argo-events/releases
- Roadmap ⧉: https://github.com/argoproj/argo-events/milestones
Expand Down

0 comments on commit fa33eb3

Please sign in to comment.