-
Notifications
You must be signed in to change notification settings - Fork 1
Update Helm Chart #53
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: dev
Are you sure you want to change the base?
Conversation
Reviewer's GuideHelm chart is updated to v2 with new image tags, configurable resource requests/limits, Mongo initialization via ConfigMap, and some cleanup of autogenerated status fields and route/service details. ER diagram for MongoDB serviceStore schema initializationerDiagram
serviceStore ||--o{ services : contains
serviceStore ||--o{ service_info : contains
services {
string id
}
service_info {
string id
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes and found some issues that need to be addressed.
- Using the
latesttag forcloud-registry.imagemakes deployments non-reproducible and harder to roll back; consider pinning to an explicit versioned tag and bumping it intentionally in future chart updates. - The direct use of
.Values.mongodb.resourcesinmongo-deploy.yamlwill fail if the key is omitted in values; consider wrapping it with a default (e.g.,{{- toYaml (default dict .Values.mongodb.resources) | nindent 10 }}) to keep the chart robust to partial values files. - The new
NOTES.txttemplate is currently empty; either populate it with meaningful installation/usage notes or remove it to avoid generating an empty notes output.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Using the `latest` tag for `cloud-registry.image` makes deployments non-reproducible and harder to roll back; consider pinning to an explicit versioned tag and bumping it intentionally in future chart updates.
- The direct use of `.Values.mongodb.resources` in `mongo-deploy.yaml` will fail if the key is omitted in values; consider wrapping it with a default (e.g., `{{- toYaml (default dict .Values.mongodb.resources) | nindent 10 }}`) to keep the chart robust to partial values files.
- The new `NOTES.txt` template is currently empty; either populate it with meaningful installation/usage notes or remove it to avoid generating an empty notes output.
## Individual Comments
### Comment 1
<location> `deployment/values.yaml:8` </location>
<code_context>
cloud_registry:
- image: elixircloud/cloud-registry:0.1.0
+ image: elixircloud/cloud-registry:latest
appName: cloud-registry
+ resources:
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Using the `latest` image tag can lead to non-deterministic deployments.
Please pin this to a concrete version (e.g. `elixircloud/cloud-registry:2.0.0`) and keep it aligned with the chart’s `appVersion` in `Chart.yaml` so the image and chart metadata stay in sync.
Suggested implementation:
```
cloud_registry:
# Keep this version aligned with .appVersion in Chart.yaml
image: elixircloud/cloud-registry:2.0.0
```
1. Open `deployment/Chart.yaml` (or the chart's `Chart.yaml`) and ensure `.appVersion` is set to `2.0.0` (or update the tag here to match whatever `appVersion` you choose).
2. If you change the application version in the future, remember to update both `appVersion` in `Chart.yaml` and the `cloud_registry.image` tag in `values.yaml` to keep them in sync.
</issue_to_address>
### Comment 2
<location> `deployment/templates/mongo-init-script.yaml:11-12` </location>
<code_context>
+
+ // Create the 'services' and 'service_info' collections
+ // Database configuration from https://github.com/elixir-cloud-aai/cloud-registry/blob/fa8a1b0dd1361751574550116150a630035dc199/cloud_registry/config.yaml#L32
+ db.createCollection('services');
+ db.tools.createIndex(
+ { id: 1 },
+ { unique: true }
</code_context>
<issue_to_address>
**issue (bug_risk):** The index is created on `db.tools` instead of the newly created `services` collection.
After creating the `services` collection, the script calls `db.tools.createIndex(...)`. This should likely be `db.services.createIndex(...)`, otherwise the unique index on `id` will be applied to `tools` (or fail) instead of `services`.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #53 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 189 189
=========================================
Hits 189 189 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Checklist:
Summary by Sourcery
Update the Helm chart to use the latest application and MongoDB images, configure resource requests/limits, and add a MongoDB init script for setting up required collections and indexes.
New Features:
Enhancements: