Skip to content

Commit b297867

Browse files
anispateclaude
andcommitted
fix: Add /federate nonResourceURLs permission to Prometheus ClusterRole
Adds the /federate endpoint permission to the auto-generated Prometheus ClusterRole to fix HTTP 403 Forbidden errors when ServiceMonitors attempt to scrape metrics from the /federate endpoint. This resolves the issue where CMO federation to hypershift-monitoring-stack fails on all MC clusters because the ClusterRole was missing the required nonResourceURLs permission. Fixes: SREP-3312 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9b663b7 commit b297867

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/controllers/monitoring/monitoring-stack/components.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ func newPrometheusClusterRole(ms *stack.MonitoringStack, rbacResourceName string
8383
Resources: []string{"securitycontextconstraints"},
8484
ResourceNames: []string{"nonroot", "nonroot-v2"},
8585
Verbs: []string{"use"},
86+
}, {
87+
NonResourceURLs: []string{"/federate"},
88+
Verbs: []string{"get"},
8689
}},
8790
}
8891
}

0 commit comments

Comments
 (0)