k8s deployment: split into multiple files

This commit is contained in:
Jan Novak
2026-01-08 19:50:32 +01:00
parent 04f04f7536
commit 7497a6c93d
3 changed files with 26 additions and 21 deletions

55
k8s/deployment.yaml Normal file
View File

@@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: memory-stress-test
namespace: memory-stress-test
labels:
app: memory-stress-test
spec:
replicas: 1
selector:
matchLabels:
app: memory-stress-test
template:
metadata:
labels:
app: memory-stress-test
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
spec:
containers:
- name: memory-stress-test
image: gitea.home.hrajfrisbee.cz/kacerr/memory-stress-test:latest
env:
- name: INITIAL_MB
value: "50"
- name: ALLOC_MB
value: "25"
- name: INTERVAL
value: "10s"
- name: MAX_MB
value: "500"
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