[Phase 4] flux: add Prometheus ServiceMonitor manifests for all three APIs (#110) #114
Reference in New Issue
Block a user
Delete Branch "feature/issue-110-servicemonitors"
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?
Summary
Adds
ServiceMonitorresources so Prometheus (kube-prometheus-stack) auto-discovers and scrapes each API service.Files added
flux/zip-enrichment/servicemonitor.yamlflux/holidays/servicemonitor.yamlflux/air-quality/servicemonitor.yamlEach ServiceMonitor:
namespacematches the API namespaceselector.matchLabels.app.kubernetes.io/nametargets the API pods/metricson thehttpport every 30srelease: kube-prometheus-stacklabel matches Prometheus serviceMonitorSelectorKustomization updates
Each servicemonitor.yaml is added to the respective
kustomization.yamlresources list.Validation
kustomize build flux/exits 0 with no errors.References
Closes leeworks-agents/api-company#110
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