Skip to content

Conversation

obeone
Copy link

@obeone obeone commented Jun 16, 2025

Adding the ability to set a runtimeClassName

Summary by CodeRabbit

  • New Features
    • Added support for specifying a Kubernetes runtime class for the main, worker, and webhook pods via a new configuration option in the Helm chart.
  • Documentation
    • Updated documentation to include the new runtime class configuration option for all relevant components.
  • Chores
    • Bumped the Helm chart version to 1.0.8.

Copy link
Contributor

coderabbitai bot commented Jun 16, 2025

Walkthrough

The changes introduce a new optional configuration key, runtimeClassName, to the Helm chart for the n8n application. This key is added to the main, worker, and webhook pod specifications, allowing users to specify a Kubernetes runtime class for each component. The chart version is incremented, and relevant documentation is updated.

Changes

File(s) Change Summary
charts/n8n/values.yaml, README.md Added runtimeClassName configuration option (default: null) for main, worker, and webhook pods.
charts/n8n/templates/deployment.yaml Conditionally includes runtimeClassName in main pod spec if set in values.
charts/n8n/templates/deployment.worker.yaml Conditionally includes runtimeClassName in worker pod spec if set in values.
charts/n8n/templates/deployment.webhook.yaml Conditionally includes runtimeClassName in webhook pod spec if set in values.
charts/n8n/Chart.yaml Incremented chart version from 1.0.7 to 1.0.8.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Helm Chart
    participant Kubernetes API

    User->>Helm Chart: Set runtimeClassName in values.yaml (optional)
    Helm Chart->>Kubernetes API: Deploy main/worker/webhook pod with runtimeClassName (if set)
    Kubernetes API-->>Helm Chart: Pod scheduled with specified runtime class
    Helm Chart-->>User: Deployment reflects runtimeClassName configuration
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67067ae and ea27ef2.

📒 Files selected for processing (1)
  • charts/n8n/values.yaml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/n8n/values.yaml
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch main
  • Post Copyable Unit Tests in 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
README.md (3)

358-361: Document runtimeClassName for main pods
The new runtimeClassName key is introduced without context. Please add a descriptive comment explaining its purpose, default behavior, and an example usage to improve clarity.

   autoscaling:
     enabled: false
-  runtimeClassName: ""
+  # Kubernetes RuntimeClassName for the main n8n pod (e.g., "gvisor"); leave empty to use the default runtime
+  runtimeClassName: ""
   nodeSelector: {}

544-548: Document runtimeClassName for worker pods
Apply the same descriptive enhancement in the worker section so users understand how to use this setting and what the default means.

   autoscaling:
     enabled: false
-  runtimeClassName: ""
+  # Kubernetes RuntimeClassName for worker pods (e.g., "kata"); leave empty to use the cluster default runtime
+  runtimeClassName: ""
   nodeSelector: {}

730-734: Document runtimeClassName for webhook pods
The webhook section should also include an explanatory comment for runtimeClassName, detailing its intent, default, and an example value.

   autoscaling:
     enabled: false
-  runtimeClassName: ""
+  # Kubernetes RuntimeClassName for webhook pods (e.g., "gvisor"); leave empty for the default node runtime
+  runtimeClassName: ""
   nodeSelector: {}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 72eef4d and 720abc7.

📒 Files selected for processing (6)
  • README.md (3 hunks)
  • charts/n8n/Chart.yaml (1 hunks)
  • charts/n8n/templates/deployment.webhook.yaml (1 hunks)
  • charts/n8n/templates/deployment.worker.yaml (1 hunks)
  • charts/n8n/templates/deployment.yaml (1 hunks)
  • charts/n8n/values.yaml (3 hunks)
🔇 Additional comments (4)
charts/n8n/Chart.yaml (1)

3-3: Approve chart version bump to v1.0.8
Incrementing the chart version to 1.0.8 is appropriate to bundle the new runtimeClassName feature. No further changes needed in metadata.

charts/n8n/templates/deployment.yaml (1)

48-50: ⚠️ Potential issue

Fix conditional inclusion of runtimeClassName for main pod
Using with .Values.main.runtimeClassName treats empty strings as non-nil, so the block always renders, injecting runtimeClassName: "". Replace with an if check against an empty value to only include the field when set.

Proposed diff:

-      {{- with .Values.main.runtimeClassName }}
-      runtimeClassName: {{ . }}
-      {{- end }}
+      {{- if and .Values.main.runtimeClassName (ne .Values.main.runtimeClassName "") }}
+      runtimeClassName: {{ .Values.main.runtimeClassName }}
+      {{- end }}

Likely an incorrect or invalid review comment.

charts/n8n/templates/deployment.webhook.yaml (1)

51-53: ⚠️ Potential issue

Fix conditional inclusion of runtimeClassName for webhook pod
The with block will run even if .Values.webhook.runtimeClassName is an empty string, causing an unwanted empty field. Use an if condition to guard against empty values.

Proposed diff:

-      {{- with .Values.webhook.runtimeClassName }}
-      runtimeClassName: {{ . }}
-      {{- end }}
+      {{- if and .Values.webhook.runtimeClassName (ne .Values.webhook.runtimeClassName "") }}
+      runtimeClassName: {{ .Values.webhook.runtimeClassName }}
+      {{- end }}

Likely an incorrect or invalid review comment.

charts/n8n/templates/deployment.worker.yaml (1)

49-51: ⚠️ Potential issue

Fix conditional inclusion of runtimeClassName for worker pod
An empty string is truthy in a with block, so the template injects runtimeClassName: "" inadvertently. Switch to an if check that excludes empty values.

Proposed diff:

-      {{- with .Values.worker.runtimeClassName }}
-      runtimeClassName: {{ . }}
-      {{- end }}
+      {{- if and .Values.worker.runtimeClassName (ne .Values.worker.runtimeClassName "") }}
+      runtimeClassName: {{ .Values.worker.runtimeClassName }}
+      {{- end }}

Likely an incorrect or invalid review comment.

obeone and others added 2 commits June 16, 2025 02:33
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@Vad1mo
Copy link
Member

Vad1mo commented Jun 16, 2025

@obeone, looks good. There are some errors, can, you take a look?

@Vad1mo
Copy link
Member

Vad1mo commented Jun 24, 2025

@obeone can yoou fix the failing checks?

@RoseSecurity
Copy link
Contributor

The commit that appears to be failing is Update charts/n8n/values.yaml

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.

3 participants