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

Access to Prometheus service monitor fails #369

Closed
jnewfield opened this issue Aug 16, 2024 · 4 comments
Closed

Access to Prometheus service monitor fails #369

jnewfield opened this issue Aug 16, 2024 · 4 comments
Labels
stale Pull requests/issues with no activity

Comments

@jnewfield
Copy link

After deploying NGINX Ingress Operator and an NginxIngress crd with parameter spec.prometheus.serviceMonitor.create.true, the NGINX Ingress Controller pod fails to get created. An error similar to the following message is reported from the NginxIngress resource:

failed to install release: Unable to continue with install: could not get information about the resource ServiceMonitor "nginxingress-sample-nginx-ingress-controller" in namespace "nginx-ingress": servicemonitors.monitoring.coreos.com "nginxingress-sample-nginx-ingress-controller" is forbidden: User "system:serviceaccount:nginx-ingress-operator-system:nginx-ingress-operator-controller-manager" cannot get resource "servicemonitors" in API group "monitoring.coreos.com" in the namespace "nginx-ingress"

Workaround:
Add appropriate rbac rules for NGINX Ingress Operator to access the Prometheus service monitor
Edit the NGINX Ingress Operator manager cluster role
kubectl edit clusterroles.rbac.authorization.k8s.io nginx-ingress-operator-manager-role
Add the following api group rule just before the very last api group rule in the file

- apiGroups:
  - monitoring.coreos.com
  resources:
  - servicemonitors
  verbs:
  - '*'

Fix:
Incorporate permissions to api group monitoring.coreos.com

@AlexFenlon
Copy link
Contributor

Hi @jnewfield, we are looking into this.

Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale Pull requests/issues with no activity label Nov 25, 2024
Copy link
Contributor

github-actions bot commented Dec 5, 2024

This issue was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
@jnewfield
Copy link
Author

jnewfield commented Jan 24, 2025

@AlexFenlon, Was there any movement on this issue on your end?
There is another report of this issue: internal service cloud case 00780599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Pull requests/issues with no activity
Projects
None yet
Development

No branches or pull requests

2 participants