Skip to content

feat(observability): add prometheus operator servicemonitor to the helm charts - #258

Merged
tiana-code merged 1 commit into
mainfrom
feat/E-07-servicemonitor
Jun 19, 2026
Merged

feat(observability): add prometheus operator servicemonitor to the helm charts#258
tiana-code merged 1 commit into
mainfrom
feat/E-07-servicemonitor

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

Adds a Prometheus Operator ServiceMonitor to the ledger and payments Helm charts (E-07, #249).

What

  • New templates/servicemonitor.yaml in both charts, gated behind serviceMonitor.enabled (default false in values.yaml). When enabled it selects the service via matchLabels = <chart>.selectorLabels and scrapes the named http port at /actuator/prometheus on a configurable interval.
  • The payments /actuator/prometheus permit was already added in F-07.6 docker-compose observability profile #250, so this slice is templates only.

CI safety

  • The default helm template render (no flag) emits no ServiceMonitor, so the existing kubeconform -strict step is unchanged and green (it never needs the operator CRD schema).
  • A new step renders with --set serviceMonitor.enabled=true, asserts kind: ServiceMonitor is present (non-vacuous), and runs kubeconform -strict -skip ServiceMonitor - catching template errors and validating the rest without a network CRD-schema fetch.

Gate chain

  • critic: GO-WITH-CHANGES (the flag-on render assertion was added; matchLabels-subset confirmed).
  • security-auditor (opus): PASS - no secrets, no Actions injection (only matrix.chart interpolated), off-by-default, §5.3 clean.
  • code-reviewer: its lone must-fix (add 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.
  • evaluator: PASS (0.89 >= 0.80).
  • helm/kubeconform unavailable locally; the binding check is the CI helm-test job.

Closes #249

…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
@tiana-code tiana-code added this to the v0.2.0 milestone Jun 19, 2026
@tiana-code
tiana-code merged commit ec5ed7c into main Jun 19, 2026
10 checks passed
@tiana-code
tiana-code deleted the feat/E-07-servicemonitor branch June 19, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F-07.5 Helm ServiceMonitor templates

1 participant