Skip to content

ci: deploy releases to the K3s cluster - #1

Merged
SeasonsChange422 merged 1 commit into
previewfrom
ci/deploy-to-k3s
Nov 11, 2026
Merged

SeasonsChange422 merged 1 commit into
previewfrom
ci/deploy-to-k3s

Conversation

@SeasonsChange422

Copy link
Copy Markdown
Member

Production moved from Docker on 207.57.124.102 to the K3s cluster (k3s.seasonschange.cn) on 2026-11-11. The service is already running there; this PR only changes how releases reach it.

Changes

  • Adds deployments/k3s/plane.yaml, the manifests running in the cluster, with __DOCKER_USERNAME__/__VERSION__ placeholders. Also adds migrator-job.yaml and backup-job.yaml
  • deploy job:
    1. pg_dump into PVC plane-predeploy-backups (last 5 kept)
    2. Runs the migrator Job
    3. Applies the manifests and waits for every Deployment. If any fails, it runs rollout undo on all application Deployments; migrations are not reversed
    4. Checks https://plane.tmlab.top
  • The prepare job validates KUBE_CONFIG instead of SERVER_IP/USER/PWD. promote is unchanged

Verification

  • kubectl diff against the running cluster shows no changes other than the new backup PVC
  • The whole deploy job (render, backup, migrate, roll out) was run with the CI ServiceAccount at the current version v1.2.9-hotfix.6. Everything succeeded and no pod was restarted

Secrets

  • KUBE_CONFIG is set: a kubeconfig for ServiceAccount plane/ci-deployer
  • SERVER_* are now used only by the manual Deployment Preflight workflow, which still targets the old Docker host

🤖 Generated with Claude Code

Plane moved from docker compose on 207.57.124.102 to the K3s cluster
(namespace plane, database "plane" in the shared CloudNativePG cluster
pg-main). The deploy job no longer uses sshpass and deploy.sh:

- add deployments/k3s/plane.yaml (the manifests running in the cluster,
  with __DOCKER_USERNAME__/__VERSION__ placeholders), migrator-job.yaml and
  backup-job.yaml
- deploy job: pg_dump into PVC plane-predeploy-backups, run the migrator
  Job, apply the manifests, wait for every Deployment and roll the
  application Deployments back if any of them fails, then check the public
  URL
- prepare job validates KUBE_CONFIG instead of SERVER_IP/USER/PWD
- needs repository secret KUBE_CONFIG (ServiceAccount plane/ci-deployer)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SeasonsChange422
SeasonsChange422 merged commit 7f1d21a into preview Nov 11, 2026
11 checks passed
@SeasonsChange422
SeasonsChange422 deleted the ci/deploy-to-k3s branch November 11, 2026 04:36
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