[Phase 4] flux: add Prometheus ServiceMonitor manifests for all three API services
Validate Flux manifests / kustomize-build (pull_request) Failing after 23s
Validate Flux manifests / kustomize-build (pull_request) Failing after 23s
Add flux/{zip-enrichment,holidays,air-quality}/servicemonitor.yaml so
Prometheus (kube-prometheus-stack) can auto-discover and scrape each
API service once deployed.
Each ServiceMonitor:
- Selects pods via app.kubernetes.io/name label
- Scrapes /metrics on the http port every 30s
- Uses release: kube-prometheus-stack label to match Prometheus selector
- Lives in the same namespace as the API service
Add each servicemonitor.yaml to its kustomization.yaml resources list.
kustomize build flux/ passes with no errors.
Closes leeworks-agents/api-company#110
This commit is contained in:
@@ -4,3 +4,4 @@ resources:
|
||||
- namespace.yaml
|
||||
- externalsecret.yaml
|
||||
- helmrelease.yaml
|
||||
- servicemonitor.yaml
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: zip-enrichment
|
||||
namespace: zip-enrichment
|
||||
labels:
|
||||
release: kube-prometheus-stack
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: zip-enrichment
|
||||
endpoints:
|
||||
- port: http
|
||||
path: /metrics
|
||||
interval: 30s
|
||||
Reference in New Issue
Block a user