Fix ServiceMonitor label mismatch so Prometheus can scrape metrics #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone -- discovered during observability gap audit of landscaping-assistant deployment.
Repo
ldraney/pal-e-deploymentsUser Story
As an operator
I want the ServiceMonitor selector to match the landscaping-assistant pod labels
So that Prometheus can discover and scrape the app's metrics endpoint
Context
The base ServiceMonitor at
bases/standard/servicemonitor.yamlusesselector.matchLabels.app: app. The landscaping-assistant prod kustomize overlay renames all Deployment and Service labels fromapptolandscaping-assistant, but has no corresponding patch for the ServiceMonitor. This means the ServiceMonitor selector never matches any pods, and Prometheus cannot scrape the app. The base kustomization also does not include ServiceMonitor in its resources list (it may be commented out or missing).File Targets
Files the agent should modify or create:
overlays/landscaping-assistant/prod/kustomization.yaml-- add ServiceMonitor JSON patch to renamematchLabels.apptolandscaping-assistantand metadata name tolandscaping-assistantbases/standard/kustomization.yaml-- ensureservicemonitor.yamlis listed in resources (currently missing)Files the agent should NOT touch:
bases/standard/servicemonitor.yaml-- base template should stay genericoverlays/landscaping-assistant/dev/-- dev uses its own resource setAcceptance Criteria
matchLabels.app: landscaping-assistantlandscaping-assistantkustomize buildrenders the patched ServiceMonitor with correct selectorsTest Expectations
kustomize build overlays/landscaping-assistant/prod/and verify ServiceMonitor output has correct labelskustomize build overlays/landscaping-assistant/prod/Constraints
http)Checklist
Related
project-landscaping-assistant-- project this affectsldraney referenced this issue2026-05-25 03:09:01 +00:00
ldraney referenced this issue2026-06-02 12:25:25 +00:00