mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
Merge pull request #67 from zioproto/patch-1
Fix creating the resource-lister clusterrole
This commit is contained in:
commit
c22681a91d
1 changed files with 19 additions and 1 deletions
|
|
@ -215,8 +215,26 @@ $ kubectl -n prom create secret tls serving-cm-adapter --cert=/path/to/cm-adapte
|
||||||
Next, you'll need to make sure that the service account used to launch the
|
Next, you'll need to make sure that the service account used to launch the
|
||||||
Deployment has permission to list resources in the cluster:
|
Deployment has permission to list resources in the cluster:
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>resource-lister.yaml </summary>
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: resource-lister
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- '*'
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl create clusterrole resource-lister --verb=list --resource="*"
|
$ kubectl create -f resource-lister.yaml
|
||||||
$ kubectl create clusterrolebinding cm-adapter-resource-lister --clusterrole=resource-lister -- serviceaccount=prom:prom-cm-adapter
|
$ kubectl create clusterrolebinding cm-adapter-resource-lister --clusterrole=resource-lister -- serviceaccount=prom:prom-cm-adapter
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue