Skip to content

Conversation

@trispera
Copy link
Member

@trispera trispera commented Oct 6, 2025

  • Add resources
  • Add a key to change the storage mode
    • if RWO, the prowes 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

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

Add storageAccessMode option for PVCs, configure resource requests and limits across all services, and implement pod affinity for ReadWriteOnce deployments

New Features:

  • Introduce storageAccessMode configuration to toggle PVC accessModes between ReadWriteOnce and ReadWriteMany

Enhancements:

  • Add configurable resource requests and limits for flower, prowes, celeryWorker, mongodb, and rabbitmq
  • Implement pod affinity for prowes when using ReadWriteOnce to co-locate pods on the same node
  • Update PVC and volume templates to respect the storageAccessMode value
  • Refactor deployment templates to use toYaml for centralized resource definitions

- Add resources
- Add a key to change the storage mode
  - if RWO, the prowes pods will be deployed on the same nodes
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 6, 2025

Reviewer's Guide

This PR enhances the Helm chart by introducing a configurable storageAccessMode for dynamic volume access modes, centralizing resource requests and limits in values.yaml and propagating them via templated toYaml blocks, and adding conditional pod affinity to co-locate prowes pods under ReadWriteOnce volumes.

File-Level Changes

Change Details Files
Parameterize PVC access modes with a new storageAccessMode value
  • introduced storageAccessMode key in values.yaml for dynamic access control
  • replaced hardcoded ReadWriteMany with {{ .Values.storageAccessMode }} in PVC and volume templates
deployment/values.yaml
deployment/templates/rabbitmq/rabbitmq-pvc.yaml
deployment/templates/mongodb/mongodb-pvc.yaml
deployment/templates/prowes/prowes-volume.yaml
Centralize and apply resource requests/limits from values.yaml
  • added resources blocks for flower, prowes, celeryWorker, mongodb, rabbitmq in values.yaml
  • refactored deployment templates to use toYaml .Values..resources for containers and initContainers
deployment/values.yaml
deployment/templates/prowes/prowes-deployment.yaml
deployment/templates/prowes/celery-deployment.yaml
deployment/templates/mongodb/mongodb-deployment.yaml
deployment/templates/rabbitmq/rabbitmq-deployment.yaml
deployment/templates/flower/flower-deployment.yaml
Implement conditional podAffinity for prowes pods under ReadWriteOnce mode
  • added an if block around podAffinity in prowes-deployment.yaml to check storageAccessMode
  • configured requiredDuringSchedulingIgnoredDuringExecution affinity targeting celeryWorker pods on the same host
deployment/templates/prowes/prowes-deployment.yaml

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/templates/prowes/prowes-deployment.yaml:32` </location>
<code_context>
         image: busybox
         command: [ 'mkdir' ]
         args: [ '-p', '/data/db', '/data/specs' ]
+        resources: {{- toYaml .Values.prowes.resources | nindent 10 }}
         volumeMounts:
         - mountPath: /data
</code_context>

<issue_to_address>
**suggestion:** Resource specification for initContainers may be excessive.

Consider lowering resource requests/limits for initContainers if their workload is minimal to avoid unnecessary over-provisioning.

Suggested implementation:

```
        resources:
          limits:
            cpu: 10m
            memory: 16Mi
          requests:
            cpu: 1m
            memory: 4Mi

```

If you want to make the resource values configurable via Helm, you should add a new key (e.g., `initResources`) to your `values.yaml` and reference it here instead of hardcoding. For example:
```
resources: {{- toYaml .Values.prowes.initResources | nindent 10 }}
```
And in your `values.yaml`:
```
prowes:
  initResources:
    limits:
      cpu: 10m
      memory: 16Mi
    requests:
      cpu: 1m
      memory: 4Mi
```
</issue_to_address>

### Comment 2
<location> `deployment/templates/prowes/celery-deployment.yaml:19-22` </location>
<code_context>
             periodSeconds: 10
             successThreshold: 1
             timeoutSeconds: 1
-          resources:
-            limits:
-              memory: 512Mi
</code_context>

<issue_to_address>
**suggestion (performance):** Celery initContainer resource limits may be unnecessarily high.

The current allocation of 256Mi memory and 100m CPU for the celery initContainer may exceed the needs for basic directory creation. Reducing these limits could improve resource efficiency.
</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 trispera requested a review from lvarin October 6, 2025 11:35
@trispera trispera changed the title Edit Helm Chart WIP: Edit Helm Chart Oct 9, 2025
@trispera trispera changed the title WIP: Edit Helm Chart Edit Helm Chart Oct 15, 2025
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.

1 participant