Repository navigation
chore(scripts): remove the scripts the kates CLI already does - #506
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
scripts/still holds shell versions of jobs thekatesCLI now does. Two copies drift apart. The perf scripts start rawkafka-*-perf-testJobs that Kates never records. The chaos scripts write their own ChaosEngines instead of going through the resilience API.What changes
katescommand (table below).make testnow runskates test create --type LOAD --records 1000000 --wait.make test-load|stress|spike|endurance|volume|capacityrunkates test create --type <TYPE> --wait.make kafka-detectrunskates detect.scripts/CHAOS_TESTS.md: the single-fault runs now point atkates resilience run -fwith examples 02, 03, 05 and 07 ofkates/docs/tutorials/resilience.json. The Game Day section and the observability notes stay.resilience.json_usage.script_alternatives: onlyfull_gamedayis left.setup-kafka-chaos.sh's closing hint anddashboards/kafka-performance/README.mdname the CLI.docs/kafka-multi-version-deploy-plan.mdanddocs/mirror-maker2-cli-migration-plan.mdstill nametest-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/test-kafka-performance.shkates test create --type LOAD --records 1000000 --waittest-perf-load.shkates test create --type LOAD --wait(--producers,--consumers,--throughput,--record-sizecover its env vars)test-perf-stress.shkates test create --type STRESS --waittest-perf-spike.shkates test create --type SPIKE --waittest-perf-endurance.shkates test create --type ENDURANCE --waittest-perf-volume.shkates test create --type VOLUME --waittest-perf-capacity.shkates test create --type CAPACITY --waittest-chaos-broker-delete.shkates resilience run -f, resilience example 02 (POD_DELETE)test-chaos-broker-cpu-hog.shkates resilience run -f, example 03 (CPU_STRESS)test-chaos-disk-io-stress.shkates resilience run -f, example 05 (IO_STRESS)test-chaos-network-partition.shkates resilience run -f, example 07 (NETWORK_PARTITION)kafka-cluster-report.shkates 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-errorexits 2start-cluster.shkates deploycreates 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 readproxy/proxy.confdestroy.shkates cleanuninstalls releases and namespaces. It does not delete the kind cluster, thekind-registrycontainer and volume, or thekindnetworkport-forward.shkates portsdoes 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 portshas no Litmus UI or Headlamp forwarddeploy-kates.shkates deployinstalls Kates only with the whole stack, in its own namespaces. It has no single-component install, whichmake kates-deployneedsdeploy-kafka.shcharts/kafka-cluster/INSTALL.mduse it)deploy-cert-manager.shkates deployinstalls cert-manager only with the stack, intocert-manager(the script useskafka). Needed bymake cert-managerdeploy-kafka-ui.shmake uiandmake deploy-alldeploy-monitoring.shmonitoring(the script useskafka)deploy-jaeger.sh--with-monitoring). Needed bymake jaegerandmake deploy-allensure-kafka-user.shkates deploycreates thekates-backendKafkaUser only during a full deploy.makecalls the script alonegameday.shkates resilience runcovers baseline + one fault + recovery. It does not do the pre-flight and post-flight checks, the Prometheus firing-alert check, or apply a ChaosEngine filetest-chaos-gameday.shresilience run) or several faults without load (disruption run), not both togetherverify-kafka-policies.shkates security netpolaudits NetworkPolicies without touching the cluster, andkates kyverno violationslists violations. Neither runs the live probe pod that tries to open a socket to the brokerssetup-kafka-chaos.shtest-chaos-gameday.shneeds ittest-common.shtest-chaos-gameday.shdownload-charts.shkafka-clusterdeps.kates charts pullbundles published charts, which is a different jobdeploy-velero.shload-images-to-kind.sh,pull-images.sh,setup-registry.sh,registry-status.sh,cleanup-registry.shdeploy-kafka-generic.sh,deploy-apicurio.shci-*.yml,integration.yml)build-legacy-kafka-image.sh,test-mm2-migration.sh,mm2-kafka-cli.shci-mirror-maker2.ymlcalls the first two, and themigratecode refers to all three.kates migrate image build/migrate labare the CLI counterparts, but CI still runs the scriptsconnect-smoke-test.sh,native-smoke-test.sh,native-e2e.sh,full-local-test.shmaketest harnessesinstall-kates.shconnect-plugin-loader.shcommon.sh,retry.shretry.shis used by CIcheck-*.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.jsonconvert-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.bakdeploy-kafka-kates.shis a Kafka-only install, same gap asdeploy-kafka.sh). Candidates for a separate dead-file cleanupChecks
shellcheck -x -S warning -e SC2317,SC2034,SC2155 scripts/*.sh kates-ci.shpasses (Lint · shellcheck).make check-help: all 156 targets are documented.make -n test test-load test-capacity kafka-detectexpands to thekatescommands above.ResilienceTutorialTest: 30/30 pass against the editedresilience.json.git grepfinds no reference to a removed script outside the two plan docs above.make test*targets against a live cluster.