Subsections of Proxy
Open WebUI
Archived
The 72602 OpenWebUI deployment is retired and has no current installation
route. argocd/open-webui does not exist, and the ai namespace has no
OpenWebUI resources. txt2img.agent.72602.online is retired and has no
working endpoint; its DNS record, certificate, TLS Secret, and unreferenced
data claims were removed.
The repository file
manifests/application/open-webui.yaml is a historical, non-deployed
manifest. It is not consumed by the current GitOps setup and still points to
the retired route. Do not use it as an installation source.
Historical Record (2026-05)
The service was previously deployed in the 72602 cluster through an ArgoCD
Helm Application in namespace ai:
- Route:
txt2img.agent.72602.online(now retired) - Helm chart:
open-webui, version14.5.0 - Image:
m.daocloud.io/ghcr.io/open-webui/open-webui:0.9.5 - AI backend:
sub2api.application.svc:8080/v1(OpenAI-compatible) - WebSocket manager: shared Redis in namespace
storage - Persistence: SQLite on a 2Gi
local-pathPVC
Any commands or verification steps from the former deployment procedure are historical and non-runnable. They are intentionally not reproduced here.
ECS Mihomo (Clash)
🚀Installation
- Active unit:
mihomo.service - Authenticated HTTP proxy: TCP
7890 - Authenticated SOCKS listener: TCP
7891 - Authenticated external controller: TCP
56396
Authentication is required. Configure it through the consuming application’s
secret store; do not place credentials in this page, source control, or
command history. The persistent rule routes api64.ipify.org through
🔰 节点选择. Its current selection is the live US San Jose candidate.
Authenticated probes to example.com, ip-api.com, and api64.ipify.org
returned HTTP 403; probes to api.country.is, Cloudflare trace, and Google
generate_204 returned HTTP 000. These responses did not establish the
actual egress country; US egress remains unverified.
External Controller Access
The external controller on TCP 56396 requires its own credential, separate
from HTTP proxy authentication.
Network Access
TCP/7890 ingress is source-restricted. TCP/7891 is not publicly exposed.
Ollama Moderation Gateway
Overview
The Ollama Moderation Gateway was retired from the 72602 cluster on 2026-11-08. It is no longer deployed or available at https://moderation.llm.72602.space.
- Git owner:
argocd/ops-docs, source pathmanifests - Final parent revision:
a89ef003808032b0438df9b7c50424d1159b84b2 - Retired child Application:
argocd/ollama-moderation-gateway - Namespace:
moderationremainsActive; shared namespace resources were not removed.
The child Application manifest was removed from Git and its finalizer cascaded the tracked workload resources. The former installation page is retained as a retirement record, not as an installation procedure.
- Retirement Record
Retirement record for the 72602 Ollama Moderation Gateway
Subsections of Ollama Moderation Gateway
Retirement Record
Retirement
The Ollama Moderation Gateway was retired on 2026-11-08. Do not run the former installation or Secret-creation commands from repository history.
GitOps changes
250ef03fd8f07f28df99adf42715b395c891aa5b: added cascade finalizers to both child Applications.6e8e61a01e7822e4d45fcd3bc13bc1e0f3a3fe17: removed the Roaminal bootstrap Job before service retirement.4f08ce5b6b485456194ed9a879350ee1451da912: restored the chart-required single-replica value after the pinned chart rejected zero replicas.707953229eff9ed25b6b20fe94e26882f5ec96b2: disabled Roaminal persistence.b51c24709b7d8800d7d565f610a86a75343e5f15: made Roaminal pruning occur after workload replacement.a89ef003808032b0438df9b7c50424d1159b84b2: removed both child Application manifests from the parent source.
The pinned Roaminal chart revision requires exactly one replica and rejects a
zero-replica render. With persistence disabled, the Deployment was reconciled
to an emptyDir data volume; a temporary scale to zero released Kubernetes PVC
protection so Argo CD could prune the PVC and local-path PV. No PVC was deleted
directly.
Verification
argocd/ops-docsisSynced/Healthyat revisiona89ef003808032b0438df9b7c50424d1159b84b2.- Both child Applications, their Deployments, Services, Ingresses, Certificates, PVC, and PV are absent.
- The
moderationandroaminalnamespaces remainActive, including their default ServiceAccounts andkube-root-ca.crtConfigMaps. - The former moderation public route returns HTTP
404; the former Roaminal host has no cluster Ingress and the public edge returns an empty-body default response. - Service-owned runtime and TLS Secrets were deleted only after the resource absence checks. Secret data was never read, and no backup was created.
Rollback guidance
There is no rollback for the deleted PVC/PV data or Secrets. Recreating the service would require a new reviewed Git source commit and externally supplied runtime credentials; do not restore the retired child manifests by direct cluster apply.
Sub2API
Web Page
sub2api web page (https://token.72602.space)
Current State
- Git owner:
argocd/ops-docs, sourcehttps://github.com/AaronYang0628/docs.git, pathmanifests - ArgoCD Application:
argocd/sub2api - Namespace:
application - OCI chart:
ghcr.io/aaronyang0628/helm-chart-mirror/sub2api(0.1.31, upstream app0.2.26) - Application image:
ghcr.io/wei-shaw/sub2api@sha256:4499efd416ae3b6345c71fbd85886473395baa2c6396cbd8af8705b6bb476a26(Linux amd64) - Public API and OAuth host:
token.72602.space - Ingress class:
nginx - TLS certificate:
token.72602.space-tls(Ready) - External PostgreSQL:
postgresql.database.svc.cluster.local:5432(database/user: sub2api) - Application PVC:
sub2api-data,10Gi,local-path,RWO - Redis PVC:
8Gi,local-path,RWO; AOF is enabled - RollingUpdate:
maxUnavailable: 0,maxSurge: 1
Google OAuth Route
- Use the 72602 public URL:
https://token.72602.space. - Google OAuth is enabled in the live application. The start endpoint is
/api/v1/auth/oauth/google/startand the callback URI generated by the running application is:https://token.72602.space/api/v1/auth/oauth/google/callback. - The application sets the OAuth state, redirect, and provider cookies with
HttpOnly,Secure,SameSite=Lax, andPath=/api/v1/auth/oauth. The frontend callback page is/auth/oauth/callback. - The Pod requires the cluster egress proxy for Google token exchange. The
GitOps source sets
HTTP_PROXYandHTTPS_PROXYtohttp://192.168.0.25:17890and bypasses that proxy for cluster-local ranges. sub2api.home.geekcity.tech:32443is a separate external endpoint, not the 72602 ingress. It returns404for the 72602 OAuth start path and must not be used for this login flow.- If Google reports a redirect URI mismatch, register only the exact callback URI above in the Google OAuth client. Google Cloud Console changes are not managed by this Kubernetes repository.
Docs
- Backup & Restore
Sub2API pre-upgrade backup and recovery runbook
- Install (ArgoCD)
Deploy Sub2API through the 72602 GitOps parent and OCI Helm child Application
- Ops
GitOps upgrades and daily operations for Sub2API
Subsections of Sub2API
Backup & Restore
Scope
- Database: PostgreSQL (
database/postgresql-0), DB/usersub2api - Git source:
manifests/sub2api-argocd.yaml, owned byargocd/ops-docs - Current release: OCI chart
0.1.31, application0.2.26 - Application image:
ghcr.io/wei-shaw/sub2api@sha256:4499efd416ae3b6345c71fbd85886473395baa2c6396cbd8af8705b6bb476a26 - Runtime data:
application/sub2api-data,10Gi,local-path,RWO - Redis data:
8Gi,local-path,RWO; AOF is enabled - Runtime Secrets:
application/sub2api-auth,application/sub2api-external-postgresql, andapplication/sub2api-redis
Sub2API executes PostgreSQL migrations automatically on startup. Migrations are
forward-only, so every chart or image upgrade requires a verified pg_dump
before the Git version change.
Pre-Upgrade Backup
1.create a protected operation directory
BACKUP_ROOT=/home/aaron/Ops/backups/sub2api
BACKUP_DIR="${BACKUP_ROOT}/upgrade-$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "$BACKUP_DIR"
chmod 700 "$BACKUP_DIR"
printf '%s\n' "$BACKUP_DIR"Use the generated UTC directory for the entire operation. Do not hard-code a previous operation timestamp into future commands.
2.dump PostgreSQL without printing its password
set +x
PG_PASSWORD="$(kubectl -n application get secret \
sub2api-external-postgresql \
-o jsonpath='{.data.postgres-password}' | base64 -d)"
test -n "$PG_PASSWORD"
printf '%s\n' "$PG_PASSWORD" | \
kubectl -n database exec -i postgresql-0 -- \
sh -c 'IFS= read -r PGPASSWORD; export PGPASSWORD; exec pg_dump -U sub2api -d sub2api -Fc' \
> "$BACKUP_DIR/sub2api.dump"
unset PG_PASSWORDThe password is passed on stdin and is not written into the backup directory.
3.capture application data and non-secret metadata
kubectl -n application exec deployment/sub2api -- \
tar -C /app/data -czf - . > "$BACKUP_DIR/sub2api-data.tgz"
git -C /home/aaron/Ops/docs fetch origin main
git -C /home/aaron/Ops/docs rev-parse origin/main \
> "$BACKUP_DIR/git-revision.txt"
git -C /home/aaron/Ops/docs show origin/main:manifests/sub2api-argocd.yaml \
> "$BACKUP_DIR/sub2api-argocd.yaml"
kubectl -n application get pvc \
-l app.kubernetes.io/instance=sub2api -o yaml \
> "$BACKUP_DIR/pvc-metadata.yaml"Do not export Kubernetes Secret objects into this directory. Back up Secret values only through the approved secret-management process. Redis AOF supports restart recovery on its PVC, but it is not a substitute for the PostgreSQL dump. Do not copy live AOF files as if they were a consistent database backup.
4.verify artifacts before upgrading
test -s "$BACKUP_DIR/sub2api.dump"
test -s "$BACKUP_DIR/sub2api-data.tgz"
kubectl -n database exec -i postgresql-0 -- pg_restore --list \
< "$BACKUP_DIR/sub2api.dump" \
> "$BACKUP_DIR/sub2api.dump.list"
test -s "$BACKUP_DIR/sub2api.dump.list"
sha256sum \
"$BACKUP_DIR/sub2api.dump" \
"$BACKUP_DIR/sub2api-data.tgz" \
"$BACKUP_DIR/sub2api-argocd.yaml" \
"$BACKUP_DIR/pvc-metadata.yaml" \
"$BACKUP_DIR/git-revision.txt" \
> "$BACKUP_DIR/SHA256SUMS"
sha256sum -c "$BACKUP_DIR/SHA256SUMS"Verified backup: 2026-08-14
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20260814T063611Z(directory mode700, files mode600). Only the shared PostgreSQLsub2apidatabase was dumped; n8n and other databases were not touched. - The host had no
pg_restore; PostgreSQL Poddatabase/postgresql-0hadpg_restore 18.3and GNUtar 1.34. The dump was copied temporarily withkubectl cp, checked with Pod-localpg_restore --list, and the temporary Pod file was removed. The previouskubectl exec -istreaming validation was not reused. - Non-empty artifacts:
sub2api.dump(19,640,824 bytes),sub2api-data.tgz(10,616,251 bytes), andsub2api.dump.list(77,853 bytes). Git revision, manifest, and PVC metadata were also captured. sha256sum -c SHA256SUMSandpg_restore --listboth succeeded.- The captured
origin/mainrevision wasce838b424f10316fc604a4a21517c90c7b6b97ae. No failure occurred; no upgrade, Argo CD sync, or GitOps/cluster change was performed.
Verified upgrade: 2026-09-05 (application 0.2.0)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20260905T000035Z(upgrade commit5230546610c437a02ee45f5b80cd804779c9170c). The scopedsub2api.dump(47,520,105 bytes) andsub2api-data.tgz(10,192,905 bytes) were non-empty;pg_restore --listand SHA-256 checks passed. schema_migrationsadvanced from 268 to 277 records; the latest migration is233_group_free_openai_fast.sql.- ArgoCD reported
Synced/Healthy; Deployment was 1/1 on the pinnedghcr.io/wei-shaw/sub2api@sha256:271bb3b34661803681cabf54e99811ab8e248b0dd4c88b09ea1226e22dea5751image. - Existing application and Redis PVCs remained Bound, Service endpoints were Ready, and public health/settings checks succeeded.
- No rollback was required.
Verified upgrade: 2026-09-05 (application 0.2.1)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20260905T115349Z-178860(upgrade commit21d02345de47d75454841e464756f6cf9349cc3c). The scopedsub2api.dumpandsub2api-data.tgzwere non-empty;pg_restore --listand SHA-256 checks passed. - ArgoCD reported
Synced/Healthyat2026-09-05T13:03:41Z; Deployment was 1/1, Pod ready with 0 restarts, internal/healthreturned{"status":"ok"}, Service endpoint ready, and Redis StatefulSet 1/1. - Existing application and Redis PVCs remained Bound; health and settings checks succeeded.
- No rollback was required.
Verified upgrade: 2026-09-10
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20260910T061248Z; PostgreSQL dump46,520,009bytes,/app/dataarchive10,214,969bytes; backup artifacts andpg_restore --list, archive listing, SHA-256 all passed; GitOps commit7bd44adb5ed1b61976b507e1f32bc990738782b2; sub2api ArgoCD target/observed0.1.14Synced/Healthy operation Succeeded; runtime verification: Deployment 1/1, Pod ready 0 restarts, chartsub2api-0.1.14/app 0.2.4, actual image digest matches, Service endpoint ready/serving, internal/healthHTTP 200, Redis StatefulSet 1/1. - No rollback required.
Verified upgrade: 2026-09-16
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20260916T053309Z(directory mode700, files mode600). PostgreSQL dump27,593,406bytes,/app/dataarchive4,579,406bytes; backup artifacts andpg_restore --list, archive listing, SHA-256 all passed; GitOps commite2c0e4576276f6a299bbd27e80f40af883f8e877(chore(sub2api): upgrade to chart 0.1.15); sub2api ArgoCD target/observed0.1.15Synced/Healthy operation Succeeded; runtime verification: Deployment 1/1, Podsub2api-7c9c4b95bf-r6cpgRunning/Ready, restarts 0, chartsub2api-0.1.15/app 0.2.5, actual image digest matchessha256:4c5dffab6e5ba4d3bd5382f19aad9654847b4e23de1a3d48e190146a3e6eb977, Service endpoint ready at10.42.0.198:8080, internal/healthHTTP 200 body{"status":"ok"}, Redis StatefulSet ready at10.42.0.12:6379with 1 historical restart. - No rollback required.
Verified upgrade: 2026-09-20 (application 0.2.7)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20260920T051850Z - Backup artifacts:
sub2api.dump(29,365,379 bytes, SHA-256d9a0fb1870cde3405d47765291190dbc0bf17bd724708dc1fd7f448a8027eace),sub2api-data.tgz(4,598,099 bytes, SHA-256f6b1691f6ba771f415e78caebedb0da225ef665a7af22c3b9d9854c6f4e097f7),pg_restore --list(1,210 entries), archive listing (10 entries), checksums passed. - GitOps commit:
67d8fef5859ec579cee101da22cc4988ca789b84(chore: upgrade sub2api) - ArgoCD status:
Synced/Healthy, operationSucceeded, observed chart revision0.1.16 - Deployment: 1/1 ready; Pod running/ready with 0 restarts
- Service endpoint:
10.42.0.224:8080 - Internal
/healthHTTP 200 (body discarded) - Dedicated Redis StatefulSet: 1/1 ready; Redis Pod has 1 historical restart
- No rollback required.
Verified upgrade: 2026-09-23 (chart 0.1.17 / application 0.2.8)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20260923T222508Z(directory mode700, files mode600). The scoped PostgreSQL dump was 32,663,617 bytes and the/app/dataarchive was 4,614,791 bytes.pg_restore --listreturned 1,210 entries, the archive listing contained 10 entries, and all SHA-256 checks passed. The initial streamed validation timed out; validation using a controlled temporary file inside the PostgreSQL container passed. - GitOps commit:
646d50010cf39090567098bc819e74b06976a5ef; onlymanifests/sub2api-argocd.yamlchanged, from chart0.1.16to0.1.17. Mirror chart PR #8 merged as87ae24c. The image digest issha256:11b2dc8d9ea297c676581daf1322d71200eeed58ebfb5fecf2a991fa2741fb86. - ArgoCD parent and child reconciled successfully; Sub2API was
Synced/Healthyon chart0.1.17. Deployment was 1/1, the Pod was Ready with 0 restarts, and its image ID matched the target digest. The Service endpoint10.42.0.226:8080was ready; internal and public/healthchecks returned HTTP 200. Dedicated Redis was 1/1 with a ready endpoint; both PVCs remained Bound. - Migrations completed without errors. Preflight found 27 non-numeric legacy reasoning-effort keys, which migration 239 removed without conversion; one existing affiliate-ledger row received a NULL operation ID under migration 240, with no unique-index conflict.
- Image pull took 10m37s and briefly caused
ProgressDeadlineExceeded; the rollout recovered. Existing pricing-repository timeout warnings remained. No rollback was required. Deployment rollback is a new Git revert; migrations are forward-only, so database recovery requires an isolated restore and a deliberate configuration switch.
Verified upgrade: 2026-09-28 (chart 0.1.18 / application 0.2.9)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20260928T135349Z(directory mode700, files mode600). The scoped PostgreSQL dump was 37,222,935 bytes with 1,214pg_restore --listentries; the/app/dataarchive was 4,631,639 bytes with 10 entries. SHA-256 checks passed, and the capturedorigin/mainrevision was622ea9171286d9e218bd15a9569ce8c1b565d48b. - GitOps commit:
b37fe3549cc8c65bba6d268c45ffdda97f86d9ca(chore(sub2api): upgrade to chart 0.1.18); onlymanifests/sub2api-argocd.yamlchanged, from chart0.1.17to0.1.18. Mirror chart PR #9 merged asa748960; the published chart0.1.18was anonymously pulled back with package SHA-256196406aa97b89ff747cc0317ad71d2eaa3b22adbc0057c7d4aec2ec126ad35e4matching Git. The image digest issha256:996a0ea43500550f233a2f653de58dcd77f42d3e244805894fcccdd32b612147. - ArgoCD synced Sub2API to chart
0.1.18at2026-09-28T13:58Z(operationSucceeded) and reportedSynced/Healthyby14:00Z. Deployment was 1/1, Podsub2api-8c7fbd445-bhhnpReady with 0 restarts, and its image ID matched the target digest exactly. The Service endpoint10.42.0.239:8080was ready; internal/healthreturned{"status":"ok"}and publichttps://token.72602.space/healthreturned HTTP 200. Dedicated Redis was 1/1 and both PVCs remained Bound. - Application 0.2.9 introduced no new database migrations: the latest applied
migration remains
240_affiliate_ledger_operation_id.sql(applied 2026-09-23) andschema_migrationsholds 289 records. No migration or startup errors appeared in the logs; the rollout completed in about two minutes withoutProgressDeadlineExceeded. - No rollback was required. Deployment rollback is a new Git revert; migrations are forward-only, so database recovery requires an isolated restore and a deliberate configuration switch.
Verified upgrade: 2026-10-01 (chart 0.1.19 / application 0.2.11)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261001T001943Z(outside the repository). Only thesub2apiPostgreSQL database andapplication/sub2api-dataPVC (/app/data) were backed up.sub2api.dumpis 38,717,665 bytes (SHA-256bd4b8663b645e24058a034342b8b1b1fa58f2475fbc5b84a94f79cc509c3ca83);sub2api-data.tgzis 4,638,794 bytes (SHA-256f2917628f296013f8062891c18172d8116e2f488a5a9466deda463f19989a0d9). Both artifacts are non-empty and mode600;pg_restore --listreturned 1,214 entries and the tar listing returned 10 entries. - Published OCI chart
0.1.19is anonymously pullable; package SHA-2563bd25eb5b5cdf69c6980e688db9730db86d72f6129315af9eb085c94a8c9dc89matched Git. GitOpstargetRevisionis0.1.19, from commitb805c440d53daa4f90706b028a5457de7e0790ae. - ArgoCD reported
Synced/Healthy. Deployment rollout was 1/1 ready and available; the Pod was Ready with 0 restarts, and the running image digest matched Linux amd64 imageghcr.io/wei-shaw/sub2api@sha256:9a71717a6f82efe663b613c730069ad427a2beee38bd16663346ae1c27a6cbc1. - Service ClusterIP is
10.43.88.246:8080, with endpoint10.42.0.70:8080. Internal/healthreturned HTTP 200 with{"status":"ok"}. Dedicated Redis was 1/1 ready at10.42.0.12:6379; its one historical restart is not a current health issue. - No rollback was required. Roll back deployment configuration with a new Git
revert to chart
0.1.18; do not usekubectl rollout undo. Migrations are forward-only. Database rollback requires restoring into an isolated database and making a deliberate configuration switch.
Verified upgrade: 2026-10-02 (chart 0.1.20 / application 0.2.13)
- Fresh backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261002T154620Z(outside the repository; directory mode700, files mode600). Only thesub2apidatabase and PVCapplication/sub2api-datamounted at/app/datawere backed up; exactly two artifacts were created.sub2api.dumpis 39,995,006 bytes (SHA-256b749ec86ec5aa6244780edeb29b1a7e82fd7cd87881b9d971a5cf6aaf408d2ef), with 1,214pg_restore --listentries.sub2api-data.tgzis 4,644,880 bytes (SHA-256c312329d676c8eab04f87e419ab00a68d6636460bcbe80c650d4028951396160), with 10 tar listing entries. - GitOps commit
18c5010062fbb9a1b22450ff3fb8b055f91fa2b1changed onlytargetRevisionfrom0.1.19to0.1.20. Published chart0.1.20is application0.2.13; package SHA-256b681c230a96ad93ef24a17946fdcb867cad4dae4ac319b70258258bb01b19b6band OCI manifest digestsha256:60d44de5e929d2c4f3fe0a1d6d3b02d5e8597acd7fdaf99e5a02cf08e27a8e34. An independent anonymous pull matched the Git archive. - ArgoCD operation
Succeeded,Synced/Healthy; sync completed at2026-10-02T15:57:26Zand Healthy was reported at16:01:36Z. Deployment was 1/1 ready and available; Podsub2api-c98d8b48b-dmzwgwas Ready/Running with 0 restarts, and the running image digest matched Linux amd64 imageghcr.io/wei-shaw/sub2api@sha256:834172e90a5e51ae29afc9f93ec13235768eaad77497bc8c83274c141cd55759. - Service ClusterIP
10.43.88.246:8080had endpoint10.42.0.74:8080; internal/healthreturned HTTP 200 with{"status":"ok"}. Dedicated Redis StatefulSet was 1/1 with ready endpoint10.42.0.12:6379; its Pod has one historical restart. - No rollback was required. Deployment rollback is a new Git revert to chart
0.1.19; do not usekubectl rollout undo. Database migrations are forward-only, so database rollback requires restoring into an isolated database and making a deliberate configuration switch.
Verified upgrade: 2026-10-14 (chart 0.1.22 / application 0.2.16)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261014T123853Z(outside the repository; directory mode700). Exactly two files, both mode600:sub2api.dump(52,013,200 bytes, SHA-2567e3bf6693e21a9ea644cccda36f85f03f506bd1a4dac7bd589118551b7272d8f) andsub2api-data.tgz(4,674,990 bytes, SHA-2561b68a4c9af54fe032c582e51eee5f039d8b9594a9592441e31e7d2893b164f75). The dump covered only database/usersub2apiondatabase/postgresql-0; the archive covered onlyapplication/sub2api-datamounted at/app/data.pg_restore --listpassed with 1,214 entries, the archive listing passed with 10 entries, and SHA-256 recomputation passed. Initial streamed restore listing timed out; the pod-local temporary-file fallback passed and the temporary file was removed. - Chart mirror PR #13 merged as
440034baaaac6efc56eba1ae8c906a475f5f1518. Package SHA-256 was718ff8e75d4e803d351da82e2d02161a86ac85178b8e569ce6b98f241672dccb; an independent anonymous Helm pull matched. GHCR OCI manifest digest wassha256:4f3fdb5942b218717099821597b29324f98400256adc560e11cc0b7922372fc8. Chart CI, Mirror consistency CI, Publish Sub2API chart, and Pages workflows succeeded. GitOps commitff542ee8a14d2615233281cf6886ddc5ab8a59e9changed onlytargetRevisionfrom0.1.21to0.1.22. - Parent
ops-docswasSynced/Healthyat that commit, operationSucceeded. Childsub2apitarget and observed chart were0.1.22,Synced/Healthy, operationSucceeded. Deployment rollout finished with desired/updated/ready/available1/1/1/1, unavailable0; Podsub2api-c8d4cd46d-5lb4zwas Running/Ready with 0 restarts, and its live image ID matched Linux amd64 imageghcr.io/wei-shaw/sub2api@sha256:4a0d0196d3450c71da159137e3419fc144df0c038bbe3b9e87dbbccaef10cab7. - Ready/serving Service endpoint was
10.42.0.55:8080; internal/healthreturned HTTP 200 with{"status":"ok"}. Dedicated Redis StatefulSet and Pod were 1/1 ready. Redis had 2 historical restarts; last termination was 2026-10-07 with exit 255, with no current Redis errors. - Non-fatal observations: one startup timeout fetching the remote model-price
hash, security allowlist warnings, and a historical readiness failure from
the replaced Pod. No migration failure was observed; no specific migration
is asserted. No rollback was required. Roll back the GitOps release with a
new Git revert to chart
0.1.21; a true database rollback requires restoring the dump into an isolated database and making a deliberate configuration switch. Never usekubectl rollout undoas a database rollback.
Verified upgrade: 2026-10-17 (chart 0.1.23 / application 0.2.17)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261017T113820Z(outside the repository; directory mode700, exactly two files, both mode600). The dump covered only database/usersub2apiondatabase/postgresql-0; the archive covered only PVCapplication/sub2api-datamounted at/app/data.sub2api.dumpwas 56,376,226 bytes (SHA-256ac06be760091e3a108c2bf0d11cd33d3a2fd2f9a1ae5cfdc10c20600a427dde3), andsub2api-data.tgzwas 4,682,008 bytes (SHA-256124c5dbc2402fd289a5f5dea293970ab3d02910f12038f41daa213b5a36cc8fb).pg_restore --listreturned 1,226 entries; the archive listing had 10 entries; both checksums passed. - Chart mirror PR #14 merged as
b1668e30bc274ef7a7d5f72ac0ea8a1193b96984. Package SHA-256 wasf4095a555c294065e5c409568435a8d80f04fe5ba025e0672dc84c153302b690; an independent anonymous Helm pull matched. OCI manifest digest wassha256:416a1256412bbe72d9daf472a1a29e43f412552f1cc1d96471950317a038f8e9. Chart CI #48, Mirror consistency CI #39, Publish Sub2API chart #14, and Pages #115 succeeded. GitOps commit7b7c409b58c8f4e93c5d167ef7920ba0ead3cc82changed onlytargetRevisionfrom0.1.22to0.1.23. - Parent
ops-docsobserved that commit and wasSynced/Healthy, operationSucceeded. Childsub2apitarget and observed chart were0.1.23,Synced/Healthy, operationSucceeded. Deployment desired/updated/ready/ available counts were1/1/1/1; Podsub2api-68ff596d85-58pkbwas Running/Ready with 0 restarts and its image ID matched Linux amd64 imageghcr.io/wei-shaw/sub2api@sha256:3578ce8dcddd4befa6817448472166f1501120f7876029c641de698a1a8e2ee7. - The Service had one ready/serving TCP
8080endpoint and internal/healthreturned HTTP 200. Redis StatefulSet and Pod were 1/1 ready; its 2 restarts are historical, and master and headless endpoints were ready/serving. - Observations: one historical readiness warning on the replaced Pod during
rollout. The bounded log tail contained one unclassified error-like line,
but no migration-like entries, timeout, connection-refused, or sensitive-
keyword errors. No current rollout failure was observed. These observations
do not establish which migration ran or migration success. No rollback was
required. A release rollback is a new Git revert to chart
0.1.22; database rollback requires restoring the dump into an isolated database and deliberately switching configuration. Do not usekubectl rollout undoas a database rollback.
Verified upgrade: 2026-10-29 (chart 0.1.24 / application 0.2.19)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261029T034912Z(outside the repository). Exactly two files were created:sub2api.dump(71,124,292 bytes, SHA-256c34138082011c0ac67334ff5f7c48c970d836e94d21be43dbb5b8f673f342319) andsub2api-data.tgz(4,701,059 bytes, SHA-2560b4fda8516b168f5a063f6aa9896aab22786f56717add37fb33149ce33a9dee4).pg_restore --listshowed 1,226 entries and the tar archive listing showed 10 entries. - GitOps commit
a3894400e43bb9488c1bc364398310515e378296changed onlytargetRevision, from chart0.1.23to0.1.24. The application image wasghcr.io/wei-shaw/sub2api@sha256:b5a90edf9f3798eafa7a0b4b2b6ebc47036ff45ac475ff6186ea28812d9e0555. - ArgoCD reported
Synced/Healthy, operationSucceeded. Deployment was 1/1; the Pod was Ready with 0 restarts and used the target image digest. The ready Service endpoint was10.42.0.61:8080; internal/healthreturned{"status":"ok"}. The dedicated Redis StatefulSet and Pod were 1/1 Ready at endpoint10.42.0.16:6379. - The ArgoCD CLI token had expired, so verification used Kubernetes Application status only. No migration details are asserted.
- No rollback was required. To roll back the release, create a Git revert of
a3894400e43bb9488c1bc364398310515e378296; this restores chart0.1.23and lets ArgoCD reconcile. A database restore is separate: restore the backup only into an isolated database, verify it, then make a deliberate reviewed configuration switch. Do not usekubectl rollout undoas a database rollback.
Verified upgrade: 2026-11-08 (chart 0.1.25 / application 0.2.20)
- Backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261108T023944Z(outside the repository; directory mode700, exactly two files, both mode600).sub2api.dumpwas 78,577,025 bytes (SHA-256176322036de80b940f00b0975a8a6c6fee0ba31c7c130f8788ebc106834bd0b6);sub2api-data.tgzwas 4,817,192 bytes (SHA-256bace923f7bbaf2132672495299eb67214ba090d55702fb83793da6374500acd4).pg_restore --listreturned 1,231 entries, the archive listing returned 10 entries, and checksums passed. - Mirror PR #16 merged as
ec3138c2beb645cc8db11b4072a952b530f574cf. GHCR Publish Sub2API chart and Pages workflows succeeded. An independent anonymous Helm pull matched Git package SHA-256d10eefce7d341261840a67486205791dd0b87c9f40bb7d2a1dd3e3d69eefd396; OCI manifest digest wassha256:8e0154dcb9af076835444f2dba419d2ca06db71e58a5e3728ef9cd41bb69fb81. GitOps commit4f15af66e6257beb6500347ee8ea2107bf379868changed onlytargetRevision, from0.1.24to0.1.25. - Parent
ops-docsobserved the current main commit and wasSynced/Healthy. Childsub2apitarget and observed chart were0.1.25,Synced/Healthy, operationSucceeded. Deployment was 1/1; Podsub2api-75894b5886-6hm86was Ready with 0 restarts and its image digest matched Linux amd64 imageghcr.io/wei-shaw/sub2api@sha256:e5da8d1e51cd97fab4464cdfa4e54a1466ecb470ca5ce6d4e740ebeaeef714a0. - Ready Service endpoint was
10.42.0.76:8080; internal/healthreturned HTTP 200 with{"status":"ok"}. Dedicated Redis was 1/1 Ready at10.42.0.16:6379; both application PVCs remained Bound. - No migration details were verified, and no rollback was required. To roll
back the deployment, create a Git revert of
4f15af66e6257beb6500347ee8ea2107bf379868to chart0.1.24and let ArgoCD reconcile. Database restoration is separate: restore into an isolated database, verify it, then make a deliberate reviewed configuration switch. Do not usekubectl rollout undoas a database rollback.
Verified upgrade: 2026-11-11 (chart 0.1.26 / application 0.2.21)
- Fresh backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261111T052550Z(outside the repository; directory mode700). Scope was only thesub2apiPostgreSQL database and mounted/app/dataPVC.sub2api.dumpwas 81,899,473 bytes (SHA-256dd35796baf399aaf862695e92af26e5581365fb5cc47db5f6f570abb4a486fff, mode600);pg_restore --listreturned 1,247 entries.sub2api-data.tgzwas 4,844,655 bytes (SHA-256d51101aca2a94d4b76cd691103fb854aaf32ec7a8c450a14053c35a7cff17a91, mode600); tar listing returned 10 entries. Localpg_restorewas unavailable and an initial stdin validation timed out; final in-container verification passed. - Published image:
ghcr.io/wei-shaw/sub2api@sha256:cb10d92e89b37c1b732ab6f66cd0bb2164cc8d2d49004e7b9301c1c3d5f1a4a5. Mirror PR #17 merged as1f12535c33d6602996cd34adc8222147244ee5ff; package SHA-256 was2c2c87dc8d8a362a7ef64632c8ec7eae1467f8358863b4afbb0e2925f3f1ff98. Anonymous OCI pull returned Helm OCI digestsha256:c380e605b8b0fae4bbc8f85976a160314ce1551329a767ee4972d3bbdd2e32aa, matching the repository package. Pages index and catalog show the release. GitOps commit915e943088010bc50448aac8c8e9e71d8d21bd43changed onlytargetRevisionfrom0.1.25to0.1.26. - ArgoCD was
Synced/Healthy. Deployment was 1/1; Podsub2api-76bc4bd684-sth24was Ready with 0 restarts and the expected image digest. Service endpoint10.42.0.111:8080was ready; internal and public/healthreturned{"status":"ok"}. Dedicated Redis was 1/1 Ready at10.42.0.16:6379. - No migration details are asserted. Release rollback is a Git revert of
915e943088010bc50448aac8c8e9e71d8d21bd43. A database rollback requires restoring into an isolated database followed by a deliberate configuration switch.
Verified upgrade: 2026-11-17 (chart 0.1.27 / application 0.2.22)
- Fresh backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261117T034627Z(outside the repository; directory mode700). Scope was only thesub2apidatabase and mounted/app/dataPVC.sub2api.dumpwas 84,211,688 bytes (SHA-256241fcdea5ef884d6c42fb876044d42c33e4a9fa1b2a163e8aaa1be23b6b8610b, mode600); pod-localpg_restore --listreturned 1,252 entries.sub2api-data.tgzwas 4,916,797 bytes (SHA-2560f97e23dc46065daf7678c9cc89e732378b222fdba0ddafa20454a48627c183c, mode600); archive listing returned 10 entries. - Mirror PR #18 merged as
7413411632d4e32d6a33d7bc52db579b03493134. Chart package SHA-256 was59672be451e6152009801c4cccdb2aa20afe95446a41f894b38963b0c39e52a3; the anonymous OCI pull manifest digest wassha256:a93e2f41274e4cfaa659b1dd041dd0b8751b04778b5d1f5ff1e905783bcb7d06. Chart CI, mirror CI, publish, and Pages workflows succeeded; the Pages index and catalog updated. GitOps commit5df6a6074f4486d0f216747320543586b4e2582fchanged onlytargetRevisionfrom0.1.26to0.1.27. - ArgoCD was
Synced/Healthy, observed chart0.1.27, automated syncSucceeded. Deployment was 1/1; Podsub2api-7895b77c-qtnhnwas Ready with 0 restarts and the expected imageghcr.io/wei-shaw/sub2api@sha256:459cb6072321d509531d4f85bbeecd8a3709ca24c0bbcf576d7aebcf5d6a4ff9. Service endpoint10.42.0.193:8080; internal and public/healthreturned HTTP 200 with{"status":"ok"}. Dedicated Redis was 1/1 Ready at10.42.0.16:6379; PVCs were Bound. - No Warning events were found for the new Sub2API Pod or Deployment. Rollout
briefly waited for the old replica to terminate. Redis has two historical
restarts, unchanged. No migration details are asserted. Release rollback is
a new Git revert of
5df6a6074f4486d0f216747320543586b4e2582f; database rollback requires an isolated restore and deliberate configuration switch.
Verified upgrade: 2026-11-18 (chart 0.1.28 / application 0.2.23)
- Fresh backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261118T082622Z(outside the repository; directory mode700, both files mode600). Scope was only the Sub2API PostgreSQL database and/app/data.sub2api.dumpwas 84,855,058 bytes (SHA-2560bf3323fd380986b70f6ad772a3bcb336cd694fb55da93d7b23df55ce54b5e50);pg_restore --listpassed with 1,258 entries.sub2api-data.tgzwas 4,925,430 bytes (SHA-25658a339e9fa9d2bec28f87a91390341379e76abebc6a789bbe9a116c44e488393); archive listing returned 10 entries. The temporary validation copy was removed. - Mirror PR #19 merged as
13c68a083ef0139d02f36ca246ff7ddf9fda2209. Chart CI and Mirror CI passed; publish workflow #44265593722 and Pages workflow #44265594131 succeeded. An anonymous chart pull returned manifest digestsha256:5d8325234cd55647be4db03132a4d3ee58b45819fbe51eabb9dcc441bd53bb23; package SHA-256 wasd1c66a7aca80918b15034eb3d52ad89fe4b19fb50114fb333d1798b30863fbe1. The public index and catalog list0.1.28/0.2.23. GitOps commit5dc7236f46c7a62b7474c56e5420b27091e8fb67changed onlymanifests/sub2api-argocd.yaml, from targetRevision0.1.27to0.1.28. - Parent and child ArgoCD Applications were
Synced/Healthy; the Sub2API operation succeeded. Deployment was 1/1. Podsub2api-5c9457446-lxs5mhad 0 restarts and the expected image digest. The Service had a ready endpoint; internal and public/healthreturned HTTP 200 with{"status":"ok"}. Ingress/TLS were ready, dedicated Redis was 1/1 with a ready endpoint, PostgreSQL was Ready, and application and Redis PVCs were Bound. Replacement events were normal; Redis had two historical restarts. No migration details are asserted. - Release rollback is a new Git revert of
5dc7236f46c7a62b7474c56e5420b27091e8fb67. Database rollback requires an isolated restore followed by a deliberate configuration switch.
Verified upgrade: 2026-11-21 (chart 0.1.29 / application 0.2.24)
- Pre-upgrade backup directory:
/home/aaron/sub2api-preupgrade-20261121T013224Z(outside the repository; directory mode700; both files mode600). It contains exactlysub2api-postgresql.dump(86,944,371 bytes, SHA-25613526ed347d29bea63a63d90e9d13fd378aa6f8b0692a563e519995362b54fd5) andsub2api-app-data.tar.gz(5,032,630 bytes, SHA-2562ed5251a7fb40e80ab4990ae52b91b1e2d4e4426c8c2c7fdcf0989cbb12d04ed).pg_restore --listpassed inside the PostgreSQL container; the application data archive listing passed with 10 entries. - Mirror PR #20 merged. The chart package SHA-256 was
b69628bb7050dc8f435a9228458ca17e88b44b4ee1a949aa342a9a1aedb3d413; an anonymous OCI pull and package checksum matched. Mirror CI, Sub2API chart CI, publish workflow run44849477770, and Pages workflow run44849477077succeeded. GitOps commit423a4c4a5b2ec115b7934c9e3645956b778dd9ecchanged onlytargetRevisionfrom0.1.28to0.1.29. - ArgoCD was
Synced/Healthy, operationSucceeded. Deployment was 1/1; Podsub2api-75dd49bfc7-ftk89was Ready with 0 restarts, and its runtime image ID matched Linux amd64 imageghcr.io/wei-shaw/sub2api@sha256:329e1fb6b17e84bd8d28c7d1da61fc678a3b68c6a2f99180d65541fd774fc652. The ready Service endpoint was10.42.0.240:8080; internal and public/healthreturned HTTP 200 with{"status":"ok"}. Dedicated Redis and shared PostgreSQL were 1/1 Ready with ready endpoints. The Sub2API data (10Gi), Redis (8Gi), and PostgreSQL (8Gi) PVCs were Bound. No specific migration is asserted. - Release rollback is a new Git revert of
423a4c4a5b2ec115b7934c9e3645956b778dd9ec. Because migrations are forward-only, database recovery requires restoring to an isolated database and making a deliberate configuration switch; this is not a database downgrade.
Verified upgrade: 2026-11-24 (chart 0.1.30 / application 0.2.25)
- Fresh scoped pre-upgrade backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261124T130444Z(outside the repository; directory mode700, exactly two files, both mode600). Thesub2api.dumpwas 91,160,962 bytes (SHA-256b60c74bc522fa113ef9020c7bfb66f141eea2c08ae884e31e097621f8f05da16);sub2api-data.tgzwas 5,059,678 bytes (SHA-2562c1b3936cad67c67635a4f2aa574a526389ec734c7dde91682c113f62b877828).pg_restore --listpassed with 1,259 entries using an in-container temporary-copy fallback; the temporary copy was removed. The/app/dataarchive listing returned 10 entries. - Official Sub2API
v0.2.25image isghcr.io/wei-shaw/sub2api@sha256:a532a5f09005081338bd2d503a6f463aef941f3c382dbc8637163c7230c42146(Linux amd64). Mirror PR #21 merged as7dd06ee87f04159812693f2cb50e4441224135b7; candidate chart CI run45395651473and Mirror consistency CI run45395651445passed at head0433ddad5e515abbee80559eaab592a4ce280f38. Publish Sub2API chart run45395933800and Pages run45395928993succeeded. An anonymous Helm pull returned OCI manifest digestsha256:7179980e0cad76cf76f8d56f6160f5d1fa6b5239eff29bdf42a3b1c96a83ec43; package SHA-2567ba8e62a7c1f8b9630662ecae1add51a9f653f83f69faba3b62491c905ec54f4matched the main index and package. Catalog and index list chart0.1.30/ app0.2.25. - GitOps commit
015df28d461ba3758e907b5ec6ebf85641895859changed onlymanifests/sub2api-argocd.yaml, fromtargetRevision0.1.29to0.1.30. ArgoCD reportedSynced/Healthy, operationSucceeded; Deployment was 1/1. Podsub2api-6b96465975-wsm8zwas Running/Ready with 0 restarts and its image spec and image ID matched the expected Linux amd64 digest. The ready Service endpoint was10.42.0.249; internal and public/healthreturned HTTP 200 with{"status":"ok"}. Dedicated Redis and shared PostgreSQL were Ready; Sub2API data (10Gi), Redis (8Gi), and PostgreSQL (8Gi) PVCs were Bound. No specific migration is asserted. - Deployment rollback is a new Git revert of
015df28d461ba3758e907b5ec6ebf85641895859. Migrations are forward-only, so database recovery requires an isolated restore followed by a deliberate configuration switch.
Verified upgrade: 2026-11-28 (chart 0.1.31 / application 0.2.26)
- Fresh scoped pre-upgrade backup directory:
/home/aaron/Ops/backups/sub2api/upgrade-20261128T095940Z(outside the repository; directory mode700, exactly two files, both mode600). Thesub2api.dumpwas 94,106,259 bytes (SHA-256164f75352938c7fe04f4be60dc179c4aedc63c9f93506bd82f50ba8d5422405f);sub2api-data.tgzwas 5,077,369 bytes (SHA-25601f6723c81a788c21231ed62dea792211d1adecd79d2c0f588ae47cbda5e0445).pg_restore --listpassed with 1,259 entries using the in-container temporary-copy fallback; the temporary copy was removed. The archive listing returned 10 entries. - Official Sub2API
v0.2.26Linux amd64 image:ghcr.io/wei-shaw/sub2api@sha256:4499efd416ae3b6345c71fbd85886473395baa2c6396cbd8af8705b6bb476a26. Mirror PR #22 merged asf8ab0b2388b449c6b9bad29b5a8cbdd131c83061; candidate head74077577dd3e056e10d6d8108bb63b7cdb75f77dpassed Sub2API chart CI run46132508595and Mirror consistency CI run46132508696. Publish workflow run46132590294and Pages workflow run46132589995succeeded. Anonymous OCI chart pull returned manifest digestsha256:611dd601f77318f06d1f54af70ccbeddabd0f4b1e4874498c2677c791ec21fbd; package SHA-256341628d2e744b71f0e0461161da481e8887b4b8b648649f7ef4aedf7d49b5361matched the main index and package. Index and catalog list chart0.1.31/ app0.2.26. - GitOps commit
360efa3b7725606c09f93db6751201d3691e7b17changed onlytargetRevisionfrom0.1.30to0.1.31. At2026-11-28 10:10:25 UTC, ArgoCD wasSynced/Healthy, operationSucceeded; Deployment was 1/1. Podsub2api-56b956cfcf-w5zngwas Running/Ready with 0 restarts, and image spec and runtime image ID matched the expected digest on Linux/amd64. Ready Service endpoint was10.42.0.50:8080; internal and public/healthreturned HTTP 200 with{"status":"ok"}. Dedicated Redis was 1/1 ready with 2 historical restarts; shared PostgreSQL was 1/1 ready with 1 historical restart. Sub2API data (10Gi), Redis (8Gi), and PostgreSQL (8Gi) PVCs were Bound. No specific migration is asserted. - Deployment rollback is a new Git revert of
360efa3b7725606c09f93db6751201d3691e7b17. Migrations are forward-only, so database recovery requires restoring into an isolated database followed by a deliberate configuration switch.
Restore PostgreSQL Safely
Restore into a separate database first. Do not overwrite the live sub2api
database during an upgrade rollback.
1.create the restore database
BACKUP_DIR=/home/aaron/Ops/backups/sub2api/<approved-backup-directory>
test -s "$BACKUP_DIR/sub2api.dump"
set +x
read -rsp 'PostgreSQL admin password: ' POSTGRES_ADMIN_PASSWORD; printf '\n'
test -n "$POSTGRES_ADMIN_PASSWORD"
printf '%s\n' "$POSTGRES_ADMIN_PASSWORD" | \
kubectl -n database exec -i postgresql-0 -- \
sh -c 'IFS= read -r PGPASSWORD; export PGPASSWORD; exec createdb -U postgres -O sub2api sub2api_restore'
unset POSTGRES_ADMIN_PASSWORD2.restore and verify with the application database user
set +x
PG_PASSWORD="$(kubectl -n application get secret \
sub2api-external-postgresql \
-o jsonpath='{.data.postgres-password}' | base64 -d)"
test -n "$PG_PASSWORD"
{ printf '%s\n' "$PG_PASSWORD"; cat "$BACKUP_DIR/sub2api.dump"; } | \
kubectl -n database exec -i postgresql-0 -- \
sh -c 'IFS= read -r PGPASSWORD; export PGPASSWORD; exec pg_restore -U sub2api -d sub2api_restore --exit-on-error --no-owner --no-privileges'
printf '%s\n' "$PG_PASSWORD" | \
kubectl -n database exec -i postgresql-0 -- \
sh -c 'IFS= read -r PGPASSWORD; export PGPASSWORD; exec psql -U sub2api -d sub2api_restore -c "\\dt"'
unset PG_PASSWORD3.switch only through a reviewed Git recovery change
Change externalPostgresql.database to sub2api_restore in
manifests/sub2api-argocd.yaml, commit and push the reviewed recovery change,
then reconcile ops-docs and sub2api. Restore sub2api-data only during a
planned maintenance window with the workload quiesced; never extract the
archive over a running Pod.
argocd app get ops-docs --hard-refresh
argocd app sync ops-docs --revision main
argocd app wait ops-docs --sync --health --timeout 300
argocd app sync sub2api
argocd app wait sub2api --sync --health --timeout 600
curl -fsS https://token.72602.space/health
curl -fsS https://token.72602.space/api/v1/settings/public
kubectl -n application logs deployment/sub2api --since=10mDo not use kubectl rollout undo, delete PVCs, or delete Secrets as restore or
rollback steps.
App-Level S3 Backup Check
The live S3 endpoint is https://api.minio.72602.space, and Sub2API uses the
sub2api bucket. The MinIO API Ingress source keeps
nginx.ingress.kubernetes.io/proxy-body-size: "0" scoped to that API host so
backup uploads are not rejected by the default 1 MiB ingress limit. Verify a
scheduled or manual backup from logs without printing credentials, tokens,
object names, or backup content:
kubectl -n application logs deployment/sub2api --since=30m
kubectl -n basic-components logs deployment/ingress-nginx-controller --since=30m
kubectl -n storage get ingress minio-apiInstall (ArgoCD)
🚀Installation
Preliminary
1. Kubernetes is installed; if not, check 🔗link 2. Helm is installed; if not, check 🔗link 3. ArgoCD is installed; if not, check 🔗link- PostgreSQL is available in namespace
database, DNS resolvestoken.72602.space, and ingress-nginx with thelets-encryptClusterIssuer is ready.
1.prepare runtime Secrets
Details
kubectl get namespace application >/dev/null 2>&1 || \
kubectl create namespace application
set +x
read -rsp 'Sub2API admin password: ' ADMIN_PASSWORD; printf '\n'
read -rsp 'Sub2API PostgreSQL password: ' POSTGRES_PASSWORD; printf '\n'
read -rsp 'Sub2API Redis password: ' REDIS_PASSWORD; printf '\n'
JWT_SECRET="$(openssl rand -hex 32)"
TOTP_KEY="$(openssl rand -hex 32)"
test -n "$ADMIN_PASSWORD"
test -n "$POSTGRES_PASSWORD"
test -n "$REDIS_PASSWORD"
kubectl -n application create secret generic sub2api-auth \
--from-literal=admin-password="$ADMIN_PASSWORD" \
--from-literal=jwt-secret="$JWT_SECRET" \
--from-literal=totp-encryption-key="$TOTP_KEY" \
--dry-run=client -o yaml | kubectl apply -f -
kubectl -n application create secret generic sub2api-external-postgresql \
--from-literal=postgres-password="$POSTGRES_PASSWORD" \
--dry-run=client -o yaml | kubectl apply -f -
kubectl -n application create secret generic sub2api-redis \
--from-literal=redis-password="$REDIS_PASSWORD" \
--dry-run=client -o yaml | kubectl apply -f -
unset ADMIN_PASSWORD POSTGRES_PASSWORD REDIS_PASSWORD JWT_SECRET TOTP_KEY
kubectl -n application get secret \
sub2api-auth sub2api-external-postgresql sub2api-redisSecret values must stay outside Git, terminal output, and this handbook.
2.verify the GitOps source
The parent argocd/ops-docs Application reads
https://github.com/AaronYang0628/docs.git at path manifests. The canonical
child declaration is manifests/sub2api-argocd.yaml; it configures the OCI
chart source and must not be applied as an independent deployment route.
Details
git -C /home/aaron/Ops/docs fetch origin main
git -C /home/aaron/Ops/docs \
show origin/main:manifests/sub2api-argocd.yaml >/dev/null
kubectl -n argocd get application ops-docs \
-o jsonpath='{.spec.source.repoURL}{"\n"}{.spec.source.path}{"\n"}'Expected source values are https://github.com/AaronYang0628/docs.git and
manifests.
3.sync parent and child Applications
Details
argocd app get ops-docs --hard-refresh
argocd app sync ops-docs --revision main
argocd app wait ops-docs --sync --health --timeout 300
argocd app get sub2api --hard-refresh
argocd app sync sub2api
argocd app wait sub2api --sync --health --timeout 6004.verify release, storage, ingress, and API path
Details
kubectl -n argocd get application sub2api \
-o jsonpath='{.spec.source.repoURL}{"\n"}{.spec.source.chart}{" "}{.spec.source.targetRevision}{"\n"}'
kubectl -n application get deployment sub2api \
-o jsonpath='{range .spec.template.spec.containers[*]}{.name}{"="}{.image}{"\n"}{end}'
kubectl -n application rollout status deployment/sub2api --timeout=600s
kubectl -n application get pods,svc,ingress,pvc
kubectl -n application get certificate,certificaterequest,order,challenge
kubectl -n application get endpointslice \
-l kubernetes.io/service-name=sub2api
curl -fsS https://token.72602.space/health
curl -fsS https://token.72602.space/api/v1/settings/public
set +x
read -rsp 'Sub2API API token: ' SUB2API_API_TOKEN; printf '\n'
curl -fsS \
-H "Authorization: Bearer ${SUB2API_API_TOKEN}" \
https://token.72602.space/v1/models
read -rp 'Model ID for smoke generation: ' MODEL_ID
curl -fsS https://token.72602.space/v1/chat/completions \
-H "Authorization: Bearer ${SUB2API_API_TOKEN}" \
--json "{\"model\":\"${MODEL_ID}\",\"messages\":[{\"role\":\"user\",\"content\":\"Reply with OK.\"}],\"max_tokens\":8}"
unset SUB2API_API_TOKEN MODEL_IDExpected release values are chart 0.1.31, application 0.2.26, and image
ghcr.io/wei-shaw/sub2api@sha256:4499efd416ae3b6345c71fbd85886473395baa2c6396cbd8af8705b6bb476a26
(Linux amd64).
The TLS certificate is Ready; the
sub2api-data PVC is 10Gi and the Redis PVC is 8Gi, both local-path
RWO.
Ops
Web Page
sub2api web page (https://token.72602.space)
Current Release
argocd app get ops-docs --hard-refresh
argocd app get sub2api --hard-refresh
kubectl -n argocd get application sub2api \
-o jsonpath='{.spec.source.repoURL}{"\nchart="}{.spec.source.chart}{" "}{.spec.source.targetRevision}{"\nimage.tag="}{.spec.source.helm.parameters[?(@.name=="image.tag")].value}{"\n"}'
kubectl -n application get deployment sub2api \
-o jsonpath='{range .spec.template.spec.containers[*]}{.name}{"="}{.image}{"\n"}{end}'
kubectl -n application get pods,svc,ingress,pvc
kubectl -n application get certificate,certificaterequest,order,challengeThe expected values are OCI chart 0.1.31, application 0.2.26, image
ghcr.io/wei-shaw/sub2api@sha256:4499efd416ae3b6345c71fbd85886473395baa2c6396cbd8af8705b6bb476a26
(Linux amd64),
namespace application, and host
token.72602.space. The application PVC is 10Gi; the Redis PVC is 8Gi
with AOF enabled. Both use local-path and RWO.
Sync From Git
argocd/ops-docs owns manifests/sub2api-argocd.yaml from
https://github.com/AaronYang0628/docs.git. Reconcile the Git parent before the
OCI Helm child:
git -C /home/aaron/Ops/docs fetch origin main
argocd app get ops-docs --hard-refresh
argocd app sync ops-docs --revision main
argocd app wait ops-docs --sync --health --timeout 300
argocd app get sub2api --hard-refresh
argocd app sync sub2api
argocd app wait sub2api --sync --health --timeout 600Do not apply manifests/sub2api-argocd.yaml directly as a second ownership
path.
Rolling Upgrade
1.back up PostgreSQL before changing chart or image values
Use the Backup & Restore runbook. Store the scoped backup outside
the repository and verify both artifacts before continuing. For the upgrade
completed on 2026-10-10, the backup was
/home/aaron/Ops/backups/sub2api/upgrade-20261010T092354Z; it contains only:
| Artifact | Size | SHA-256 |
|---|---|---|
sub2api.dump |
45,787,015 bytes | 0e0195256cccbbd985df5079f1d9e0998cd12cfe5e101ddcf471f01d4b767b5f |
sub2api-data.tgz |
4,665,673 bytes | 1068b2efe24639bfba000daa90e365c80fd7b874ffc4dea847a1d8e9626acd1e |
pg_restore --list passed with 1,214 entries; listing the PVC archive passed
with 10 entries. Verify the saved artifacts with:
sha256sum \
/home/aaron/Ops/backups/sub2api/upgrade-20261010T092354Z/sub2api.dump \
/home/aaron/Ops/backups/sub2api/upgrade-20261010T092354Z/sub2api-data.tgz
pg_restore --list \
/home/aaron/Ops/backups/sub2api/upgrade-20261010T092354Z/sub2api.dump
tar -tzf \
/home/aaron/Ops/backups/sub2api/upgrade-20261010T092354Z/sub2api-data.tgzDo not infer or claim a particular database migration ran.
For the verified 2026-10-14 upgrade, the backup directory was
/home/aaron/Ops/backups/sub2api/upgrade-20261014T123853Z (outside the
repository, directory mode 700). It contained exactly the database dump and
/app/data archive, both mode 600; pg_restore --list passed with 1,214
entries, archive listing passed with 10 entries, and SHA-256 recomputation
passed. See Backup & Restore for artifact sizes and hashes.
For the verified 2026-11-08 upgrade, the backup directory was
/home/aaron/Ops/backups/sub2api/upgrade-20261108T023944Z, with exactly the
database dump and /app/data archive, both mode 600. pg_restore --list
returned 1,231 entries, the archive listing returned 10 entries, and checksums
passed. See Backup & Restore for artifact sizes and hashes.
For the verified 2026-11-11 upgrade, see Backup & Restore for the
scoped backup artifacts and validation. Mirror PR #17 merged as
1f12535c33d6602996cd34adc8222147244ee5ff; the published chart package SHA-256
was 2c2c87dc8d8a362a7ef64632c8ec7eae1467f8358863b4afbb0e2925f3f1ff98. An
anonymous OCI pull returned digest
sha256:c380e605b8b0fae4bbc8f85976a160314ce1551329a767ee4972d3bbdd2e32aa,
matching the repository package; the Pages index and catalog show the release.
GitOps commit 915e943088010bc50448aac8c8e9e71d8d21bd43 changed only
targetRevision from 0.1.25 to 0.1.26.
2.update the Git source
Edit only the reviewed targetRevision, image.tag, or required values in
manifests/sub2api-argocd.yaml, then inspect and publish the change. For the
2026-10-10 upgrade, this manifest changed only at targetRevision. The chart
mirror package SHA-256 was
2c82a680a66988ab034e7180d9b2871d49e69f9c4217ffc3173c3790230453d6; an
anonymous Helm pull matched the package and index. Chart mirror PR #12 was
merged in commit 9f8a943e93a1fe4bf92b8ae381537538ea18a6fc. The GitOps change
was committed and pushed as
ee451e9025fa0ad6cd26e8a849db530693bbc6c8.
For the 2026-10-14 upgrade, chart mirror PR #13 merged as
440034baaaac6efc56eba1ae8c906a475f5f1518. The chart package SHA-256 was
718ff8e75d4e803d351da82e2d02161a86ac85178b8e569ce6b98f241672dccb; an
independent anonymous Helm pull matched. Its GHCR OCI manifest digest was
sha256:4f3fdb5942b218717099821597b29324f98400256adc560e11cc0b7922372fc8.
Chart CI, Mirror consistency CI, Publish Sub2API chart, and Pages workflows
succeeded. GitOps commit ff542ee8a14d2615233281cf6886ddc5ab8a59e9 changed
only targetRevision, from 0.1.21 to 0.1.22.
git -C /home/aaron/Ops/docs diff --check -- manifests/sub2api-argocd.yaml
git -C /home/aaron/Ops/docs diff -- manifests/sub2api-argocd.yaml
git -C /home/aaron/Ops/docs add manifests/sub2api-argocd.yaml
git -C /home/aaron/Ops/docs commit -m "chore: upgrade sub2api"
git -C /home/aaron/Ops/docs push origin HEAD:main3.reconcile parent and child Applications
argocd app get ops-docs --hard-refresh
argocd app sync ops-docs --revision main
argocd app wait ops-docs --sync --health --timeout 300
argocd app get sub2api --hard-refresh
argocd app sync sub2api
argocd app wait sub2api --sync --health --timeout 600
kubectl -n application rollout status deployment/sub2api --timeout=600s
kubectl -n application get endpointslice \
-l kubernetes.io/service-name=sub2api -o wide
kubectl -n application get statefulset,pod,service,endpoints sub2api-redis
kubectl -n application exec deployment/sub2api -- wget -qO- http://127.0.0.1:8080/healthFor that upgrade, ArgoCD adopted the Git commit at 2026-10-10T09:34:53Z,
observed chart revision 0.1.21, and reported Synced/Healthy; health became
Healthy at 09:37:54Z. The rollout completed 1/1 with zero Pod restarts,
the Service endpoint was ready on port 8080, and the internal /health
response was {"status":"ok"}. The dedicated Redis StatefulSet, Pod, and
endpoint were all ready 1/1.
For the 2026-10-14 upgrade, parent ops-docs was Synced/Healthy at commit
ff542ee8a14d2615233281cf6886ddc5ab8a59e9, operation Succeeded. Child
sub2api target and observed chart were 0.1.22, Synced/Healthy, operation
Succeeded. Deployment desired/updated/ready/available counts were
1/1/1/1, unavailable 0; Pod sub2api-c8d4cd46d-5lb4z was Running/Ready
with 0 restarts and its live image ID matched the expected digest. The ready/
serving Service endpoint was 10.42.0.55:8080; internal /health returned
HTTP 200 with {"status":"ok"}. Dedicated Redis StatefulSet and Pod were
1/1 ready. Redis had 2 historical restarts, the last terminating on
2026-10-07 with exit 255; there were no current Redis errors.
Non-fatal observations were one startup timeout fetching the remote model-price hash, security allowlist warnings, and a historical readiness failure from the replaced Pod. No migration failure was observed; no specific migration is asserted.
The Deployment explicitly uses maxUnavailable: 0 and maxSurge: 1.
Kubernetes adds the new Ready Pod to the EndpointSlice before terminating the
old Pod, and the Service selects only Ready endpoints. This protects new
requests during rollout, but it does not guarantee completion of requests that
are already attached to the terminating Pod. Long generations still require
the application to handle graceful termination and draining correctly.
For the verified 2026-10-17 upgrade, backup artifacts and checksums passed;
pg_restore --list returned 1,226 entries and the /app/data archive listing
contained 10 entries. The chart mirror PR #14 merged as
b1668e30bc274ef7a7d5f72ac0ea8a1193b96984; the anonymously pulled package
matched SHA-256 f4095a555c294065e5c409568435a8d80f04fe5ba025e0672dc84c153302b690.
The OCI manifest digest was
sha256:416a1256412bbe72d9daf472a1a29e43f412552f1cc1d96471950317a038f8e9; Chart
CI #48, Mirror consistency CI #39, Publish Sub2API chart #14, and Pages #115
succeeded. GitOps commit 7b7c409b58c8f4e93c5d167ef7920ba0ead3cc82 changed
only targetRevision from 0.1.22 to 0.1.23.
The parent and child Applications observed the commit and completed
Synced/Healthy, operation Succeeded. Deployment desired/updated/ready/
available counts were 1/1/1/1; Pod sub2api-68ff596d85-58pkb was Ready with
0 restarts and its image ID matched the expected Linux amd64 digest. The Service
had one ready/serving TCP 8080 endpoint and internal /health returned HTTP
200. Redis was 1/1 ready; master and headless endpoints were ready/serving.
One historical readiness warning on the replaced Pod and one unclassified
error-like line in the bounded log tail were observed. There was no current
rollout failure; no specific migration or migration success is asserted.
For the verified 2026-11-08 upgrade, chart mirror PR #16 merged as
ec3138c2beb645cc8db11b4072a952b530f574cf; GHCR Publish Sub2API chart and
Pages workflows succeeded. An independent anonymous Helm pull matched Git
package SHA-256
d10eefce7d341261840a67486205791dd0b87c9f40bb7d2a1dd3e3d69eefd396; the OCI
manifest digest was
sha256:8e0154dcb9af076835444f2dba419d2ca06db71e58a5e3728ef9cd41bb69fb81.
GitOps commit 4f15af66e6257beb6500347ee8ea2107bf379868 changed only
targetRevision from 0.1.24 to 0.1.25. Parent ops-docs observed the
current main commit and was Synced/Healthy; child sub2api was
Synced/Healthy, operation Succeeded, on target and observed chart 0.1.25.
Deployment was 1/1; Pod sub2api-75894b5886-6hm86 was Ready with 0 restarts
and used Linux amd64 image
ghcr.io/wei-shaw/sub2api@sha256:e5da8d1e51cd97fab4464cdfa4e54a1466ecb470ca5ce6d4e740ebeaeef714a0.
The Service endpoint 10.42.0.76:8080 returned HTTP 200
{"status":"ok"} from internal /health; dedicated Redis was 1/1 Ready at
10.42.0.16:6379, and both application PVCs were Bound. No migration details
were verified and no rollback was required. Deployment rollback is a new Git
revert of 4f15af66e6257beb6500347ee8ea2107bf379868 to chart 0.1.24;
database restoration requires an isolated restore and a deliberate reviewed
configuration switch. Do not use kubectl rollout undo as a database rollback.
For the verified 2026-11-11 rollout, ArgoCD was Synced/Healthy on chart
0.1.26; Deployment was 1/1 and Pod sub2api-76bc4bd684-sth24 was Ready with
0 restarts and the expected image digest. Service endpoint
10.42.0.111:8080 and internal and public /health returned
{"status":"ok"}. Dedicated Redis was 1/1 Ready at 10.42.0.16:6379.
Release rollback is a Git revert of
915e943088010bc50448aac8c8e9e71d8d21bd43. Database rollback requires an
isolated restore followed by a deliberate configuration switch; no migration
details are asserted.
For the verified 2026-11-17 upgrade, the backup and validation details are in
Backup & Restore. Mirror PR #18 merged as
7413411632d4e32d6a33d7bc52db579b03493134; the chart package SHA-256 was
59672be451e6152009801c4cccdb2aa20afe95446a41f894b38963b0c39e52a3, and an
anonymous OCI pull returned manifest digest
sha256:a93e2f41274e4cfaa659b1dd041dd0b8751b04778b5d1f5ff1e905783bcb7d06.
Chart CI, mirror CI, publish, and Pages workflows succeeded; the Pages index
and catalog updated. GitOps commit
5df6a6074f4486d0f216747320543586b4e2582f changed only targetRevision from
0.1.26 to 0.1.27.
ArgoCD reported Synced/Healthy on observed chart 0.1.27, with automated
sync Succeeded. Deployment was 1/1; Pod sub2api-7895b77c-qtnhn was Ready
with 0 restarts and the expected image digest. The ready Service endpoint was
10.42.0.193:8080; internal and public /health returned HTTP 200 with
{"status":"ok"}. Dedicated Redis was 1/1 Ready at 10.42.0.16:6379, and
PVCs were Bound. No Warning events were found for the new Pod or Deployment;
rollout briefly waited for the old replica to terminate. Redis has two
historical restarts, unchanged. No migration details are asserted. Deployment
rollback is a new Git revert of
5df6a6074f4486d0f216747320543586b4e2582f; database rollback requires an
isolated restore and deliberate configuration switch.
For the verified 2026-11-18 upgrade, see Backup & Restore. Mirror
PR #19 merged as 13c68a083ef0139d02f36ca246ff7ddf9fda2209; Chart CI and Mirror
CI passed, and publish workflow #44265593722 and Pages workflow #44265594131
succeeded. The anonymous chart pull manifest was
sha256:5d8325234cd55647be4db03132a4d3ee58b45819fbe51eabb9dcc441bd53bb23; its
package SHA-256 was
d1c66a7aca80918b15034eb3d52ad89fe4b19fb50114fb333d1798b30863fbe1. The public
index and catalog list chart 0.1.28 / application 0.2.23. GitOps commit
5dc7236f46c7a62b7474c56e5420b27091e8fb67 changed only
manifests/sub2api-argocd.yaml, updating targetRevision from 0.1.27 to
0.1.28.
ArgoCD parent and child were Synced/Healthy; the Sub2API operation succeeded.
Deployment was 1/1. Pod sub2api-5c9457446-lxs5m had 0 restarts and the expected
image digest. The Service had a ready endpoint; internal and public /health
returned HTTP 200 with {"status":"ok"}. Ingress and TLS were ready, the
dedicated Redis was 1/1 with a ready endpoint, PostgreSQL was Ready, and the
application and Redis PVCs were Bound. Replacement events were normal; Redis
had two historical restarts. No migration details are asserted. Release
rollback is a new Git revert of
5dc7236f46c7a62b7474c56e5420b27091e8fb67; database rollback requires an
isolated restore followed by a deliberate configuration switch.
For the verified 2026-11-21 upgrade, see Backup & Restore. Mirror
PR #20 merged. The chart package SHA-256 was
b69628bb7050dc8f435a9228458ca17e88b44b4ee1a949aa342a9a1aedb3d413; an
anonymous OCI pull and package checksum matched. Mirror CI, Sub2API chart CI,
publish workflow run 44849477770, and Pages workflow run 44849477077
succeeded. GitOps commit 423a4c4a5b2ec115b7934c9e3645956b778dd9ec changed only
targetRevision from 0.1.28 to 0.1.29.
ArgoCD reported Synced/Healthy, operation Succeeded. Deployment was 1/1;
Pod sub2api-75dd49bfc7-ftk89 was Ready with 0 restarts on a Linux/amd64 node,
and its runtime image ID matched
ghcr.io/wei-shaw/sub2api@sha256:329e1fb6b17e84bd8d28c7d1da61fc678a3b68c6a2f99180d65541fd774fc652.
The ready Service endpoint was 10.42.0.240:8080; internal and public
/health returned HTTP 200 with {"status":"ok"}. Dedicated Redis and shared
PostgreSQL were 1/1 Ready with ready endpoints. The Sub2API data, Redis, and
PostgreSQL PVCs (10Gi, 8Gi, and 8Gi) were Bound. No specific migration is
asserted. Deployment rollback is a new Git revert of
423a4c4a5b2ec115b7934c9e3645956b778dd9ec; because migrations are forward-only,
database recovery requires restoring into an isolated database and deliberately
switching configuration.
For the verified 2026-11-24 upgrade, see Backup & Restore. Official
Sub2API v0.2.25 uses Linux amd64 image
ghcr.io/wei-shaw/sub2api@sha256:a532a5f09005081338bd2d503a6f463aef941f3c382dbc8637163c7230c42146.
Mirror PR #21 merged as 7dd06ee87f04159812693f2cb50e4441224135b7. Candidate
chart and mirror consistency CI passed at head 0433ddad5e515abbee80559eaab592a4ce280f38
(runs 45395651473 and 45395651445). Publish Sub2API chart run
45395933800 and Pages run 45395928993 succeeded. An anonymous Helm pull of
chart 0.1.30 returned OCI manifest digest
sha256:7179980e0cad76cf76f8d56f6160f5d1fa6b5239eff29bdf42a3b1c96a83ec43; its
package SHA-256 was
7ba8e62a7c1f8b9630662ecae1add51a9f653f83f69faba3b62491c905ec54f4, matching
the main index and package. The catalog and index list chart 0.1.30 / app
0.2.25. GitOps commit 015df28d461ba3758e907b5ec6ebf85641895859 changed
only manifests/sub2api-argocd.yaml, from targetRevision 0.1.29 to 0.1.30.
ArgoCD reported Synced/Healthy, operation Succeeded; Deployment was 1/1.
Pod sub2api-6b96465975-wsm8z was Running/Ready with 0 restarts, on Linux
amd64, and both its image spec and image ID matched the pinned digest. The ready
Service endpoint was 10.42.0.249; internal and public /health returned HTTP
200 with {"status":"ok"}. Dedicated Redis and shared PostgreSQL were Ready;
the Sub2API data (10Gi), Redis (8Gi), and PostgreSQL (8Gi) PVCs were Bound. No
specific migration is asserted. Deployment rollback is a new Git revert of
015df28d461ba3758e907b5ec6ebf85641895859. Migrations are forward-only;
database recovery requires an isolated restore followed by a deliberate
configuration switch.
For the verified 2026-11-28 upgrade, see Backup & Restore. The
official Sub2API v0.2.26 Linux amd64 image is
ghcr.io/wei-shaw/sub2api@sha256:4499efd416ae3b6345c71fbd85886473395baa2c6396cbd8af8705b6bb476a26.
Mirror PR #22 merged as f8ab0b2388b449c6b9bad29b5a8cbdd131c83061; candidate
head 74077577dd3e056e10d6d8108bb63b7cdb75f77d passed Sub2API chart CI run
46132508595 and Mirror consistency CI run 46132508696. Publish run
46132590294 and Pages run 46132589995 succeeded. An anonymous OCI chart pull
returned manifest digest
sha256:611dd601f77318f06d1f54af70ccbeddabd0f4b1e4874498c2677c791ec21fbd; its
package SHA-256 341628d2e744b71f0e0461161da481e8887b4b8b648649f7ef4aedf7d49b5361
matched the main index and package. The index and catalog list chart 0.1.31 /
app 0.2.26. GitOps commit 360efa3b7725606c09f93db6751201d3691e7b17
changed only targetRevision, from 0.1.30 to 0.1.31.
At 2026-11-28 10:10:25 UTC, ArgoCD was Synced/Healthy, operation
Succeeded; Deployment was 1/1. Pod sub2api-56b956cfcf-w5zng was
Running/Ready with 0 restarts, and its image spec and runtime image ID matched
the expected digest on Linux/amd64. The ready Service endpoint was
10.42.0.50:8080; internal and public /health returned HTTP 200 with
{"status":"ok"}. Dedicated Redis was 1/1 ready with 2 historical restarts;
shared PostgreSQL was 1/1 ready with 1 historical restart. Sub2API data (10Gi),
Redis (8Gi), and PostgreSQL (8Gi) PVCs were Bound. No specific migration is
asserted. Deployment rollback is a new Git revert of
360efa3b7725606c09f93db6751201d3691e7b17; because migrations are forward-only,
database recovery requires an isolated restore followed by a deliberate
configuration switch.
4.verify the public and authenticated model path
curl -fsS https://token.72602.space/health
curl -fsS https://token.72602.space/api/v1/settings/public
set +x
read -rsp 'Sub2API API token: ' SUB2API_API_TOKEN; printf '\n'
curl -fsS \
-H "Authorization: Bearer ${SUB2API_API_TOKEN}" \
https://token.72602.space/v1/models
read -rp 'Model ID for smoke generation: ' MODEL_ID
curl -fsS https://token.72602.space/v1/chat/completions \
-H "Authorization: Bearer ${SUB2API_API_TOKEN}" \
--json "{\"model\":\"${MODEL_ID}\",\"messages\":[{\"role\":\"user\",\"content\":\"Reply with OK.\"}],\"max_tokens\":8}"
unset SUB2API_API_TOKEN MODEL_IDAdmin MCP
The Ops Agent Pod runs a local MCP server sub2api-admin against the
cluster-local endpoint
http://sub2api.application.svc.cluster.local:8080. The Deployment
injects the API key from the dedicated runtime Secret
application/sub2api-mcp key admin-api-key. Provision the Secret
through manifests/ops-agent/create-sub2api-mcp-secret.sh; the value
never enters Git or opencode.json. The MCP only accepts the configured
cluster-local host, every authenticated GET runs through a reviewed route
allowlist, sensitive fields are recursively redacted, and no generic
authenticated write tool is exposed.
Enter the key only into the helper’s silent interactive prompt. Never place the key in shell arguments, chat, Git, OpenCode config, logs, or command output.
Tools
Nine tools are registered:
| Tool | Purpose |
|---|---|
sub2api-admin_describe |
Capabilities and safety constraints |
sub2api-admin_health |
Anonymous check of /health through the configured internal cluster-local URL (SUB2API_BASE_URL), not the public host |
sub2api-admin_read |
One allowlisted authenticated GET route |
sub2api-admin_find_user |
Resolve exactly one user by normalized email |
sub2api-admin_preview_recharge |
Non-mutating preview of an additive credit |
sub2api-admin_recharge |
Additive credit with backend idempotency |
sub2api-admin_update_user_limits |
Per-user RPM and/or concurrency |
sub2api-admin_set_account_schedulable |
Enable or disable scheduling for an entire upstream account |
sub2api-admin_model_control_options |
Explain the available scheduling boundaries and rate-limit scopes |
The global OpenCode permission set denies every sub2api-admin_* tool.
The 72602-k3s-maintainer agent allows the six read-only tools directly
and asks before recharge, update_user_limits, or
set_account_schedulable. Use the maintainer for any authenticated
mutation.
Recharge protocol
Recharge is additive USD-style internal credit only; set and subtract
operations are not exposed. Before every charge:
- Collect an exact email and a positive amount.
- Call
sub2api-admin_preview_recharge. The server fuzzy-searches but accepts only one exact normalized email match. - Read back the matched email, the immutable user id, status, the current balance, the amount, and the expected balance; obtain explicit confirmation for that exact tuple.
- Generate one stable
Idempotency-Keyof 16-128 URL-safe characters. Keep and reuse that key when the result is uncertain; never generate a fresh key for a retry. - Call
sub2api-admin_rechargewithoperation: add, the exact email and id, the audit note, and the idempotency key. - Re-read the user and balance history; record the exact
verifiedoraccepted_unverifiedoutcome. Never rewrite an unverified accepted response as success.
No account is recharged as part of installation. Do not recharge inactive users unless the operator explicitly confirms the inactive status.
Limits and model availability
Sub2API v0.1.176 has no configurable per-model RPM. Operator scope:
- User RPM and concurrency via
sub2api-admin_update_user_limits. - Group RPM is set through the admin UI; this MCP does not expose it.
rate_multiplierchanges billing, not request rate.
For temporary model unavailability, call
sub2api-admin_model_control_options first and identify the model’s
actual scheduling boundary:
- Dedicated account:
sub2api-admin_set_account_schedulabletoggles every model served by that account; roll back with the inverse value. - Restricted channel: remove the exact model from the channel
pricing/model list while
restrict_models=true; preserve the previous payload for rollback. This MCP does not mutate channels, use the admin UI. - Composite model: disable the exact composite route; preserve prior state. Use the admin UI.
models_list_configonly hides discovery. It does not block direct requests and must never be reported as a disable.
Scheduling changes affect new requests only. They do not cancel requests or streams already in progress. If the model spans multiple accounts, channels, or routes, enumerate and confirm every affected target before mutation.
Secret rotation
Sub2API supports only one Admin API Key. Generating or regenerating the key in the admin UI immediately invalidates the previous key, so the MCP will briefly fail to authenticate until the Ops Agent workload restarts with the new value. Plan an expected maintenance window of one to two restart cycles. Rotate in this exact order without intermediate pauses:
- Generate the new key in the Sub2API admin UI and immediately enter it
into the silent prompt of
manifests/ops-agent/create-sub2api-mcp-secret.sh. Confirm the helper reportsapplication/sub2api-mcp keys=admin-api-key. - Restart the managed workload so the new env var is injected:
kubectl -n application rollout restart deployment/ops-agent kubectl -n application rollout status deployment/ops-agent --timeout=300s - Verify authenticated
GET /api/inforeturns HTTP200and version2.4.2;GET /api/mcpreportssub2api-adminwithstatus.status=connected; andGET /api/configcarries the cluster-localSUB2API_BASE_URLin the/workspace/.opencode/opencode.jsonentry without the new key. Basic auth always uses usernameopencode; its fixed password is injected asOPENCODE_PASSWORDfrom Secretopencode-basic-authkeypassword. - Through
72602-k3s-maintainer, runsub2api-admin_readagainst/api/v1/admin/system/version; the live application must respond0.1.176.
The upstream “generate key” action is itself the invalidation step; no follow-up disable of the previous key is needed or supported.
Tests: node --test .opencode/mcp/sub2api-admin/server.test.mjs passes
three tests covering the allowlist, path-traversal rejection, and the
recharge idempotency path.
GitOps Rollback
Restore the previous reviewed chart and image values with a new Git revert
commit, then let ArgoCD converge. To return the 2026-11-08 release to chart
0.1.24, revert its GitOps change and sync the parent and child Applications:
git -C /home/aaron/Ops/docs log --oneline -- manifests/sub2api-argocd.yaml
git -C /home/aaron/Ops/docs revert 4f15af66e6257beb6500347ee8ea2107bf379868
git -C /home/aaron/Ops/docs push origin HEAD:main
argocd app get ops-docs --hard-refresh
argocd app sync ops-docs --revision main
argocd app wait ops-docs --sync --health --timeout 300
argocd app sync sub2api
argocd app wait sub2api --sync --health --timeout 600An image/chart rollback does not reverse a database change. If database
rollback is required, restore the pre-upgrade dump into an isolated database
and switch configuration deliberately through a reviewed Git change. Do not
use kubectl rollout undo; do not delete PVCs or Secrets as a rollback step.
Troubleshooting
kubectl -n application logs deployment/sub2api --since=10m
kubectl -n application get events --sort-by=.lastTimestamp
kubectl -n application get endpointslice \
-l kubernetes.io/service-name=sub2api -o yaml
argocd app get sub2api --hard-refresh