Some checks failed
deploy / deploy (push) Failing after 29s
Proof: npm test; npm run operator-dashboard:build; node --test test/near-intents-status.test.mjs test/environment-status-history.test.mjs test/operator-dashboard.test.mjs test/operator-dashboard-ui-static.test.mjs test/ops-sentinel-static.test.mjs; PYTHONPATH=. python3 test/repo_deployments_test.py; kubectl kustomize deploy/k8s/base. Assumptions: NEAR Intents public status page API remains the official upstream environmental-status source; status fingerprint changes are the durable boundary for saving environmental history. Still fake: This stores and displays official upstream status changes, but it does not create an alternate quote source or make NEAR quoting operational during an upstream pause.
42 lines
1.7 KiB
YAML
42 lines
1.7 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: redpanda-topic-bootstrap
|
|
namespace: unrip
|
|
spec:
|
|
backoffLimit: 6
|
|
template:
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: bootstrap-topics
|
|
image: docker.redpanda.com/redpandadata/redpanda:v24.3.9
|
|
command: ["/bin/sh", "-lc"]
|
|
args:
|
|
- |
|
|
set -eu
|
|
BROKERS="redpanda.unrip.svc.cluster.local:9092"
|
|
TOPICS="raw.near_intents.quote norm.swap_demand ref.market_price state.intent_inventory ops.liquidity_action ops.funding_observation ops.alert ops.environment_status decision.trade_decision 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
|
|
sleep 2
|
|
done
|
|
|
|
for topic in $TOPICS; do
|
|
if rpk topic describe "$topic" --brokers "$BROKERS" >/dev/null 2>&1; then
|
|
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 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
|