Repository navigation
feat(k8s): devops k8s doctor checks the gitea stack: tunnel host, anonymous refusal, clone url, registry token and no egress - #2200
Merged
Conversation
dan-petty
marked this pull request as ready for review
October 24, 2026 23:24
…nymous refusal, clone url, registry token and no egress `devops k8s doctor --stack gitea` runs the checks of the live Gitea stack in place of the cluster rules, and shows the result and the reason of each check. kubectl reads Applications gitea and gitea-manifests, the volume of claim gitea-shared-storage, the Pod Security of namespace gitea and the host of Ingress gitea/gitea-ingress. Through that host and the egress-checked HTTP client, the checks read the sign-in page, the refusal of an anonymous API read and the token challenge of the registry. The clone-URL check makes a temporary private repository as gitea_admin with the password from the keyring, reads clone_url and ssh_url, and deletes the repository whenever Gitea can hold it. A curl in the Gitea container shows that the pod reaches no address outside the cluster. A failed check does not stop the next one. The command exits 2 when a check fails, and --dry-run lists the kubectl commands and the requests and makes none. Gitea 1.27.3 fills ssh_url also when SSH is off, so the check passes when ssh_url does not name the tunnel host. The MCP tool k8s_doctor gets readOnlyHint false, because --stack makes a repository.
dan-petty
force-pushed
the
feat/2187-gitea-doctor
branch
from
October 25, 2026 14:58
9035029 to
fed328b
Compare
dan-petty
pushed a commit
that referenced
this pull request
Oct 26, 2026
🤖 I have created a release *beep* *boop* --- ## [0.6.0](v0.5.0...v0.6.0) (2026-10-26) ### Features * **k8s:** devops k8s doctor checks the gitea stack: tunnel host, anonymous refusal, clone url, registry token and no egress ([#2200](#2200)) ([4af6ea6](4af6ea6)), closes [#2187](#2187) * **telemetry:** centralized loki logql streamer, prometheus sparklines & trace waterfalls (tab-telemetry) ([#2213](#2213)) ([5d368c8](5d368c8)), closes [#691](#691) * **telemetry:** send devops-cli logs with trace ids to Loki ([#2224](#2224)) ([28c1607](28c1607)), closes [#813](#813) ### Bug Fixes * **ai:** a transient rag lookup failure is not cached, so the same query recovers as soon as the backend answers ([#2222](#2222)) ([6f49beb](6f49beb)) * **ai:** rag chunks stay under the embedder's real token limit, not a four-characters-per-token estimate ([#2221](#2221)) ([a21ad61](a21ad61)) * **cli:** devops --dry-run on a command group given only its own options ([de49122](de49122)) * **cli:** devops --dry-run on a command group given only its own options previews it instead of crashing with IndexError ([#2259](#2259)) ([de49122](de49122)) * **cli:** drop devcontainer k8s auto-deploy for printed deploy-stack command ([#2227](#2227)) ([9278d3e](9278d3e)) * **config:** service clients use only configured urls and never fall back to an unconfigured localhost default ([#2219](#2219)) ([5b3817d](5b3817d)) * **git:** git output the code parses is read NUL-separated, and git outcomes come from exit codes ([#2257](#2257)) ([db1d234](db1d234)) * **github:** devops pr check-readiness on a branch with no open pull request exits with a clean error ([#2270](#2270)) ([0a1b312](0a1b312)) * **github:** project sync's board lookup and field provisioning fail closed on a failed read ([#2272](#2272)) ([40138f4](40138f4)) * **k8s:** argo cd sync honours --prune and --force, rollout promote and abort reach the status subresource, and teardown's argo check fails closed ([#2246](#2246)) ([7f3743b](7f3743b)) * **k8s:** authenticate service proxy with client auth settings and stream typed pod watch ([#2242](#2242)) ([1be8a79](1be8a79)) * **k8s:** dcgm-exporter's memory request and limit fit its measured footprint ([#2264](#2264)) ([4776f63](4776f63)) * **k8s:** deploy-stack decides helm recovery from helm's json status and adopts existing resources with --take-ownership ([#2243](#2243)) ([c5dbafc](c5dbafc)) * **k8s:** send LogQL to Loki unchanged and restrict kubectl fallback ([#2228](#2228)) ([29743af](29743af)), closes [#1431](#1431) * **k8s:** the argo cd and grafana credential sync revokes and mints a token only when the service refused the old one, and reports every other failure ([#2210](#2210)) ([1bb164b](1bb164b)) * **mcp:** an mcp tool stops at its timeout, also when its command runs in-process ([#2269](#2269)) ([6cf8ff0](6cf8ff0)) * **review:** a dependency advisory that admission rejects is not reported ([#2217](#2217)) ([4326906](4326906)) * **review:** a dependency advisory the base revision's pins already have is listed as pre-existing ([#2268](#2268)) ([00b3572](00b3572)) * **review:** a scanner finding that names a kubernetes object the reviewed commit lacks is rejected as object-not-in-commit ([#2225](#2225)) ([e69a4ff](e69a4ff)), closes [#1352](#1352) * **roadmap:** delete intake's refine hook; the cross-job rule is the one same-round refine trigger ([#2262](#2262)) ([90fc109](90fc109)) * **roadmap:** intake files and places a candidate that the model judges a duplicate, and names the possible original, instead of dropping or closing it ([#2223](#2223)) ([050620d](050620d)) * **roadmap:** the roadmap service logs each failed job's own error with its repository, and a configuration error without a traceback ([#2229](#2229)) ([96238be](96238be)) * **security:** the pluto, popeye and gitleaks adapters read what those tools actually write ([#2220](#2220)) ([6789a80](6789a80)) * **security:** vault leases requires --revoke and lease registry rebuilds on credential changes ([#2271](#2271)) ([efab944](efab944)) * **telemetry:** grafana aggregate lines sum and average the lines shown, read as dashed reference lines, and reach calls in flight ([#2215](#2215)) ([2084172](2084172)) * **telemetry:** wait for background exporter threads on client shutdown ([#2274](#2274)) ([e6b86b2](e6b86b2)), closes [#2273](#2273) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.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.
Summary
After the Gitea stack (#1081) was deployed, a person ran its checks by hand, as curl and kubectl lines from the pull request body. One paste failed on a placeholder. Now
devops k8s doctor --stack gitearuns the checks of the live stack in place of the cluster rules, and shows the result and the reason of each check. A failed check does not stop the next one. The command exits 2 when a check fails, and 0 when every check passes.application-gitea,application-gitea-manifestsSyncedandHealthyvolume-retainedgitea-shared-storagehas the reclaim policyRetainpod-security-restrictedgiteahas the Pod Security enforce levelrestrictedingress-hostgitea/gitea-ingresshas a host that is notgit.example.com, the placeholder in gittunnel-hostGET /user/loginon that host answers 200anonymous-read-refusedGET /api/v1/repos/searchwith no sign-in answers 401 or 403registry-tokenGET /v2/answers 401 with a Bearer challenge whose realm is an HTTPS URL on the hostclone-urldevops-doctor-<random>, made asgitea_adminwith the password from the keyring, has itsclone_urlunderhttps://git.<domain>/, and anssh_urlthat does not name that hosttemporary-repository-deletedno-egresscurl https://github.comin the Gitea container cannot connect (exit 7 or 28)run_subprocess. The HTTP requests go throughnew_http_clientat egress levelpublic, to the host of the live Ingress only. Without a host, the checks through the tunnel fail withnot runand send nothing.gitea.admin_password, keyringgitea_admin_password). It goes only into the Authorization header of the create and the delete. A test holds it out of the output, the log records, the kubectl argument lists and the printed requests.clone-urlfails with the reason and sends no create, and the other checks still report. For an unknown key, the reason is the error of the settings (feat(config): devops config unset removes a key, and an unknown key's error names the line and that command #2207): the file, the line anddevops config unset <key>. For another refused value, the reason is the key and the message, with no value.--dry-runlists the twelve kubectl commands and HTTP requests, with placeholders, and starts no program, sends no request and reads no keyring entry.DoctorReportgetschecks, a list ofDoctorCheck. The MCP toolk8s_doctorgets the parameterstackandreadOnlyHint: false, becausestackmakes a repository (feat(mcp): mcp tools declare ToolAnnotations, and mutating tools require approval in devops-cli's own agent loop #857).StubWebgetsserve, a server that answers by method and body, because the delete goes to a name that only the run knows.k8s/README.md, Gitea: rollout step 5 and the new sectionStack checksname the command in place of the hand-run lines.A change from the issue body: the issue asks for "no SSH URL". Gitea 1.27.3 always fills
ssh_url(services/convert/repository.go,ComposeSSHCloneURLinmodels/repo/repo.godoes not readDISABLE_SSH). The live configuration hasSSH_DOMAIN = gitea-http.gitea.svc.cluster.local, sossh_urlnames the in-cluster address, where nothing answers. The check passes whenssh_urldoes not name the tunnel host, which carries no SSH.Evidence (2026-10-24): the Gitea v1.27.3 source and swagger (
POST /user/reposanswers 201, 400, 409 or 422;DELETE /repos/{owner}/{repo}answers 204, 403 or 404;ENABLE_BASIC_AUTHENTICATIONdefaults to true), and read-only kubectl and anonymous curl on the homelab cluster. One live run of the command on the homelab cluster after the change: all 11 checks passed, the temporary repository was deleted, and a listing of the repository store in the pod shows nodevops-doctor-repository.Tests:
tests/test_gitea_doctor.py(40 tests) onProcessFake,StubWebandFakeKeyring: the pass and the fail of each check, the delete of the temporary repository in each case, the password, a configuration that does not load (an unknown key and a refused value), the dry run and the command. They fail onorigin/main(no moduledevops_cli.k8s.gitea_doctor). No test starts a program or reaches a network.Pending a person: the workspace
config.yamlstill holdsai.vllm_url, which v0.2.34 removed. Since #2168, the settings refuse it, soclone-urlfails with that reason, which namesdevops config unset ai.vllm_url, until a person runs that command.Item
Closes #2187
Change:
openspec/changes/archive/2026-10-24-2187-gitea-stack-doctor/