Skip to content

feat(maintenance): maintenance page workflow, two replicas for landing page and service, test + staging on chart 2.4.0 - #146

Draft
Mtze wants to merge 1 commit into
mainfrom
feat/maintenance-page
Draft

Mtze wants to merge 1 commit into
mainfrom
feat/maintenance-page

Conversation

@Mtze

@Mtze Mtze commented Sep 29, 2026

Copy link
Copy Markdown
Member

Why

During deploys EduIDE sometimes showed raw HTTP errors. EduIDE/EduIDE-Helm#47 (chart 2.4.0) adds a maintenance page served by Envoy while the landing page has no ready pod, and makes rolling updates keep a ready pod. This PR uses it.

Draft until chart 2.4.0 is released. Validate checks that every pinned chart version is published.

What

  • .github/workflows/maintenance.yml (new, workflow_dispatch): environment, mode: on|off.
    • on: checks that the landing-maintenance-page policy exists, then scales landing-page-deployment to 0.
    • off: scales it back to landingPage.replicas (scripts/landing-replicas.sh: env values over _base.yaml over 1).
    • Both then curl the landing host and assert 503 + the maintenance page, or 200.
    • Shares the deploy-<env> concurrency group and runs the same cluster identity check as Deploy.
  • deploy.yml: warns (annotation + summary) when the landing page is at 0 replicas before an upgrade, because the deploy ends maintenance.
  • _base.yaml: landingPage.replicas: 2, service.replicas: 2. The service keeps its state in the cluster, so two pods are safe.
  • bonn, mannheim: podDisruptionBudget.enabled: false. parma is a single node, where a PDB makes kubectl drain wait forever.
  • Pins: test1-3, e2e, staging -> 2.4.0. Production, bonn and mannheim follow in a separate PR.
  • Docs: README deploy table, docs/github-environments.md.

Tests

  • scripts/test-deploy-logic.sh: replica resolution (chart default / _base / env override / unknown env / every real env), and PDBs off on the eduide cluster.
  • With EDUIDE_CHART pointing at the EduIDE-Helm#47 branch, every environment renders against it.
  • actionlint clean.

Verified on test1

Chart from EduIDE-Helm#47 with exactly these values:

  • maintenance on (scale to 0) -> 503 + page.
  • off (scale to 2) -> 200.
  • A deploy while at 0 restores 2/2.

The workflow itself can only be dispatched once it is on main.

🤖 Generated with Claude Code

…eplicas for landing page and service

maintenance.yml scales the landing page to 0 (on) or back to
landingPage.replicas (off). Chart 2.4.0 then serves the maintenance page from
Envoy. It shares the deploy concurrency group and checks what visitors get.
Any deploy ends maintenance, so deploy.yml warns when it finds the landing
page at 0.

_base.yaml runs two landing page and REST service pods. bonn and mannheim turn
PodDisruptionBudgets off: parma is a single node, where a PDB blocks every
drain. Test and staging environments move to chart 2.4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 08:10
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Maintenance activation is not idempotent, and chart 2.4.0 is not yet published.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds controlled maintenance mode and improved landing/service availability.

Changes:

  • Adds maintenance workflow and replica-resolution tests.
  • Configures two replicas and disables PDBs on the single-node cluster.
  • Pins test/staging environments to chart 2.4.0.
File Description
.github/​workflows/​maintenance.yml Adds maintenance controls and verification.
.github/​workflows/​deploy.yml Warns when deployment ends maintenance.
scripts/​landing-replicas.sh Resolves the configured landing replica count.
scripts/​test-deploy-logic.sh Tests replica and PDB configuration.
environments/​_base.yaml Sets landing and service replicas to two.
environments/​bonn.eduide.aet.cit.tum.de/​values.yaml Disables PDBs on the single-node cluster.
environments/​mannheim.eduide.aet.cit.tum.de/​values.yaml Disables PDBs on the single-node cluster.
environments/​test1.eduide.student.k8s.aet.cit.tum.de/​env.yaml Pins chart 2.4.0.
environments/​test2.eduide.student.k8s.aet.cit.tum.de/​env.yaml Pins chart 2.4.0.
environments/​test3.eduide.student.k8s.aet.cit.tum.de/​env.yaml Pins chart 2.4.0.
environments/​e2e.eduide.student.k8s.aet.cit.tum.de/​env.yaml Pins chart 2.4.0.
environments/​staging.eduide.student.k8s.aet.cit.tum.de/​env.yaml Pins chart 2.4.0.
README.md Documents maintenance operation.
docs/​github-environments.md Documents workflow environment usage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

run: |
set -euo pipefail
kubectl -n "$NS" scale deploy/landing-page-deployment --replicas=0
kubectl -n "$NS" wait --for=delete pod -l app=landing-page --timeout=2m

This branch has not been deployed

No deployments
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.

2 participants