-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspend-guardian.yaml
More file actions
59 lines (58 loc) · 1.68 KB
/
spend-guardian.yaml
File metadata and controls
59 lines (58 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apiVersion: apps/v1
kind: Deployment
metadata:
name: spend-guardian
labels: { app: spend-guardian }
spec:
replicas: 1
selector:
matchLabels: { app: spend-guardian }
template:
metadata:
labels: { app: spend-guardian }
spec:
containers:
- name: spend-guardian
image: us-central1-docker.pkg.dev/gke10lbghack/boa/spend-guardian:latest
imagePullPolicy: IfNotPresent
env:
# Postgres
- { name: PGHOST, value: "ledger-db" }
- { name: PGPORT, value: "5432" }
- { name: PGDATABASE, value: "postgresdb" }
- { name: PGUSER, value: "admin" }
- { name: PGPASSWORD, value: "password" }
# Alert tuning
- { name: ALERT_THRESHOLD_MULT, value: "1.3" }
- { name: WINDOW_DAYS, value: "30" }
- { name: MIN_ABS_SPEND, value: "200" }
- { name: LOOKBACK_DAYS, value: "180" }
- { name: ANOMALY_FACTOR, value: "1.5" }
# Point Spend Guardian at the MCP server
- { name: MCP_DB_URL, value: "http://mcp-db:8081" }
- name: CONTACTS_API_ADDR
value: "contacts:8080"
ports:
- containerPort: 8080
name: http
readinessProbe:
httpGet: { path: /health, port: http }
initialDelaySeconds: 3
periodSeconds: 5
livenessProbe:
httpGet: { path: /health, port: http }
initialDelaySeconds: 10
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: spend-guardian
labels: { app: spend-guardian }
spec:
selector: { app: spend-guardian }
ports:
- name: http
port: 8080
targetPort: http
type: ClusterIP