initial commit, but the application might be already complete ;-)

This commit is contained in:
Jan Novak
2026-01-08 15:31:28 +01:00
commit f068a6b4e8
7 changed files with 307 additions and 0 deletions

68
k8s/deploy.yaml Normal file
View File

@@ -0,0 +1,68 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: memconsumer
labels:
app: memconsumer
spec:
replicas: 1
selector:
matchLabels:
app: memconsumer
template:
metadata:
labels:
app: memconsumer
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
spec:
containers:
- name: memconsumer
image: memconsumer:latest
env:
- name: INITIAL_MB
value: "50"
- name: ALLOC_MB
value: "25"
- name: INTERVAL
value: "10s"
- name: MAX_MB
value: "200"
ports:
- containerPort: 8080
name: metrics
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "256Mi" # OOMKill trigger point
cpu: "100m"
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 3
periodSeconds: 5
readinessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 3
periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: memconsumer
labels:
app: memconsumer
spec:
selector:
app: memconsumer
ports:
- port: 8080
targetPort: 8080
name: metrics