Add base kubernetes support 5

This commit is contained in:
Urtzi Alfaro
2025-09-27 22:55:42 +02:00
parent f246381d34
commit b95ecf1c53
9 changed files with 274 additions and 43 deletions

View File

@@ -19,9 +19,33 @@ spec:
app.kubernetes.io/name: alert-processor-service
app.kubernetes.io/component: worker
spec:
initContainers:
- name: wait-for-rabbitmq
image: busybox:1.36
command:
- sh
- -c
- |
echo "Waiting for RabbitMQ to be ready..."
until nc -z $RABBITMQ_HOST $RABBITMQ_PORT; do
echo "RabbitMQ not ready yet, waiting..."
sleep 2
done
echo "RabbitMQ is ready!"
env:
- name: RABBITMQ_HOST
valueFrom:
configMapKeyRef:
name: bakery-config
key: RABBITMQ_HOST
- name: RABBITMQ_PORT
valueFrom:
configMapKeyRef:
name: bakery-config
key: RABBITMQ_PORT
containers:
- name: alert-processor-service
image: bakery/alert-processor:latest
image: bakery/alert-processor:f246381-dirty
env:
- name: ENVIRONMENT
valueFrom:
@@ -110,8 +134,28 @@ spec:
key: NOTIFICATION_SERVICE_URL
resources:
requests:
memory: "256Mi"
cpu: "100m"
memory: "128Mi"
cpu: "50m"
limits:
memory: "512Mi"
cpu: "500m"
memory: "256Mi"
cpu: "200m"
readinessProbe:
exec:
command:
- python
- -c
- "import sys; sys.exit(0)"
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
livenessProbe:
exec:
command:
- python
- -c
- "import sys; sys.exit(0)"
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3