fix: add replicas configuration for KV buckets#37
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds configurable JetStream KeyValue (KV) bucket replica counts to the lfx-v2-mailing-list-service Helm chart, enabling higher durability/HA for the NATS-backed KV buckets used by the service.
Changes:
- Add
replicassettings to the chart’s default values for each GroupsIO KV bucket. - Render
spec.replicasinto eachKeyValueresource manifest.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
charts/lfx-v2-mailing-list-service/values.yaml |
Introduces per-KV-bucket replicas defaults (currently set to 3). |
charts/lfx-v2-mailing-list-service/templates/nats-kv-buckets.yaml |
Adds spec.replicas to the jetstream.nats.io/v1beta2 KeyValue resources. |
Comments suppressed due to low confidence (1)
charts/lfx-v2-mailing-list-service/values.yaml:90
replicas: 3is duplicated across multiple KV bucket configs. To reduce the chance of future drift, consider introducing a single default (e.g.,nats.kvBucketDefaults.replicas) and using per-bucket overrides only where needed.
# replicas is the number of replicas for the KV bucket
replicas: 3
# history is the number of history entries to keep for the KV bucket
history: 20
# storage is the storage type for the KV bucket
storage: file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
charts/lfx-v2-mailing-list-service/templates/nats-kv-buckets.yaml (1)
16-16: Consider adding a default value for robustness.The template references
.Values.nats.groupsio_services_kv_bucket.replicaswithout a fallback default. If users upgrade this chart without updating their values files, the template could render an empty or invalidreplicasfield.This applies to all five bucket definitions (lines 16, 36, 56, 76, 96).
♻️ Suggested improvement with default value
- replicas: {{ .Values.nats.groupsio_services_kv_bucket.replicas }} + replicas: {{ .Values.nats.groupsio_services_kv_bucket.replicas | default 1 }}Apply the same pattern to all five bucket definitions.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@charts/lfx-v2-mailing-list-service/templates/nats-kv-buckets.yaml` at line 16, The replicas field references .Values.nats.groupsio_services_kv_bucket.replicas without a fallback; update each of the five bucket replicas entries to use the Helm default function (e.g., default 1) so the template always renders a valid integer. Locate the five occurrences of .Values.nats.groupsio_services_kv_bucket.replicas in the nats-kv-buckets.yaml template and replace them with a default-wrapped expression (using default) to provide a safe fallback value for replicas across all bucket definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@charts/lfx-v2-mailing-list-service/templates/nats-kv-buckets.yaml`:
- Line 16: The replicas field references
.Values.nats.groupsio_services_kv_bucket.replicas without a fallback; update
each of the five bucket replicas entries to use the Helm default function (e.g.,
default 1) so the template always renders a valid integer. Locate the five
occurrences of .Values.nats.groupsio_services_kv_bucket.replicas in the
nats-kv-buckets.yaml template and replace them with a default-wrapped expression
(using default) to provide a safe fallback value for replicas across all bucket
definitions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: de1814f7-f710-47a4-ba29-c15724bf9b5b
📒 Files selected for processing (2)
charts/lfx-v2-mailing-list-service/templates/nats-kv-buckets.yamlcharts/lfx-v2-mailing-list-service/values.yaml
Signed-off-by: Alan Sherman <asherman@linuxfoundation.org>
c460dfc to
4b7b447
Compare
No description provided.