Skip to content

Conversation

@nygrenh
Copy link
Member

@nygrenh nygrenh commented Jan 5, 2026

These are conservative so that it's unlikely that high load could trigger these

Summary by CodeRabbit

  • Infrastructure

    • Added comprehensive health probes (startup, liveness, readiness) and lightweight /status/up endpoints across services for improved startup validation, ongoing health checks, and consistent readiness reporting.
    • Updated health routing/behavior for more uniform monitoring.
  • Chores

    • Increased production replicas for frontend and CMS to improve availability.
    • In development, liveness/readiness probes are disabled (startup probe retained) to reduce log noise.

✏️ Tip: You can customize this high-level summary in your review settings.

These are conservative so that it's unlikely that high load could trigger these
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Warning

Rate limit exceeded

@nygrenh has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fafa9a5 and 1ed5520.

📒 Files selected for processing (9)
  • kubernetes/README.md
  • kubernetes/base/cms/deployment.yml
  • kubernetes/base/course-material/deployment.yml
  • kubernetes/base/example-exercise/deployment.yml
  • kubernetes/base/headless-lms/deployment.yml
  • kubernetes/base/main-frontend/deployment.yml
  • kubernetes/base/quizzes/deployment.yml
  • kubernetes/base/tmc/deployment.yml
  • kubernetes/dev/kustomization.yaml
📝 Walkthrough

Walkthrough

Adds HTTP health endpoints to multiple services and configures Kubernetes startup/liveness/readiness probes for several deployments; refactors headless-lms healthz -> health module and introduces connectivity and up routes (including a DB connectivity check).

Changes

Cohort / File(s) Summary
Kubernetes health probes
kubernetes/base/cms/deployment.yml, kubernetes/base/course-material/deployment.yml, kubernetes/base/example-exercise/deployment.yml, kubernetes/base/headless-lms/deployment.yml, kubernetes/base/main-frontend/deployment.yml, kubernetes/base/quizzes/deployment.yml, kubernetes/base/tmc/deployment.yml
Adds startupProbe, livenessProbe, and readinessProbe to each container spec. Probes use HTTP GET against service-specific /.../api/status/up paths on service ports with configured initialDelaySeconds, periodSeconds, timeoutSeconds, successThreshold, and failureThreshold.
Next.js status endpoints
services/cms/src/pages/api/status/up.ts, services/course-material/src/pages/api/status/up.ts, services/example-exercise/src/pages/api/status/up.ts, services/main-frontend/src/pages/api/status/up.ts, services/quizzes/src/pages/api/status/up.ts, services/tmc/src/pages/api/status/up.ts
Adds simple Next.js API routes that respond 200 with JSON true (NextApiRequest, NextApiResponse<boolean> handlers).
Headless-lms health controller refactor
services/headless-lms/server/src/controllers/health.rs, services/headless-lms/server/src/controllers/healthz.rs, services/headless-lms/server/src/controllers/mod.rs
Removes old healthz handler/routes; adds new health.rs exposing connectivity() (DB connectivity check) and up() endpoints; updates controllers mod from pub mod healthz; to pub mod health;.
Frontend health client config
services/main-frontend/src/services/healthzClient.ts
Changes Axios baseURL from /api/v0/healthz to /api/v0/health.
Kustomize / environment patches
kubernetes/production/kustomization.yaml, kubernetes/dev/kustomization.yaml, kubernetes/dev/patch-disable-probes.yml
In production kustomization, increases replicas for main-frontend and cms. In dev, adds a patch to remove liveness/readiness probes (keeps startup probe) via patch-disable-probes.yml.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Kubelet
  participant Pod
  participant Service as HTTP Handler
  participant DB
  rect rgba(220,235,255,0.6)
    Note over Kubelet,Pod: Kubernetes probes (startup/liveness/readiness)
  end
  Kubelet->>Pod: HTTP GET /<service>/api/status/up
  Pod->>Service: Forward HTTP request
  alt headless-lms /connectivity
    Service->>DB: simple query (SELECT 1)
    DB-->>Service: query result
    Service-->>Pod: 200 true
  else simple /up endpoints
    Service-->>Pod: 200 true
  end
  Pod-->>Kubelet: HTTP 200 (healthy) / non-200 (unhealthy)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Status logic fixes #1596: touches headless-lms health subsystem and may overlap with the new/renamed health endpoints and connectivity checks.
  • Status api endpoint #1595: modifies headless-lms health controllers/routing and may relate to the controller refactor and route changes.

