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