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

Add permissions to list and watch ConfigMaps and Secrets #413

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

pdecat
Copy link
Contributor

@pdecat pdecat commented Apr 4, 2018

Required since #379

Without that, the following errors are triggered:

E  k8s.io/kube-state-metrics/collectors/collectors.go:62: Failed to list *v1.Secret: secrets is forbidden: User "system:serviceaccount:monitoring:kube-state-metrics" cannot list secrets at the cluster scope: Unknown user "system:serviceaccount:monitoring:kube-state-metrics" 
E  k8s.io/kube-state-metrics/collectors/collectors.go:62: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:monitoring:kube-state-metrics" cannot list configmaps at the cluster scope: Unknown user "system:serviceaccount:monitoring:kube-state-metrics" 

Note: here, kube-state-metrics is deployed in a custom monitoring namespace.

Required since kubernetes#379

Without that, the following error is triggered:

```
E  k8s.io/kube-state-metrics/collectors/collectors.go:62: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:monitoring:kube-state-metrics" cannot list configmaps at the cluster scope: Unknown user "system:serviceaccount:monitoring:kube-state-metrics" 
E  k8s.io/kube-state-metrics/collectors/collectors.go:62: Failed to list *v1.Secret: secrets is forbidden: User "system:serviceaccount:monitoring:kube-state-metrics" cannot list secrets at the cluster scope: Unknown user "system:serviceaccount:monitoring:kube-state-metrics" 
E  k8s.io/kube-state-metrics/collectors/collectors.go:62: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:monitoring:kube-state-metrics" cannot list configmaps at the cluster scope: Unknown user "system:serviceaccount:monitoring:kube-state-metrics" 
```
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 4, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pdecat
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: andyxning

Assign the PR to them by writing /assign @andyxning in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 4, 2018
@pdecat pdecat mentioned this pull request Apr 4, 2018
@pdecat
Copy link
Contributor Author

pdecat commented Apr 4, 2018

@brancz
Copy link
Member

brancz commented Apr 4, 2018

lgtm 👍 thanks a lot!

@brancz brancz merged commit 3952e5d into kubernetes:master Apr 4, 2018
@andyxning
Copy link
Member

@pdecat Good catch. Thanks for helping us correct this. 👍

while1malloc0 pushed a commit to while1malloc0/kube-state-metrics that referenced this pull request Jul 2, 2018
Add permissions to list and watch ConfigMaps and Secrets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants