-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement events and metrics helpers from runtime
This commit loosely implements the events and metrics helpers that have been newly introduced to `fluxcd/pkg/runtime`, and heavily reduces code duplication. It is in preparation of a much bigger overhaul to implement the work pending in fluxcd/pkg#101. While implementing, I ran into little annoyances that likely should be addressed before the "official" `runtime` MINOR release: - Passing `nil` every time there isn't any metadata for an event quickly becomes cumbersome; we should look into an `EventWithMetadata` and/or `EventfWithMetadata`, or some other way to _optionally_ provide metadata without annoying the consumer. - There is an inconsistency in the method names of the metric helper, i.e. `RecordReadinessMetric` vs `RecordSuspend`. We either need to append or remove the `Metric` suffix on all recording methods. Signed-off-by: Hidde Beydals <[email protected]>
- Loading branch information
Showing
8 changed files
with
124 additions
and
399 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.