n8n-helm-chart icon indicating copy to clipboard operation
n8n-helm-chart copied to clipboard

add extraContainers support

Open ArnaudTA opened this issue 1 year ago • 6 comments

basic support for extraContainers support.

Totally inspired by the Vault chart: https://artifacthub.io/packages/helm/hashicorp/vault

Have a good day :)

Summary by CodeRabbit

  • New Features
    • Added support for specifying extra (sidecar) containers in the main, worker, and webhook deployments via Helm chart values.
    • Users can now inject custom containers alongside the primary containers in each deployment for enhanced flexibility.
  • Documentation
    • Updated configuration options in the Helm values file to document the new extraContainers fields for each deployment type.

ArnaudTA avatar Apr 23 '25 23:04 ArnaudTA

Walkthrough

Adds support for injecting user-defined extra containers (sidecars) into main, worker, and webhook Helm deployment templates via new extraContainers fields in values.yaml; templates conditionally render and append the provided YAML into each pod's containers list when defined.

Changes

Cohort / File(s) Change Summary
Main deployment
charts/n8n/templates/deployment.yaml
Conditionally render and append main.extraContainers into the pod containers list using tpl(toYaml(...)) when defined.
Worker deployment
charts/n8n/templates/deployment.worker.yaml
Conditionally render and append worker.extraContainers into the pod containers list using tpl(toYaml(...)) when defined.
Webhook deployment
charts/n8n/templates/deployment.webhook.yaml
Conditionally render and append webhook.extraContainers into the pod containers list using tpl(toYaml(...)) when defined.
Values
charts/n8n/values.yaml
Added extraContainers: null entries (with example snippet) under main, worker, and webhook to expose sidecar configuration.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HelmChart
    participant Kubernetes
    User->>HelmChart: Add extraContainers in values.yaml (main/worker/webhook)
    HelmChart->>HelmChart: tpl(toYaml(.Values.*.extraContainers)) -> render YAML snippets
    HelmChart->>Kubernetes: Apply rendered deployments (pods include extra containers)
    Kubernetes-->>User: Pods created with main + extra sidecar containers

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'add extraContainers support' directly and clearly describes the main change: adding support for extraContainers to the Helm chart across three deployment templates and values file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Apr 23 '25 23:04 coderabbitai[bot]

anybody here ?

ArnaudTA avatar May 05 '25 11:05 ArnaudTA

+1 for this feature

raivil avatar Jul 17 '25 23:07 raivil

Need this feature also, thanks @LeoDiazL !

cloudwithdan avatar Sep 09 '25 13:09 cloudwithdan

@ArnaudTA are you able to push this along? if not I can pick it back up in a separate PR and reference this one. I really want to get this merged in.

obsidian33 avatar Oct 06 '25 21:10 obsidian33

@LeoDiazL I addressed your comments in #252

obsidian33 avatar Oct 07 '25 20:10 obsidian33

Hello, suggestions applied, are you ok to merge ?

ArnaudTA avatar Jan 20 '26 16:01 ArnaudTA