Poem

🐰 I hopped through pods and endpoints bright,
Probed the up path in morning light.
DB whispered "ok", the servers said "true",
Readiness bounced, liveness too —
All systems hum; I twitched, then cheered. 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding health probes to Kubernetes deployments and status endpoints across multiple services.

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In @services/headless-lms/server/src/controllers/health.rs:
- Around line 1-3: Update the module doc comment at the top of the file to
reference the correct endpoint path (/api/v0/health) instead of /api/v0/healthz;
locate the module-level doc string in the health.rs file (the /*! ... */ comment
block) and change the path text so the documentation matches the renamed module
and the client baseURL update.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kubernetes/base/quizzes/deployment.yml (1)

47-62: Add container security context.

The quizzes deployment lacks security hardening. No securityContext is defined in this file, and no cluster-level PodSecurityPolicy or PodSecurityStandard enforcement was detected. Other deployments in this repository (e.g., headless-lms) include securityContext configurations.

Add the following to the container spec:

securityContext:
  allowPrivilegeEscalation: false
  runAsNonRoot: true
  runAsUser: 1000
🧹 Nitpick comments (5)
services/tmc/src/pages/api/status/up.ts (1)

3-5: LGTM! Conservative health check endpoint.

The implementation correctly provides a minimal health probe that only verifies the Node.js process can respond to HTTP requests. This aligns with the PR's conservative approach to avoid false positives under high load.

For future consideration, you might want to add more comprehensive health checks (database connectivity, memory usage, downstream service availability) as separate endpoints that probes can optionally call based on their tolerance for complexity.

services/main-frontend/src/services/healthzClient.ts (1)

3-7: LGTM! BaseURL correctly updated to match backend route change.

The path update aligns with the backend module rename from healthz to health.

Optionally, consider renaming healthzClient to healthClient in a future refactor to maintain naming consistency with the endpoint path, though this would be a breaking change for existing consumers.

services/main-frontend/src/pages/api/status/up.ts (1)

1-5: LGTM! Simple status endpoint aligns with conservative health check strategy.

The lightweight implementation returns true without performing deep health checks, which aligns with the PR objective of minimizing load impact during high-traffic periods. This pattern is consistently applied across all services.

Optional: Consider adding a brief comment

Per coding guidelines, a short comment explaining the endpoint's purpose would clarify intent:

 import type { NextApiRequest, NextApiResponse } from "next"
 
+// Status endpoint for Kubernetes health probes (startup, liveness, readiness).
+// Returns true without deep checks to remain lightweight under load.
 export default (_req: NextApiRequest, res: NextApiResponse<boolean>): void => {
   res.status(200).json(true)
 }
kubernetes/base/cms/deployment.yml (2)

63-71: Consider reducing timeoutSeconds below periodSeconds for the startup probe.

The startup probe configuration has timeoutSeconds: 1 and periodSeconds: 1, which could cause overlapping checks if a request takes the full timeout duration. Setting timeoutSeconds to less than periodSeconds (e.g., timeoutSeconds: 1 with periodSeconds: 2) would provide a clearer separation between probe attempts.

🔎 Suggested adjustment
           startupProbe:
             httpGet:
               path: /api/status/up
               port: 3000
             initialDelaySeconds: 0
