Replace prometheus service with a more general policy
What does this MR do?
This MR changes the prometheus service policy by generalizing it. The way policy resolution works is that we try to find a policy for each ancestor of the class of the subject, returning the first policy found.
This means that policy resolution supports inheritance, and we do not need a seperate policy for
every project service. Instead we can have a single policy for Service
and then all subclasses,
such as prometheus services will inherit the same behaviour.
This work was done as part of !40088 (merged) where we needed to add policy support for all services, but it can be cleanly extracted.
As a pure developer-facing refactoring, no changelog is necessary.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Alex Kalderimis