Skip to content

chore(scripts): remove the scripts the kates CLI already does - #506

Merged
bmscomp merged 1 commit into
mainfrom
chore/remove-cli-duplicate-scripts
Oct 26, 2026
Merged

bmscomp merged 1 commit into
mainfrom
chore/remove-cli-duplicate-scripts

Conversation

@bmscomp

@bmscomp bmscomp commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Why

scripts/ still holds shell versions of jobs the kates CLI now does. Two copies drift apart. The perf scripts start raw kafka-*-perf-test Jobs that Kates never records. The chaos scripts write their own ChaosEngines instead of going through the resilience API.

What changes

  • Removed: 12 scripts. Each one maps to a single kates command (table below).
  • Makefile:
    • make test now runs kates test create --type LOAD --records 1000000 --wait.
    • make test-load|stress|spike|endurance|volume|capacity run kates test create --type <TYPE> --wait.
    • make kafka-detect runs kates detect.
    • The target names and help text stay the same, so the book's Makefile tables still hold.
  • Docs:
    • scripts/CHAOS_TESTS.md: the single-fault runs now point at kates resilience run -f with examples 02, 03, 05 and 07 of kates/docs/tutorials/resilience.json. The Game Day section and the observability notes stay.
    • resilience.json _usage.script_alternatives: only full_gameday is left.
    • setup-kafka-chaos.sh's closing hint and dashboards/kafka-performance/README.md name the CLI.
  • Not edited: docs/kafka-multi-version-deploy-plan.md and docs/mirror-maker2-cli-migration-plan.md still name test-perf-*.sh. They are records of past plans, so I left them as written.

One behaviour change: the make test* targets now need the Kates API deployed and reachable (kates ports). The scripts only needed the Kafka cluster.

Every script in scripts/