-            periodSeconds: 1
+            periodSeconds: 2
             timeoutSeconds: 1
             successThreshold: 1
-            failureThreshold: 60
+            failureThreshold: 30

This maintains the same overall 60-second startup window while avoiding potential timing overlap.


47-62: Consider adding security context to prevent privilege escalation.

Static analysis tools have flagged that the container should explicitly disable privilege escalation and avoid running as root. While unrelated to the health probe changes, these are recommended security best practices.

🔎 Suggested security hardening
         - name: cms
           image: cms
           ports:
             - containerPort: 3000
               name: cms
+          securityContext:
+            allowPrivilegeEscalation: false
+            runAsNonRoot: true
+            runAsUser: 1000
           env:
             - name: NEXT_PUBLIC_BASE_PATH
               value: "/cms"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3777020 and 59ce711.

📒 Files selected for processing (17)
  • kubernetes/base/cms/deployment.yml
  • kubernetes/base/course-material/deployment.yml
  • kubernetes/base/example-exercise/deployment.yml
  • kubernetes/base/headless-lms/deployment.yml
  • kubernetes/base/main-frontend/deployment.yml
  • kubernetes/base/quizzes/deployment.yml
  • kubernetes/base/tmc/deployment.yml
  • services/cms/src/pages/api/status/up.ts
  • services/course-material/src/pages/api/status/up.ts
  • services/example-exercise/src/pages/api/status/up.ts
  • services/headless-lms/server/src/controllers/health.rs
  • services/headless-lms/server/src/controllers/healthz.rs
  • services/headless-lms/server/src/controllers/mod.rs
  • services/main-frontend/src/pages/api/status/up.ts
  • services/main-frontend/src/services/healthzClient.ts
  • services/quizzes/src/pages/api/status/up.ts
  • services/tmc/src/pages/api/status/up.ts
💤 Files with no reviewable changes (1)
  • services/headless-lms/server/src/controllers/healthz.rs
🧰 Additional context used
📓 Path-based instructions (2)
**/*

⚙️ CodeRabbit configuration file

**/*: Avoid banner-style section divider comments ("comment banners"), such as long separator bars, repeated dashes, or loud numbered headers used to split a file into sections (e.g. // ----------------------------------------------------------------------, // 1. INPUT STATE, /* ======= */). Prefer clearer naming, smaller focused modules/files, and normal short comments; do not suggest adding new comment banners, and when they appear in new or modified code, suggest removing them and improving structure instead.
Prefer comment quality over comment quantity. Do not add comments that simply restate what the code already says, narrate control flow, or explain obvious syntax — these may help readers unfamiliar with programming, but they hinder developers by adding noise and slowing down code reading. Comments should be concise, factual, and purposeful, and should communicate information that is not immediately obvious from the code itself (e.g., rationale and intent, constraints or invariants, edge cases, surprising behavior, important assumptions, performance or correctness considerations, or things future maintainers must keep in mind).
Require consistent, minimal function documentation. While some simple or self-explanatory functions or components may not strictly need comments, it is generally preferable to include a short, plain-language description of what the function is for, to clarify intent and complement (not repeat) a descriptive function name. Comments should add meaning rather than paraphrasing the name or implementation. Public interfaces should have clearer and more comprehensive documentation, but many private or internal functions also benefit from a brief comment explaining their role, assumptions, or relevant context.
Protect useful existing comments. Do not remove comments that capture non-obvious rationale, warnings, historical context, or design decisions unless they are clearly outdated or made irrelevant by the change. If a modification ...

Files:

  • kubernetes/base/tmc/deployment.yml
  • kubernetes/base/main-frontend/deployment.yml
  • services/main-frontend/src/pages/api/status/up.ts
  • services/example-exercise/src/pages/api/status/up.ts
  • kubernetes/base/course-material/deployment.yml
  • services/main-frontend/src/services/healthzClient.ts
  • kubernetes/base/example-exercise/deployment.yml
  • kubernetes/base/cms/deployment.yml
  • services/tmc/src/pages/api/status/up.ts
  • services/headless-lms/server/src/controllers/health.rs
  • services/cms/src/pages/api/status/up.ts
  • kubernetes/base/quizzes/deployment.yml
  • services/course-material/src/pages/api/status/up.ts
  • services/headless-lms/server/src/controllers/mod.rs
  • services/quizzes/src/pages/api/status/up.ts
  • kubernetes/base/headless-lms/deployment.yml
**/*.rs

⚙️ CodeRabbit configuration file

**/*.rs: No unwraps at all in non-test code. Avoid also .expect() calls outside of tests, with the exception when the program is starting up so that it would crash immediately for example when an environment variable is not set.
No sql queries in code that is not within the models crate. If one needs to fetch data from the database, instead add a new function to the models crate and call that one.

Files:

  • services/headless-lms/server/src/controllers/health.rs
  • services/headless-lms/server/src/controllers/mod.rs
🧠 Learnings (1)
📚 Learning: 2024-12-03T09:10:44.098Z
Learnt from: nygrenh
Repo: rage/secret-project-331 PR: 1342
File: services/headless-lms/server/src/controllers/course_material/courses.rs:922-938
Timestamp: 2024-12-03T09:10:44.098Z
Learning: In `services/headless-lms/server/src/controllers/course_material/courses.rs`, when implementing endpoint functions that should be accessible to all users with access to the course material (e.g., students, assistants), use `authorize_access_to_course_material` instead of `authorize` with `Act::Teach` for authorization.

Applied to files:

  • services/headless-lms/server/src/controllers/mod.rs
🧬 Code graph analysis (6)
services/main-frontend/src/pages/api/status/up.ts (5)
services/cms/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/course-material/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/example-exercise/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/quizzes/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/tmc/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/tmc/src/pages/api/status/up.ts (5)
services/cms/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/course-material/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/example-exercise/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/main-frontend/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/quizzes/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/headless-lms/server/src/controllers/health.rs (2)
services/headless-lms/server/src/controllers/main_frontend/status.rs (1)
  • system_health (341-391)
services/headless-lms/server/src/domain/authorization.rs (1)
  • skip_authorize (276-278)
services/cms/src/pages/api/status/up.ts (5)
services/course-material/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/example-exercise/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/main-frontend/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/quizzes/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/tmc/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/course-material/src/pages/api/status/up.ts (5)
services/cms/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/example-exercise/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/main-frontend/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/quizzes/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/tmc/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/quizzes/src/pages/api/status/up.ts (5)
services/cms/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/course-material/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/example-exercise/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/main-frontend/src/pages/api/status/up.ts (1)
  • _req (3-5)
services/tmc/src/pages/api/status/up.ts (1)
  • _req (3-5)
🪛 Checkov (3.2.334)
kubernetes/base/tmc/deployment.yml

[medium] 15-90: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-90: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/main-frontend/deployment.yml

[medium] 15-91: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-91: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/course-material/deployment.yml

[medium] 15-89: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-89: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/example-exercise/deployment.yml

[medium] 15-89: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-89: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/cms/deployment.yml

[medium] 15-89: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-89: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/quizzes/deployment.yml

[medium] 15-89: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-89: Minimize the admission of root containers

(CKV_K8S_23)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build-and-deploy
  • GitHub Check: build-and-system-tests
  • GitHub Check: code-style
  • GitHub Check: headless_lms
🔇 Additional comments (14)
services/headless-lms/server/src/controllers/mod.rs (1)

16-16: LGTM! Clean module rename.

The refactor from healthz to health is consistent across both the module declaration and route configuration.

Also applies to: 57-57

services/cms/src/pages/api/status/up.ts (1)

1-5: LGTM! Consistent with the health check pattern.

The endpoint follows the same conservative implementation as the other services, providing a reliable startup/liveness/readiness probe target.

services/course-material/src/pages/api/status/up.ts (1)

1-5: LGTM! Consistent implementation.

The endpoint correctly implements the health check pattern used across all services.

services/example-exercise/src/pages/api/status/up.ts (1)

1-5: LGTM! Completes the health check pattern.

The endpoint correctly implements the same conservative health check approach used across all other services in this PR.

kubernetes/base/example-exercise/deployment.yml (1)

63-89: LGTM! Health probe configuration is well-structured.

The three-tier probe strategy (startup → liveness → readiness) is properly configured with appropriate timing parameters:

  • Startup allows 60 seconds for initialization
  • Liveness begins after startup completes with conservative thresholds
  • Readiness provides immediate feedback for traffic routing
services/headless-lms/server/src/controllers/health.rs (2)

10-18: LGTM! Database connectivity check is appropriately lightweight.

The SELECT 1 query is a minimal operation suitable for health checks, and the use of skip_authorize() correctly allows unauthenticated access to this endpoint.


20-32: LGTM! Simple health check endpoint and route configuration.

The /up endpoint provides a lightweight health signal without dependencies, and the route configuration correctly wires all three health endpoints.

kubernetes/base/main-frontend/deployment.yml (1)

65-91: LGTM! Health probe configuration maintains consistency.

The probe configuration mirrors the example-exercise deployment with appropriate port adjustment (3000 for main-frontend). This consistency simplifies operational reasoning across services.

kubernetes/base/headless-lms/deployment.yml (1)

54-80: LGTM! Health probes correctly target the versioned API endpoint.

The probe configuration appropriately uses the /api/v0/health/up path to match this service's versioned API structure, aligning with the endpoint implementation in services/headless-lms/server/src/controllers/health.rs.

kubernetes/base/quizzes/deployment.yml (1)

63-89: LGTM! Conservative probe configuration aligns with PR objectives.

The three-probe setup follows Kubernetes best practices:

  • startupProbe provides 60s for application initialization before liveness checks begin
  • livenessProbe waits 30s and tolerates 200s of failures before restarting
  • readinessProbe quickly removes unhealthy pods from load balancing

These conservative thresholds minimize false-positive restarts under load, as intended.

kubernetes/base/tmc/deployment.yml (1)

64-90: LGTM! Probe configuration is consistent with other services.

The probe setup matches the conservative pattern used across all services in this PR, with appropriate timing values for the tmc service on port 3005.

kubernetes/base/course-material/deployment.yml (1)

63-89: LGTM! Consistent probe configuration.

The health probe setup follows the same conservative pattern as other services, appropriately configured for course-material on port 3003.

services/quizzes/src/pages/api/status/up.ts (1)

1-5: LGTM! Status endpoint follows the established pattern.

The implementation is consistent with other services and provides a lightweight health check endpoint for the quizzes service.

kubernetes/base/cms/deployment.yml (1)

72-89: LGTM! Conservative probe settings align with PR objectives.

The liveness and readiness probe configurations are well-designed with appropriately conservative thresholds:

  • Liveness: Tolerates up to 200 seconds of failures before restart (20 failures × 10s period)
  • Readiness: Tolerates up to 50 seconds of failures before marking unready (10 failures × 5s period)

The timeout values are properly set below period values, and the simple approach of using the same /api/status/up endpoint for all probes minimizes the risk of false positives under high load, as intended.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In @kubernetes/base/example-exercise/deployment.yml:
- Around line 63-89: The status endpoint currently returns a static true; update
the request handler in the status endpoint module to perform real health checks:
attempt a lightweight DB connectivity check (e.g., a ping or simple query
against the existing DB client instance), verify any critical downstream
services or caches are reachable, and only return 200 when all checks succeed;
return non-200 (e.g., 503) and a JSON payload describing failing checks when any
check fails, and ensure the handler times out quickly to keep probes responsive.
🧹 Nitpick comments (2)
kubernetes/base/quizzes/deployment.yml (1)

63-89: LGTM! Health probe configuration is consistent and appropriate.

The probe configuration follows the established pattern across all services with conservative failure thresholds that minimize false positives under load, which aligns with the PR objectives.

Optional future enhancement: Consider adding database connectivity checks to the /api/status/up endpoints when deeper health validation is desired. The current lightweight approach is appropriate for minimizing probe overhead during high load, but enhanced health checks could catch dependency failures earlier in development/staging environments.

kubernetes/base/example-exercise/deployment.yml (1)

47-89: Consider adding security context for container hardening.

The container configuration could be strengthened by adding a security context that prevents privilege escalation and enforces non-root execution.

🔎 Proposed security hardening
       containers:
         - name: example-exercise
           image: example-exercise
+          securityContext:
+            allowPrivilegeEscalation: false
+            runAsNonRoot: true
           ports:
             - containerPort: 3002
               name: http
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59ce711 and c6d8c63.

📒 Files selected for processing (6)
  • kubernetes/base/cms/deployment.yml
  • kubernetes/base/course-material/deployment.yml
  • kubernetes/base/example-exercise/deployment.yml
  • kubernetes/base/quizzes/deployment.yml
  • kubernetes/base/tmc/deployment.yml
  • kubernetes/production/kustomization.yaml
🧰 Additional context used
📓 Path-based instructions (1)
**/*

⚙️ CodeRabbit configuration file

**/*: Avoid banner-style section divider comments ("comment banners"), such as long separator bars, repeated dashes, or loud numbered headers used to split a file into sections (e.g. // ----------------------------------------------------------------------, // 1. INPUT STATE, /* ======= */). Prefer clearer naming, smaller focused modules/files, and normal short comments; do not suggest adding new comment banners, and when they appear in new or modified code, suggest removing them and improving structure instead.
Prefer comment quality over comment quantity. Do not add comments that simply restate what the code already says, narrate control flow, or explain obvious syntax — these may help readers unfamiliar with programming, but they hinder developers by adding noise and slowing down code reading. Comments should be concise, factual, and purposeful, and should communicate information that is not immediately obvious from the code itself (e.g., rationale and intent, constraints or invariants, edge cases, surprising behavior, important assumptions, performance or correctness considerations, or things future maintainers must keep in mind).
Require consistent, minimal function documentation. While some simple or self-explanatory functions or components may not strictly need comments, it is generally preferable to include a short, plain-language description of what the function is for, to clarify intent and complement (not repeat) a descriptive function name. Comments should add meaning rather than paraphrasing the name or implementation. Public interfaces should have clearer and more comprehensive documentation, but many private or internal functions also benefit from a brief comment explaining their role, assumptions, or relevant context.
Protect useful existing comments. Do not remove comments that capture non-obvious rationale, warnings, historical context, or design decisions unless they are clearly outdated or made irrelevant by the change. If a modification ...

Files:

  • kubernetes/base/cms/deployment.yml
  • kubernetes/production/kustomization.yaml
  • kubernetes/base/quizzes/deployment.yml
  • kubernetes/base/course-material/deployment.yml
  • kubernetes/base/example-exercise/deployment.yml
  • kubernetes/base/tmc/deployment.yml
🪛 Checkov (3.2.334)
kubernetes/base/cms/deployment.yml

[medium] 15-89: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-89: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/quizzes/deployment.yml

[medium] 15-89: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-89: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/course-material/deployment.yml

[medium] 15-89: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-89: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/example-exercise/deployment.yml

[medium] 15-89: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-89: Minimize the admission of root containers

(CKV_K8S_23)

kubernetes/base/tmc/deployment.yml

[medium] 15-90: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[medium] 15-90: Minimize the admission of root containers

(CKV_K8S_23)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build-and-deploy
  • GitHub Check: build-and-system-tests
  • GitHub Check: code-style
  • GitHub Check: headless_lms
🔇 Additional comments (4)
kubernetes/base/course-material/deployment.yml (1)

63-89: LGTM! Health probe configuration is well-balanced.

The probe configuration is conservative and appropriate for production:

  • startupProbe allows 60s for initialization
  • livenessProbe tolerates up to 200s of failures before restart
  • readinessProbe checks every 5s with 10-failure tolerance

The paths correctly align with the NEXT_PUBLIC_BASE_PATH prefix.

kubernetes/base/tmc/deployment.yml (1)

64-90: LGTM! Probe configuration is consistent and appropriate.

The health probe configuration follows the same conservative pattern as other services, with appropriate failure thresholds and correct path alignment with the base path prefix.

kubernetes/base/cms/deployment.yml (1)

63-89: LGTM! Health probe configuration is consistent and production-ready.

The probe configuration maintains the conservative approach across all services with appropriate timing and failure thresholds.

kubernetes/production/kustomization.yaml (1)

54-56: LGTM! Replica increases align with enhanced health monitoring.

Increasing replicas for main-frontend and cms to 2 improves availability and complements the new health probe infrastructure.

…educe log spamming, while retaining the startup probe. Added a new patch file for this configuration.
…ealth` for consistency with service endpoints.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6d8c63 and fafa9a5.

📒 Files selected for processing (3)
  • kubernetes/dev/kustomization.yaml
  • kubernetes/dev/patch-disable-probes.yml
  • services/headless-lms/server/src/controllers/health.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • services/headless-lms/server/src/controllers/health.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*

⚙️ CodeRabbit configuration file

**/*: Avoid banner-style section divider comments ("comment banners"), such as long separator bars, repeated dashes, or loud numbered headers used to split a file into sections (e.g. // ----------------------------------------------------------------------, // 1. INPUT STATE, /* ======= */). Prefer clearer naming, smaller focused modules/files, and normal short comments; do not suggest adding new comment banners, and when they appear in new or modified code, suggest removing them and improving structure instead.
Prefer comment quality over comment quantity. Do not add comments that simply restate what the code already says, narrate control flow, or explain obvious syntax — these may help readers unfamiliar with programming, but they hinder developers by adding noise and slowing down code reading. Comments should be concise, factual, and purposeful, and should communicate information that is not immediately obvious from the code itself (e.g., rationale and intent, constraints or invariants, edge cases, surprising behavior, important assumptions, performance or correctness considerations, or things future maintainers must keep in mind).
Require consistent, minimal function documentation. While some simple or self-explanatory functions or components may not strictly need comments, it is generally preferable to include a short, plain-language description of what the function is for, to clarify intent and complement (not repeat) a descriptive function name. Comments should add meaning rather than paraphrasing the name or implementation. Public interfaces should have clearer and more comprehensive documentation, but many private or internal functions also benefit from a brief comment explaining their role, assumptions, or relevant context.
Protect useful existing comments. Do not remove comments that capture non-obvious rationale, warnings, historical context, or design decisions unless they are clearly outdated or made irrelevant by the change. If a modification ...

Files:

  • kubernetes/dev/patch-disable-probes.yml
  • kubernetes/dev/kustomization.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-and-deploy
  • GitHub Check: build-and-system-tests
  • GitHub Check: headless_lms
🔇 Additional comments (1)
kubernetes/dev/patch-disable-probes.yml (1)

1-4: LGTM! Clean implementation for disabling probes in dev.

The JSON Patch operations correctly remove only livenessProbe and readinessProbe from the first container, leaving startupProbe intact as intended. The approach is minimal and focused.

Note: See the verification request in kustomization.yaml regarding the containers[0] index assumption.

@nygrenh nygrenh merged commit 5fab5d3 into master Jan 5, 2026
19 of 20 checks passed
@nygrenh nygrenh deleted the probes branch January 5, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants