add extraContainers support
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.
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 deploymentcharts/n8n/templates/deployment.yaml |
Conditionally render and append main.extraContainers into the pod containers list using tpl(toYaml(...)) when defined. |
Worker deploymentcharts/n8n/templates/deployment.worker.yaml |
Conditionally render and append worker.extraContainers into the pod containers list using tpl(toYaml(...)) when defined. |
Webhook deploymentcharts/n8n/templates/deployment.webhook.yaml |
Conditionally render and append webhook.extraContainers into the pod containers list using tpl(toYaml(...)) when defined. |
Valuescharts/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.
Comment @coderabbitai help to get the list of available commands and usage tips.
anybody here ?
+1 for this feature
Need this feature also, thanks @LeoDiazL !
@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.
@LeoDiazL I addressed your comments in #252
Hello, suggestions applied, are you ok to merge ?