first claude draft
This commit is contained in:
15
k8s/base/aggregator/configmap.yaml
Normal file
15
k8s/base/aggregator/configmap.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: aggregator-config
|
||||
data:
|
||||
REDIS_URL: "redis://redis:6379"
|
||||
TIMESCALE_HOST: "timescaledb"
|
||||
TIMESCALE_PORT: "5432"
|
||||
TIMESCALE_USER: "monitor"
|
||||
TIMESCALE_DB: "monitor"
|
||||
GRPC_PORT: "50051"
|
||||
SERVICE_NAME: "aggregator"
|
||||
EVENTS_BACKEND: "redis_pubsub"
|
||||
LOG_LEVEL: "INFO"
|
||||
LOG_FORMAT: "json"
|
||||
46
k8s/base/aggregator/deployment.yaml
Normal file
46
k8s/base/aggregator/deployment.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: aggregator
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: aggregator
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: aggregator
|
||||
spec:
|
||||
containers:
|
||||
- name: aggregator
|
||||
image: sysmonstm/aggregator:latest
|
||||
ports:
|
||||
- containerPort: 50051
|
||||
name: grpc
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: aggregator-config
|
||||
env:
|
||||
- name: TIMESCALE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: timescaledb-secret
|
||||
key: password
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "256Mi"
|
||||
cpu: "500m"
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
11
k8s/base/aggregator/kustomization.yaml
Normal file
11
k8s/base/aggregator/kustomization.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
commonLabels:
|
||||
app.kubernetes.io/name: aggregator
|
||||
app.kubernetes.io/component: backend
|
||||
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- configmap.yaml
|
||||
11
k8s/base/aggregator/service.yaml
Normal file
11
k8s/base/aggregator/service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: aggregator
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: aggregator
|
||||
ports:
|
||||
- port: 50051
|
||||
targetPort: grpc
|
||||
name: grpc
|
||||
Reference in New Issue
Block a user