tidb 2.0.0 — remove exposeServer, run db-init as a cron - #516
Merged
Conversation
Two maintainer rulings, in place on the shipped 2.0.0 (nothing is deployed on it). lastModified bumped; version untouched. **exposeServer removed.** It opened public inbound on the server workload but rendered no `loadBalancer.direct`, so TCP 4000 was never published -- the workload's only `http` port is TiDB's UNAUTHENTICATED status/API port 10080, which is what the canonical endpoint would have served. All three archived test rounds recorded it as never tested. Removed under the untested-features rule rather than fixed, since fixing it needs a direct LB on 4000 plus a decision about exposing 10080, which deserves its own version. A values file still setting it now FAILS at render with an explanation, the same treatment devMode got -- silently ignoring a key someone set on purpose is how this defect survived three rounds. **db-init is now a cron.** As a `standard` workload it completed, was restarted by the platform, completed again -- reporting `ready: false` and `Deployment does not have minimum availability` permanently while the cluster was perfectly healthy (measured: 7 restarts, every one exitCode 0, reason Completed). A cron models run-to-completion natively. Safe because the script is ALREADY idempotent: it fast-exits when the database exists, before reaching the non-idempotent CREATE USER. So every run after the first is a no-op of a second or two, and `autoCreateDatabase.schedule` only controls how soon after install the database appears. Four render controls: default renders; db-init is `type: cron` with the job block; the server workload has no public inbound; and `--set exposeServer=true` exits 1 with the named message. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
All four were mine, from the doc edits in the previous commit. 1. Important Notes still asserted the exact behaviour the cron change removes -- "it completes, exits 0 and is then restarted forever, so a healthy install never shows all-green" -- measured false, and contradicting the new bullet twelve lines below it. Rewritten with the measured fast-exit timing. 2. The new db-init bullet had landed BELOW `## Links`, breaking required section order. Moved into Important Notes. 3. values.yaml kept the orphaned `exposeServer` comment, which after the removal sat above `external_access` and mis-described it. 4. The README's `autoCreateDatabase` block omitted the new `schedule` knob -- README check #1, a block that no longer matched values.yaml. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Two maintainer rulings, applied in place on the shipped 2.0.0 (nothing is deployed on it).
lastModifiedbumped;versionuntouched.1.
exposeServerremovedIt opened public inbound on the server workload but rendered no
loadBalancer.direct, so TCP 4000 was never published — the workload's onlyhttpport is TiDB's unauthenticated status/API port 10080, which is what the canonical endpoint would have served. All three archived test rounds recorded it as never tested.Testing proved this closed a live exposure, not an absent listener. The workload still gets a canonical endpoint, and it now returns
403 RBAC: access deniedon/status,/info,/settings,/schemaand/. The positive control is what makes that meaningful: from inside the GVC the same port answers unauthenticated with{"connections":0,"version":"8.0.11-TiDB-v8.5.7",...}.A values file still setting
exposeServernow fails at render with an explanation — verified throughcpln helm install, not justhelm template, and it created nothing. Being silently ignorable is how this defect survived three rounds.Removed rather than fixed: a proper fix needs a direct LB on 4000 plus a decision about exposing 10080, which deserves its own version.
2. db-init is now a
cron, wasstandardAs a standard workload it completed, was restarted by the platform, completed again — reporting
ready: falseandDeployment does not have minimum availabilitypermanently while the cluster was perfectly healthy (measured: 7 restarts, every oneexitCode: 0, reasonCompleted).Safe because the script is already idempotent: it fast-exits when the database exists, before reaching the non-idempotent
CREATE USER.Measured:
*/5tick, not the 5-minute worst case — and confirmed in the database itself (testappdb, usertidbtest), not from job status.Bootstrap completematches exactly one line, on the run-1 replica only — provingCREATE USERwas never re-reached.ready: true,message: '', foursuccessfulexecutions, and zero occurrences ofminimum availability.type: cronwith thejobblock verbatim and no orphanedrolloutOptions.autoCreateDatabase.schedule(default*/5 * * * *) only controls how soon after install the database appears.The honest trade-off: a cron re-runs on its schedule forever, so this is not "runs once and stops". What it fixes is that the standard workload also re-ran forever while reporting permanently unhealthy. Same repetition, native run-to-completion semantics, and controllable.
Testing
9 PASS · 0 FAIL.
render-vs-stored0 unexplained differences; drift gate fullyUnchangedby the second upgrade.The round also caught four documentation defects, all mine from the first commit — including Important Notes still asserting the exact behaviour this change removes, and the new bullet landing below
## Links. All four fixed in the second commit.Two findings that outlive this template
Both make a teardown verification vacuous, which is the worst place for a false success because the cost is billing resources nobody knows are running. Both now in CLAUDE.md.
cpln helm uninstallexited 0 having deleted nothing, printingECONNABORTED— the release still readdeployedwith four workloads and two volumesets live. A retry worked. Trusting the exit code would have left a running TiDB cluster behind.cpln policy getsilently truncates at 50 records, so an org-wide sweep for leftovers can come back clean while missing everything past the cap.--max 0returns the full set.Briefing updated.
🤖 Generated with Claude Code