fix: bound deploy and topic storage growth

This commit is contained in:
philipp 2026-03-30 17:57:53 +02:00
parent 2b247c8550
commit 086ec01597
2 changed files with 13 additions and 4 deletions

View file

@ -54,6 +54,7 @@ jobs:
env:
REPO_TOKEN: ${{ github.token }}
run: |
kubectl -n "$PROJECT_NAMESPACE" delete job "$BUILD_JOB" --ignore-not-found=true
cat <<EOF | kubectl apply -f -
apiVersion: batch/v1
kind: Job
@ -102,7 +103,7 @@ jobs:
- --context=/workspace
- --dockerfile=/workspace/Dockerfile
- --destination=${IMAGE}
- --cache=true
- --cache=false
volumeMounts:
- name: workspace
mountPath: /workspace

View file

@ -17,6 +17,8 @@ spec:
set -eu
BROKERS="redpanda.unrip.svc.cluster.local:9092"
TOPICS="raw.near_intents.quote norm.swap_demand cmd.execute_trade exec.trade_result"
RETENTION_MS="172800000"
RETENTION_BYTES="268435456"
echo "waiting for Redpanda at ${BROKERS}"
until rpk cluster info --brokers "$BROKERS" >/dev/null 2>&1; do
@ -25,10 +27,16 @@ spec:
for topic in $TOPICS; do
if rpk topic describe "$topic" --brokers "$BROKERS" >/dev/null 2>&1; then
echo "topic already exists: $topic"
echo "ensuring retention config for existing topic: $topic"
rpk topic alter-config "$topic" --brokers "$BROKERS" \
--set retention.ms="$RETENTION_MS" \
--set retention.bytes="$RETENTION_BYTES"
continue
fi
echo "creating topic: $topic"
rpk topic create --brokers "$BROKERS" --partitions 1 --replicas 1 "$topic"
echo "creating topic with bounded retention: $topic"
rpk topic create --brokers "$BROKERS" --partitions 1 --replicas 1 \
-c retention.ms="$RETENTION_MS" \
-c retention.bytes="$RETENTION_BYTES" \
"$topic"
done