Repository navigation
fix(deploy): kates deploy --with-chaos=false puts the Kates API on the noop chaos provider, through a new chaos.provider chart value - #388
Merged
Conversation
…e noop chaos provider, through a new chaos.provider chart value `kates deploy --with-chaos=false` installed no Litmus but left the Kates API on its litmus-crd default: the kates chart had no chaos value, only extraEnv, and deploy set nothing. The ChaosCoordinator then found Litmus unavailable, logged at ERROR that fault injection is DISABLED, and fell back to noop, so a stack deployed without chaos read as a broken one. The kates chart gets chaos.provider, empty by default. When set, the configmap renders KATES_CHAOS_PROVIDER, and the configmap checksum rolls the pod when the value flips. values.schema.json allows litmus-crd, kubernetes, hybrid, noop or empty. Deploy passes --set chaos.provider=noop when --with-chaos=false and no chaos release is installed; with Litmus there, or --with-chaos, it sets nothing and the chart default applies. The chart moves to 0.11.2, with README.md and the book's version matrix to match. The chart README documents the value and selects the direct backend with it instead of extraEnv. The helm-lint job renders the configmap with the value empty, set and unknown.
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.
Item 1.1 of the CLI performance and stability plan (finding F5, decision D1:
noop). Independent of the other Wave 1 PRs.Why
kates deploy --with-chaos=falseinstalls no Litmus, but it left the Kates API on itslitmus-crddefault. Checked on main (6f4cf61):chaosAlerts.enabledand the Litmus install (cli/cmd/deploy_components.go:383,1110,1838). The Kates helm call never mentions chaos.templates/configmap.yamlsets noKATES_CHAOS_PROVIDER, andextraEnvwas the only knob.kates.chaos.provider=litmus-crd(application.properties:275).ChaosCoordinatorfinds Litmus unavailable, logs at ERROR that fault injection is DISABLED, and falls back to noop. Disruption steps and resilience faults come back skipped, and the log reads like a broken install rather than one deployed without chaos.Changes
charts/katesvalues.yaml: newchaos.provider, empty by default. It sits after thetests:block, so thevalues.yaml:395-405and:605-673caveat refs do not move.templates/configmap.yaml: rendersKATES_CHAOS_PROVIDERonly when the value is set. It sits after the cited:82-178block. The pod'schecksum/configannotation rolls the pod when the value flips.values.schema.json:chaos.provideris one of"",litmus-crd,kubernetes,hybridornoop, the four@Namedproviders.Chart.yaml: 0.11.2, with the patch comment rewritten and akind: addedchanges entry. appVersion stays 1.25.1.README.md: achaos.providerrow in the Core table, and the Chaos permissions example selects the direct backend withchaos.providerinstead ofextraEnv.cli/cmd/deploy_components.go:katesChaosArgsadds--set chaos.provider=noopto the Kates helm call when--with-chaos=falseand nochaosrelease is installed in the chaos namespace. With--with-chaos, or with an earlier Litmus release there, it adds nothing, and the chart default applies. A re-run with--with-chaostherefore puts the API back onlitmus-crd, because helm upgrade resets the value.Version tables:
README.mdchart table anddocs/book/appendix-d-versions.mdat 0.11.2..github/workflows/ci.yml: a helm-lint step renders the configmap with the value empty (noKATES_CHAOS_PROVIDER), set tonoop(rendered), and set tolitmus(refused by the schema).Tests
Added:
TestKatesChaosArgs: with chaos, nothing; without chaos and no release,--set chaos.provider=noop; without chaos and achaosrelease installed, nothing.TestDeployCommand_SingleTopology(chaos off) asserts the Kates helm call carries--set chaos.provider=noop.TestDeployCommand_IsolatedTopology(chaos on) asserts it carries nochaos.provider.Run locally, passing:
cd cli && go test ./...,go test -race ./cmd,go vet ./....TestMCPCaveatRefAnchorspasses, so no cited chart line moved.golangci-lint run --new-from-rev=origin/main ./...: 0 issues.scripts/check-cli-style.shandscripts/check-cli-compat.sh: OK.helm lint charts/kates/: 0 failed.helm templatewith the defaults and with values-dev, -generic, -kind, -local, -native-local, -native and -staging: each renders. values-prod and values-corporate render withexternalDatabase.existingSecretset, as in CI.--set chaos.provider=noopchangeschecksum/config.scripts/check-versions.sh,scripts/check-chart-test-paths.sh,scripts/gen-chart-table.sh --check,scripts/gen-version-matrix.sh --check: OK.actionlint, andyamllint -c .yamllint.yaml .github config charts: clean.scripts/check-book-style.sh,check-book-contrast.py,check-mermaid.sh: OK.cli/**triggers (Build & Test): this PR touches nothing underkates/../mvnw teston main'skates/tree ran 1,254 tests with 0 failures and 0 errors, once for all of Wave 1.Skipped locally: the book's HTML and PDF renders, since the only book change is one version cell;
govulncheck, sincego.modis unchanged.CI only:
./mvnw verifywith the*ITtests, kubeconform, the fetched-dependency chart renders, Kind and Docker jobs, CodeQL and Trivy.Decisions
noop, per D1.kuberneteswithrbac.directChaoswould keep POD_DELETE, rolling restart and scale-down working without Litmus, but it gives the API cluster write rights the user opted out of.litmus-crd. An empty value renders nothing, so every existing release keeps its configmap byte for byte, andextraEnvusers keep control.POST /api/disruptions/compoundpicks each fault's provider by name (defaultkubernetes) and bypasseskates.chaos.provider, so this value does not touch them.Deliberately not done
docs/book/07-chaos-practice.md:117still says to switch providers throughextraEnv. That still works, because a containerenventry overrides the configmap. Moving the book tochaos.provideris left for a docs PR.