Script Verdict Reason
test-kafka-performance.sh removed kates test create --type LOAD --records 1000000 --wait
test-perf-load.sh removed kates test create --type LOAD --wait (--producers, --consumers, --throughput, --record-size cover its env vars)
test-perf-stress.sh removed kates test create --type STRESS --wait
test-perf-spike.sh removed kates test create --type SPIKE --wait
test-perf-endurance.sh removed kates test create --type ENDURANCE --wait
test-perf-volume.sh removed kates test create --type VOLUME --wait
test-perf-capacity.sh removed kates test create --type CAPACITY --wait
test-chaos-broker-delete.sh removed kates resilience run -f, resilience example 02 (POD_DELETE)
test-chaos-broker-cpu-hog.sh removed kates resilience run -f, example 03 (CPU_STRESS)
test-chaos-disk-io-stress.sh removed kates resilience run -f, example 05 (IO_STRESS)
test-chaos-network-partition.sh removed kates resilience run -f, example 07 (NETWORK_PARTITION)
kafka-cluster-report.sh removed kates detect: same 3-AZ compatibility report, plus JSON/PDF output and generated values. Exit codes differ: the script exits 1 on incompatible, kates detect --fail-on-error exits 2
start-cluster.sh kept, partial kates deploy creates a kind cluster only during a deploy and only when no cluster is reachable. The CLI has no standalone create, no --clear-proxy / --clear-proxy-ca, no proxy reconcile on an existing cluster, and does not read proxy/proxy.conf
destroy.sh kept, partial kates clean uninstalls releases and namespaces. It does not delete the kind cluster, the kind-registry container and volume, or the kind network
port-forward.sh kept, partial kates ports does the same job on other local ports (API 8080, Grafana 3000, Kafka UI 8085, Apicurio 8081). The script uses 30083/30080/30081/30082, which the book and tutorial 13 document. kates ports has no Litmus UI or Headlamp forward
deploy-kates.sh kept, partial kates deploy installs Kates only with the whole stack, in its own namespaces. It has no single-component install, which make kates-deploy needs
deploy-kafka.sh kept, partial same: no Kafka-only install in the CLI (the book and charts/kafka-cluster/INSTALL.md use it)
deploy-cert-manager.sh kept, partial kates deploy installs cert-manager only with the stack, into cert-manager (the script uses kafka). Needed by make cert-manager
deploy-kafka-ui.sh kept, partial stack-only in the CLI. Needed by make ui and make deploy-all
deploy-monitoring.sh kept, partial stack-only in the CLI, which installs into monitoring (the script uses kafka)
deploy-jaeger.sh kept, partial stack-only in the CLI (inside --with-monitoring). Needed by make jaeger and make deploy-all
ensure-kafka-user.sh kept, partial kates deploy creates the kates-backend KafkaUser only during a full deploy. make calls the script alone
gameday.sh kept, partial kates resilience run covers baseline + one fault + recovery. It does not do the pre-flight and post-flight checks, the Prometheus firing-alert check, or apply a ChaosEngine file
test-chaos-gameday.sh kept, partial load across a 3-fault sequence. The CLI runs load + one fault (resilience run) or several faults without load (disruption run), not both together
verify-kafka-policies.sh kept, partial kates security netpol audits NetworkPolicies without touching the cluster, and kates kyverno violations lists violations. Neither runs the live probe pod that tries to open a socket to the brokers
setup-kafka-chaos.sh kept registers chaos infrastructure with a Litmus portal and installs the experiments and RBAC. No CLI equivalent; test-chaos-gameday.sh needs it
test-common.sh kept sourced by test-chaos-gameday.sh
download-charts.sh kept fetches litmus-core into the checkout and builds kafka-cluster deps. kates charts pull bundles published charts, which is a different job
deploy-velero.sh kept the CLI does not install Velero
load-images-to-kind.sh, pull-images.sh, setup-registry.sh, registry-status.sh, cleanup-registry.sh kept local registry and kind image preloading: no CLI equivalent
deploy-kafka-generic.sh, deploy-apicurio.sh kept CI calls them (ci-*.yml, integration.yml)
build-legacy-kafka-image.sh, test-mm2-migration.sh, mm2-kafka-cli.sh kept ci-mirror-maker2.yml calls the first two, and the migrate code refers to all three. kates migrate image build / migrate lab are the CLI counterparts, but CI still runs the scripts
connect-smoke-test.sh, native-smoke-test.sh, native-e2e.sh, full-local-test.sh kept CI or make test harnesses
install-kates.sh kept the installer for the CLI itself (release + lint jobs)
connect-plugin-loader.sh kept init-container plugin downloader; not a CLI job
common.sh, retry.sh kept shared helpers; retry.sh is used by CI
check-*.sh, check-*.py, gen-chart-table.sh, gen-version-matrix.sh, gen-dashboards.py, book_metrics.py, chart_bumps.py, prepare-book-render.sh, test_*.py, book-metrics-baseline.json kept CI gates and generators
convert-callouts.sh, debug-kafka-connection.sh, debug-resilience.sh, deploy-headlamp.sh, deploy-kafka-kates.sh, download-apicurio-chart.sh, restart-docker.sh, run-it-tests.sh, debug-connect-values.yaml, patch.yaml, patch-mongo.yaml, krafter-values.yaml.bak kept, out of scope nothing in the repo references them, but none duplicates a CLI command (deploy-kafka-kates.sh is a Kafka-only install, same gap as deploy-kafka.sh). Candidates for a separate dead-file cleanup

Checks

  • shellcheck -x -S warning -e SC2317,SC2034,SC2155 scripts/*.sh kates-ci.sh passes (Lint · shellcheck).
  • make check-help: all 156 targets are documented.
  • make -n test test-load test-capacity kafka-detect expands to the kates commands above.
  • ResilienceTutorialTest: 30/30 pass against the edited resilience.json.
  • git grep finds no reference to a removed script outside the two plan docs above.
  • Not run: the make test* targets against a live cluster.

The perf scripts, the four single-fault chaos scripts and the cluster report
duplicate kates test create, kates resilience run and kates detect. The make
targets now call the CLI, and the docs that named the scripts point at it.
@bmscomp
bmscomp merged commit f4584d9 into main Oct 26, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant