Skip to content

Conversation

@trispera
Copy link
Member

@trispera trispera commented Oct 24, 2025

  • Update mongodb image
    • Add init-script js
  • Add condition if storage is RWO and not RWX
    • Pods will run on the same node
  • Update RabbitMQ image

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 #XXXX for 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 #XXXX in 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

Enhance the Helm chart by renaming it to drs-filer, bumping to version 2.0.0, and adding configurable resource parameters, storage conditions, and initialization scripts for MongoDB.

Enhancements:

  • Rename Helm chart to drs-filer, bump version to 2.0.0, and update chart description
  • Parameterize applicationDomain, clusterType, storageAccessMode, and extra_config file defaults
  • Add initResources and resources settings and update default images for WES, Celery, MongoDB, and RabbitMQ
  • Introduce a ConfigMap init-script for MongoDB to create users, databases, and collections
  • Refactor MongoDB secret to a generic key/value map and align environment variables accordingly
  • Add conditional pod affinity when storageAccessMode is ReadWriteOnce
  • Increase MongoDB probe initial delays and timeouts

Deployment:

  • Adjust Helm templates to mount the MongoDB init-script, apply resource configurations, and handle storage and affinity conditions

Documentation:

  • Update README to document new values for clusterType, storageAccessMode, resource limits, secrets, and ingress annotations

- Update mongodb image
  - Add init-script js
- Add condition if storage is RWO and not RWX
  - Pods will run on the same node
- Update RabbitMQ image
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 24, 2025

Reviewer's Guide

This PR overhauls the Helm chart by refactoring values and defaults, introducing resource configurations across all containers, restructuring MongoDB secret handling and initialization, adding node‐affinity for RWO storage, bumping chart metadata, and aligning documentation with the new parameters.

Entity relationship diagram for updated MongoDB secret and init script

erDiagram
  MONGODB_SECRET {
    string databaseRootUsername
    string databaseRootPassword
    string databaseUser
    string databasePassword
    string databaseName
  }
  MONGODB_INIT_SCRIPT {
    string init_script_js
  }
  MONGODB ||--|| MONGODB_SECRET : uses
  MONGODB ||--|| MONGODB_INIT_SCRIPT : uses
  WES ||--|| MONGODB_SECRET : uses
  CELERY_WORKER ||--|| MONGODB_SECRET : uses
Loading

Class diagram for updated Helm chart values structure

classDiagram
  class Values {
    string applicationDomain
    string clusterType
    string tlsSecret
    string storageAccessMode
    ExtraConfig extra_config
    Autocert autocert
    Flower flower
    Wes wes
    CeleryWorker celeryWorker
    MongoDB mongodb
    RabbitMQ rabbitmq
    Ingress ingress
  }
  class ExtraConfig {
    string folder
    string file
  }
  class Autocert {
    string createJob
    string schedule
    string testCert
    string image
  }
  class Flower {
    string appName
    string image
  }
  class Wes {
    string appName
    string image
    Resources initResources
    Resources resources
    string storageClass
    string volumeSize
    boolean redirect
    boolean configWithJob
    string appConfig
  }
  class CeleryWorker {
    string appName
    string image
    Resources initResources
    Resources resources
    string tmpVolumeSize
    boolean tmpCleaner
  }
  class MongoDB {
    string appName
    Secret secret
    string volumeSize
    string image
    Resources resources
    string mountPath
    string pullPolicy
    SecurityContext securityContext
  }
  class Secret {
    string databaseRootUsername
    string databaseRootPassword
    string databaseUser
    string databasePassword
    string databaseName
  }
  class Resources {
    Limits limits
    Requests requests
  }
  class Limits {
    string cpu
    string memory
  }
  class Requests {
    string cpu
    string memory
  }
  class SecurityContext {
    boolean enabled
    boolean runAsNonRoot
    int runAsUser
  }
  class RabbitMQ {
    string appName
    string volumeSize
    string image
    Resources resources
  }
  class Ingress {
    string letsencryptSystem
  }
  Values --> ExtraConfig
  Values --> Autocert
  Values --> Flower
  Values --> Wes
  Values --> CeleryWorker
  Values --> MongoDB
  Values --> RabbitMQ
  Values --> Ingress
  Wes --> Resources
  Wes --> Resources : initResources
  CeleryWorker --> Resources
  CeleryWorker --> Resources : initResources
  MongoDB --> Secret
  MongoDB --> Resources
  MongoDB --> SecurityContext
  RabbitMQ --> Resources
