v2 rework - #46
Open
Diaphteiros wants to merge 30 commits into
Open
Conversation
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
Diaphteiros
marked this pull request as ready for review
August 3, 2026 15:05
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.
What this PR does / why we need it:
So far, the usage-operator was hardcoded to watch only our v1 MCP resource. In order to make it compatible with v2, it needed to be extended so it can also watch
ControlPlaneresources.Instead of just adding watches for the v2 resources, the usage-operator is now generic and can watch arbitrary resources on the onboarding cluster. This is configured in a configuration CR, which is now required. In addition to tracking a resource's existence, the controller can also watch arbitrary fields within either the resource's or its namespace's manifest.
The old
MCPUsageresource has been replaced by a newResourceUsageresource, which stores timestamps of modification instead of durations directly. New helper methods in the api package can be used to convert them into durations.Which issue(s) this PR fixes:
This is a relevant part of https://github.tools.sap/openmcp/internal-backlog/issues/516
Special notes for your reviewer:
Since this turned out to be more of a re-implementation instead of a refactoring, and a quite complex one due to the dynamic watches on top of that, I strongly suggest to read through the updated documentation first, before attempting to review this PR.
Release note: