Skip to content

Commit

Permalink
Merge pull request #99 from akrejcir/improve-docs
Browse files Browse the repository at this point in the history
docs: Improve API documentation
  • Loading branch information
kubevirt-bot authored Mar 4, 2024
2 parents 6c429dd + 9601e47 commit dea4084
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ kubectl apply -f "https://github.com/kubevirt/vm-console-proxy/releases/latest/d

## API
See the [API documentation](docs/api.md).

### API Access Permissions

The `token.kubevirt.io:generate` `ClusterRole` can be bound to users or service accounts to give
them permission to call the API.
6 changes: 5 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ KUBERNETES_USER_TOKEN=$(oc whoami -t)
### Revoking a token
Revoking a single token is not possible.
All tokens associated with a VM can be revoked by deleting the `ServiceAccount` that was created for generating them.
It is in the same namespace as the VM, its name is `${VM_NAME}-vnc-access`, and it has `ownerReference` set to the VM.
It is in the same namespace as the VM, its name is `${VM_NAME}-vnc-access`, and it has `ownerReference` set to the VM.

```bash
kubectl delete serviceaccount --namespace "${VM_NAMESPACE}" "${VM_NAME}-vnc-access"
```

0 comments on commit dea4084

Please sign in to comment.