-
Notifications
You must be signed in to change notification settings - Fork 6
Update Helm Chart #190
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?
Update Helm Chart #190
Conversation
- Add resources - Add a key to change the storage mode - if RWO, the protes pods will be deployed on the same nodes - Update mongo to noble - Add init-script.js configMap - Update secrets - Update env - Update rabbitMQ to 4.1.4-management
Reviewer's GuideThis PR enhances the Helm chart by adding resource quotas, making PVC access modes configurable (with conditional pod affinity for RWO), upgrading MongoDB to the 'noble' image with revamped secret management and init scripting, bumping RabbitMQ and chart versions, and refactoring environment variable mappings across deployments. Entity relationship diagram for updated MongoDB secret and init scripterDiagram
MONGODB_SECRET {
string databaseRootUsername
string databaseRootPassword
string databaseUser
string databasePassword
string databaseName
}
CONFIGMAP_INIT_SCRIPT {
string init_script_js
}
MONGODB ||--|| MONGODB_SECRET : uses
MONGODB ||--|| CONFIGMAP_INIT_SCRIPT : uses
Class diagram for updated values.yaml resource and storage configurationclassDiagram
class Flower {
+string appName
+string basicAuth
+string image
+Resources resources
}
class ProTES {
+string appName
+string image
+Resources initResources
+Resources resources
}
class CeleryWorker {
+string appName
+string image
+Resources initResources
+Resources resources
}
class MongoDB {
+string appName
+Secret secret
+string volumeSize
+string image
+Resources resources
}
class RabbitMQ {
+string appName
+string volumeSize
+string image
+Resources resources
}
class Resources {
+map limits
+map requests
}
class Secret {
+string databaseRootUsername
+string databaseRootPassword
+string databaseUser
+string databasePassword
+string databaseName
}
Flower --> Resources
ProTES --> Resources
ProTES --> Resources : initResources
CeleryWorker --> Resources
CeleryWorker --> Resources : initResources
MongoDB --> Secret
MongoDB --> Resources
RabbitMQ --> Resources
Flow diagram for conditional pod affinity based on storage access modeflowchart TD
A["storageAccessMode = ReadWriteOnce?"] -->|Yes| B["Apply podAffinity: proTES pods scheduled with celery-worker on same node"]
A -->|No| C["No affinity: pods scheduled freely"]
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 - here's some feedback:
- The mongo-init-script ConfigMap references dbproWES in the last section but earlier uses dbproTES—please correct the variable names for consistency.
- This PR doesn’t reference a GitHub issue as required by the contribution guidelines—please create or link the issue that tracks these Helm chart updates.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The mongo-init-script ConfigMap references dbproWES in the last section but earlier uses dbproTES—please correct the variable names for consistency.
- This PR doesn’t reference a GitHub issue as required by the contribution guidelines—please create or link the issue that tracks these Helm chart updates.
## Individual Comments
### Comment 1
<location> `deployment/templates/mongodb/mongo-init-script.yaml:7-8` </location>
<code_context>
+ name: mongo-init-script
+data:
+ init-script.js: |
+ db = db.getSiblingDB('taskStore');
+ dbproTES = db.getSiblingDB('{{ tpl .Values.mongodb.secret.databaseName . }}')
+
+ dbproTES.createUser({
</code_context>
<issue_to_address>
**issue (bug_risk):** Potential confusion with database variable assignments in init script.
Please ensure all database variables, such as 'dbproWES', are assigned before use to prevent runtime errors.
</issue_to_address>
### Comment 2
<location> `deployment/templates/mongodb/mongo-init-script.yaml:23-29` </location>
<code_context>
+
+ // Create the 'tasks' and 'service_info' collections
+ // Database configuration from https://github.com/elixir-cloud-aai/proTES/blob/2f2d88915d9948b0d2ffbe6799af01bbc413b00a/pro_tes/config.yaml#L30
+ db.createCollection('tasks');
+ db.runs.createIndex(
+ { task_id: 1, worker_id: 1 },
+ { unique: true, sparse: true }
+ );
+ db.createCollection('service_info');
+ db.service_info.createIndex(
+ { id: 1 }
+ );
</code_context>
<issue_to_address>
**issue (bug_risk):** Collections and indexes are created in both 'db' and 'dbproWES', but 'dbproWES' is not defined.
'dbproWES' must be defined before use to prevent a ReferenceError. Please assign it as done for 'dbproTES'.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
IMPORTANT: Please create an issue before filing a pull request! Changes need to be discussed before proceeding. Please read the contribution guidelines.
Details
Please provide enough information so that others can review your pull request. Give a brief summary of the motivation. Refer to the corresponding issue/s with
#XXXXfor more information.Testing
Write the appropriate unit and integration tests, if applicable. Make sure these and all other tests pass.
Documentation
Please document your changes and test cases in the appropriate places, if applicable.
Style
Make sure your changes adhere to the coding/documentation style used throughout the project.
Closing issues
If your changes fix any issue/s, put
closes #XXXXin your comment to auto-close it/them.Credit
Add your credentials to the list of contributors once your pull request was merged.
Summary by Sourcery
Update Helm chart to version 2.0.0 with enhanced resource management, configurable storage modes, and updated database and message broker images
New Features:
Enhancements:
Build: