-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add instructions for setting ClusterRole permissions
The default ClusterRole created by kubebuilder does not include all the requried permissions for the controllers to access the cluster-api objects. This PR adds additional instructions for setting these permissions. Signed-off-by: Pablo Chacin <[email protected]>
- Loading branch information
Pablo Chacin
committed
Feb 13, 2019
1 parent
0f315e9
commit e410b76
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Customize Resources | ||
|
||
## Customize Cluster Role | ||
|
||
The `ClusterRole` created by `kubebuilder` in `config/rbac/rbac_role.yaml` | ||
lacks the necessary permissions for the provider components to access the | ||
cluster-api objects. Therefore it is necessary to add some additional rules. | ||
|
||
The following patch should be copied to the new file | ||
`config/default/rbac_cluster_api_patch.yaml` | ||
|
||
```yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: manager-role | ||
rules: | ||
- apiGroups: | ||
- cluster.k8s.io | ||
resources: | ||
- clusters | ||
- clusters/status | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- cluster.k8s.io | ||
resources: | ||
- machines | ||
- machines/status | ||
- machinedeployments | ||
- machinedeployments/status | ||
- machinesets | ||
- machinesets/status | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- patch | ||
- delete | ||
``` | ||
And modify ``config/default/kustomization.yaml` adding the following entry | ||
to `patches`: | ||
```yaml | ||
patches: | ||
- rbac_cluster_api_patch.yaml | ||
``` | ||
|