feat(observability): add prometheus operator servicemonitor to the helm charts - #258
Merged
Conversation
…lm charts Add an opt-in ServiceMonitor template to the ledger and payments charts so a cluster running the Prometheus Operator scrapes each service's /actuator/prometheus. The template is gated behind serviceMonitor.enabled (default false), so the default render stays CRD-free and the existing kubeconform-strict check is unchanged; a second CI step renders it with the flag on and validates everything but the operator CRD. Closes #249
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.
Adds a Prometheus Operator ServiceMonitor to the ledger and payments Helm charts (E-07, #249).
What
templates/servicemonitor.yamlin both charts, gated behindserviceMonitor.enabled(defaultfalsein values.yaml). When enabled it selects the service viamatchLabels = <chart>.selectorLabelsand scrapes the namedhttpport at/actuator/prometheuson a configurable interval./actuator/prometheuspermit was already added in F-07.6 docker-compose observability profile #250, so this slice is templates only.CI safety
helm templaterender (no flag) emits no ServiceMonitor, so the existingkubeconform -strictstep is unchanged and green (it never needs the operator CRD schema).--set serviceMonitor.enabled=true, assertskind: ServiceMonitoris present (non-vacuous), and runskubeconform -strict -skip ServiceMonitor- catching template errors and validating the rest without a network CRD-schema fetch.Gate chain
matrix.chartinterpolated), off-by-default, §5.3 clean.namespaceSelector) was rejected with evidence - the chart co-locates the ServiceMonitor and the Service in the release namespace, so an omitted selector already discovers it;matchNames: [release-namespace]is functionally identical to the default, and exemplary charts default to empty.Closes #249