-
Notifications
You must be signed in to change notification settings - Fork 71
Add configurable paths and HTTP headers for startup, liveness, and readiness probes #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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.
Example instruction:
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. Comment |
There was a problem hiding this 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
pathandhttpHeadersfields 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
readinessProbeandlivenessProbeas 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
📒 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
{{- ifsyntax correctly strips preceding whitespace, andtoYamlwithnindent 14produces valid nested YAML for header lists.Also applies to: 104-109, 115-120
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