Skip to content

Apply k8 manifests on autoupdate so config changes reach prod - #338

Merged
mxschmitt merged 1 commit into
mainfrom
fix/autoupdate-apply-manifests
Oct 26, 2026
Merged

mxschmitt merged 1 commit into
mainfrom
fix/autoupdate-apply-manifests

Conversation

@mxschmitt

Copy link
Copy Markdown
Owner

Problem

upgrade_k3s_containers.sh only pulled images and ran rollout restart. It never applied k8/, so production stayed on manifests from Jan 30:

Changes

  • Regenerate (k8/generate.sh) and kubectl apply -f k8/ on every deploy, using secrets from /etc/try-playwright/env. The deploy fails loudly if that file is missing.
  • RETIRED_RESOURCES: resources removed from k8/ get deleted, since apply never deletes anything. Starts with deployment/minio and service/minio.
  • Pull and restart log-aggregator too.
  • Readiness probe on file (/api/v1/health, served only after the bucket check succeeds).
  • After deploy, check object storage: HEAD on a missing object must return 404 (a storage outage returns 5xx).
  • Use rollout status instead of kubectl wait -l …, which failed with NotFound on pods that were still terminating after the restart.
  • README/CONTRIBUTING: document the env file and the automatic update flow.

Production

  • Already migrated by hand: env file created, manifests applied, MinIO removed. Upload plus public download through /file-uploads/ works.
  • Ran this branch's deploy phase (--continue) against the cluster with a temporary state dir. It finished deployed test successfully.

🤖 Generated with Claude Code

upgrade_k3s_containers.sh only pulled images and restarted deployments, so
manifest changes never reached the cluster. The RustFS migration (#308) and
the /file-uploads ingress route (#334) were never applied in production;
file-service kept pointing at MinIO, whose Docker Hub image no longer
exists, and crash-looped after the Oct 8 reboot.

- Regenerate and apply k8/ on every deploy using /etc/try-playwright/env
- Delete resources removed from k8/ via RETIRED_RESOURCES (MinIO for now)
- Pull and restart log-aggregator as well
- Add a readiness probe to file-service so a pod without storage is not ready
- Check object storage after deploy, not only control health
- Wait with rollout status instead of `kubectl wait -l`, which fails on
  pods that are still terminating

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T03:22:20.411801Z 95f1b58 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mxschmitt
mxschmitt merged commit af9a83e into main Oct 26, 2026
11 checks passed
@mxschmitt
mxschmitt deleted the fix/autoupdate-apply-manifests branch October 26, 2026 06:27
@flakiness-io

flakiness-io Bot commented Oct 26, 2026

Copy link
Copy Markdown

Test Results Summary

This comment shows the latest test results for this pull request.

Commit Status Test Results CI Runs
95f1b58 ✅ Passed 50 passed · 1 flaky 1 runs
⚠️ 1 flaky

⚠️ Ubuntu 24.04 · firefox e2e/tests/visual.spec.ts:137 › should handle platform core related features › should handle the timeout correctly

View full report

ℹ️ About Flakiness.io in GitHub

Your team has set up Flakiness.io pull request comments. This comment is updated when

  • The first test results arrive for this pull request
  • A later run reports more results for the same commit
  • A new commit is pushed and tested

Flakiness.io rewrites the comment in place, so it always reflects the most recently tested commit.

mxschmitt added a commit that referenced this pull request Oct 26, 2026
* Harden autoupdate deploy and recover the RustFS bucket

Follow-ups to #338:
- file-service health checks the bucket and recreates it when missing
  (RustFS uses an emptyDir, so a RustFS restart drops the bucket)
- readiness probe timeout raised to fit the storage check
- autoupdate: generate manifests before pulling images, source the env
  file only in that subshell, delete workers before applying manifests,
  and time-box the health check requests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Address review: keep worker deletion after apply, retry expiry rule

- Revert deleting workers before apply: a failing apply or rustfs wait
  would leave control with only deleted workers
- Retry the bucket lifecycle rule until it is set
- Don't exit on startup when storage is not reachable yet; stay up and
  let the readiness probe report it
- Keep both errors when bucket creation and the existence check fail

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant