Skip to content

Conversation

@Izual750
Copy link

@Izual750 Izual750 commented Nov 19, 2025

Pull Request

Related Issue

None

What does this PR do?

This PR adds support for configuring HTTP headers and custom paths for startup, liveness, and readiness probes. This makes it possible to use authenticated health endpoints (for example when a Meilisearch master key is enabled) while keeping the Kubernetes probes functional.

Summary by CodeRabbit

  • New Features
    • Health check probes now support configurable endpoint paths and HTTP headers.
    • Startup, liveness, and readiness probes can be customized with headers as needed.
    • Default probe configuration provided with standard health endpoints and header lists.

@coderabbitai
Copy link

coderabbitai bot commented Nov 19, 2025

Walkthrough

This change introduces dynamic health probe configuration for Meilisearch's Kubernetes StatefulSet. Probe paths are templated for customization, and conditional HTTP headers support is added to startup, liveness, and readiness probes. Values file updated with default paths and empty header lists for all three probes.

Changes

Cohort / File(s) Summary
Health probe templating
charts/meilisearch/templates/statefulset.yaml, charts/meilisearch/values.yaml
Replaces static /health probe paths with template variables (startupProbe.path, livenessProbe.path, readinessProbe.path). Adds conditional httpHeaders blocks that render from .Values.*.httpHeaders when present. Values file updated with default path and empty httpHeaders list for all three probes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Changes are straightforward configuration updates following a consistent, repetitive pattern across three probes
  • No complex logic or behavioral changes; purely structural templating improvements
  • Values file additions are minimal and self-explanatory

Poem

🐰 A rabbit hops through health probes bright,
Now templated for flexible might,
Headers conditional, paths set free,
Configuration harmony—as it should be! 🏥✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly describes the main change: adding configurable paths and HTTP headers for the three probe types (startup, liveness, readiness).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

@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: 0

🧹 Nitpick comments (2)
charts/meilisearch/values.yaml (1)

10-11: Add documentation comments to clarify path and httpHeaders fields.

The new path and httpHeaders fields in probe configurations lack inline documentation, which differs from the pattern used elsewhere in this file (e.g., lines 28–34). Adding brief comments will help users understand the purpose and expected format (e.g., that httpHeaders accepts a list of header objects with name/value keys for authentication).

Consider updating the values.yaml as follows to document the new fields:

 startupProbe:
   periodSeconds: 1
   InitialDelaySeconds: 1
   failureThreshold: 60
   timeoutSeconds: 1
+  # -- HTTP health check path
   path: "/health"
+  # -- Additional HTTP headers for the health check (e.g., for authentication)
   httpHeaders: []

This pattern should be applied consistently to readinessProbe and livenessProbe as well.

Also applies to: 17-18, 24-25

charts/meilisearch/templates/statefulset.yaml (1)

92-97: Optional: Add examples in values.yaml documentation showing authenticated header usage.

While not critical, providing an example of how to configure custom headers for authenticated endpoints would improve usability. For instance:

# Example: To use with Meilisearch master key authentication:
# startupProbe:
#   httpHeaders:
#     - name: Authorization
#       value: "Bearer <MASTER_KEY>"

This could be added as a comment block in values.yaml near the probe configurations to guide users who need authenticated health checks.

Also applies to: 104-109, 115-120

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61146ef and 2623b04.

📒 Files selected for processing (2)
  • charts/meilisearch/templates/statefulset.yaml (1 hunks)
  • charts/meilisearch/values.yaml (1 hunks)
🔇 Additional comments (1)
charts/meilisearch/templates/statefulset.yaml (1)

92-97: ✓ Probe templating and conditional headers rendering look correct.

The implementation properly:

  • Uses templated paths to allow customization (e.g., for non-standard health endpoints)
  • Applies conditional rendering for httpHeaders: empty arrays won't produce empty blocks in the output YAML
  • Maintains consistent indentation across all three probes (nindent 14 aligns headers with other httpGet properties)
  • Preserves existing probe timing and threshold configurations

The {{- if syntax correctly strips preceding whitespace, and toYaml with nindent 14 produces valid nested YAML for header lists.

Also applies to: 104-109, 115-120

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