Loading

Flow diagram for node affinity when storage is RWO

flowchart TD
  A["storageAccessMode = ReadWriteOnce"] --> B["Apply podAffinity"]
  B --> C["WES and Celery Worker scheduled on same node"]
  D["storageAccessMode = ReadWriteMany"] --> E["No podAffinity"]
  E --> F["Pods can be scheduled on different nodes"]
Loading

File-Level Changes

Change Details Files
Refactor values.yaml defaults and parameter structure
  • Reset applicationDomain and clusterType to empty defaults
  • Renamed extra_config file key and set safer default for autocert.createJob
  • Moved MongoDB credentials under a generic secret block
  • Bumped WES, MongoDB, and RabbitMQ image tags
deployment/values.yaml
Add resource requests and limits for all containers
  • Defined initResources and resources blocks for WES and Celery initContainers and containers
  • Applied templated .Values.mongodb.resources to MongoDB container
  • Introduced resources for RabbitMQ in values.yaml
deployment/values.yaml
deployment/templates/wes/wes-deployment.yaml
deployment/templates/wes/celery-deployment.yaml
deployment/templates/mongodb/mongodb-deployment.yaml
Restructure MongoDB secret handling and environment variables
  • Looped over .Values.mongodb.secret in mongodb-secret.yaml
  • Updated env var names to MONGO_INITDB_* and MONGO_APP_* in deployment
  • Adjusted mountPath and pullPolicy settings
deployment/values.yaml
deployment/templates/mongodb/mongodb-secret.yaml
deployment/templates/mongodb/mongodb-deployment.yaml
Introduce MongoDB initialization script via ConfigMap
  • Added new mongo-init-script ConfigMap with init-script.js
  • Mounted init-script.js into MongoDB init path in deployment
  • Extended readinessProbe timing to accommodate init script
deployment/templates/mongodb/mongo-init-script.yaml
deployment/templates/mongodb/mongodb-deployment.yaml
Implement podAffinity for ReadWriteOnce storage mode
  • Added affinity rule in WES deployment when storageAccessMode is RWO
deployment/templates/wes/wes-deployment.yaml
Bump chart metadata and rename chart
  • Renamed chart from cwlwes to drs-filer
  • Updated description, version, and appVersion to 2.0.0
deployment/Chart.yaml
Expand documentation with new parameters
  • Added descriptions for clusterType, storageAccessMode, resource blocks, and secrets
  • Reorganized ingress and MongoDB/RabbitMQ sections in README
deployment/README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a 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 they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `deployment/README.md:106` </location>
<code_context>
 | autocert.schedule | string | schedule for certificate refreshment |
 | autocert.testCert | string | whether to use Let's Encrypt staging so as not to exceed quota |
+| flower.appName | string | Name for the flower app |
+| flower.basicAuth | string | Set the username and password for the Flowe app |
+| flower.image | string | Container image to be used for Flower |
+| wes.appName | string | name of the main application on Kubernetes cluster |
</code_context>

<issue_to_address>
**issue (typo):** Typo: 'Flowe app' should be 'Flower app'.

Update the description to use 'Flower app' instead of 'Flowe app'.

```suggestion
| flower.basicAuth | string | Set the username and password for the Flower app |
```
</issue_to_address>

### Comment 2
<location> `deployment/README.md:109` </location>
<code_context>
+| flower.basicAuth | string | Set the username and password for the Flowe app |
+| flower.image | string | Container image to be used for Flower |
+| wes.appName | string | name of the main application on Kubernetes cluster |
+| wes.image | string | containger image to be used for the main application |
+| wes.initResources | string | Set limits and requests cpu/memory for the WES initContainer (busybox) |
+| wes.resources | string | Set limits and requests cpu/memory for the WES container |
</code_context>

<issue_to_address>
**issue (typo):** Typo: 'containger' should be 'container'.

Update the description to use the correct spelling: 'container'.

```suggestion
| wes.image | string | container image to be used for the main application |
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

trispera and others added 2 commits October 24, 2025 09:26
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
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.

2 participants