Merged
Conversation
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates “team” and “team RBAC” Prometheus metrics and their consumers (alerts/dashboards) to use an organization label instead of namespace, stops exposing metrics for deleted objects, and adjusts alerting to reduce flapping across controller restarts.
Changes:
- Renamed Prometheus metric label
namespace→organizationfor team/teamrbac metrics, and updated alert rules + dashboard queries accordingly. - Added explicit metric deletion on
Team/TeamRoleBindingdeletion to avoid lingering time series for deleted objects. - Updated
GreenhouseTeamRoleBindingNotReadyalert to usemin_over_time(...)to bridge scrape gaps during restarts.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/teamrbac/teamrolebinding_controller.go | Deletes team RBAC metrics when a TeamRoleBinding is fully deleted. |
| internal/controller/teamrbac/metrics.go | Renames the label to organization and adds a helper to delete TeamRoleBinding metrics. |
| internal/controller/team/team_controller.go | Deletes team member count metrics when a Team is deleted. |
| internal/controller/team/metrics.go | Renames the label to organization and adds a helper to delete Team metrics. |
| charts/manager/alerts/team.alerts | Updates rules to the new label and reduces flapping via min_over_time. |
| charts/greenhouse/perses-dashboards/organization.json | Updates label usage in queries/columns/descriptions to organization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cd53d62 to
0470b72
Compare
abhijith-darshan
approved these changes
May 6, 2026
Zaggy21
approved these changes
May 6, 2026
- rename the namespace label to organization to better reflect the semantics - stop exposing time series for deleted objects - update alert to avoid flapping due to gaps in metrics between restarts Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
3a5666b to
4bbfe4f
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Ivo Gosemann ivo.gosemann@sap.com
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Added tests?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Added to documentation?
Checklist