- api/v1alpha1/service_types.go: убрать +kubebuilder:default=30
- invoke.go: TimeoutSec=0 → &http.Client{} (без таймаута)
- services.go: валидация timeout_sec < 0 || > 900 → HTTP 400
- service_resource.go: TF schema Optional (без Computed); 0 → Int64Null()
- deployments/k8s/operator.yaml: v0.1.47 → v0.1.48
- doc/: progress.md + api/design.md (модель Service) + decisions/log.md
- examples/POSTGRES/: bug_hunter.sh, chaos_marathon.sh, chaos_marathon.tf
40 lines
1.1 KiB
Bash
40 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# 2026-03-21 — deploy_and_run_chaos.sh
|
|
# ЗАПУСКАТЬ НА VM: ssh naeel@5.172.178.213
|
|
# cd /home/naeel/terra/sless/examples/POSTGRES
|
|
# bash deploy_and_run_chaos.sh
|
|
|
|
set -euo pipefail
|
|
|
|
TF_DIR="/home/naeel/terra/sless/examples/POSTGRES"
|
|
cd "$TF_DIR"
|
|
|
|
echo "=== [1/2] terraform apply chaos_marathon.tf ==="
|
|
|
|
terraform apply \
|
|
-target=sless_service.pg_counter \
|
|
-target=sless_service.pg_dedup \
|
|
-target=sless_service.pg_search \
|
|
-target=sless_service.pg_bulk_insert \
|
|
-target=sless_service.pg_delete_old \
|
|
-target=sless_service.pg_upsert \
|
|
-target=sless_service.chaos_echo \
|
|
-target=sless_service.chaos_badparams \
|
|
-target=sless_service.chaos_slowquery \
|
|
-target=sless_service.chaos_bigpayload \
|
|
-target=sless_service.go_pg_race \
|
|
-target=sless_service.go_counter_atomic \
|
|
-target=sless_service.js_pg_batch \
|
|
-target=sless_service.js_idempotent \
|
|
-target=sless_service.py_retry_writer \
|
|
-auto-approve
|
|
|
|
echo ""
|
|
echo "=== [2/2] Запуск chaos_marathon.sh ==="
|
|
|
|
LOG="/tmp/chaos_marathon_$(date +%Y%m%d_%H%M).log"
|
|
bash chaos_marathon.sh 2>&1 | tee "$LOG"
|
|
|
|
echo ""
|
|
echo "Лог сохранён: $LOG"
|