Skip to content

[INFRA-119] Plane-EE: feat: Add Email Service#98

Merged
mguptahub merged 8 commits intodevelopfrom
add-email-service
May 22, 2025
Merged

[INFRA-119] Plane-EE: feat: Add Email Service#98
mguptahub merged 8 commits intodevelopfrom
add-email-service

Conversation

@akshat5302
Copy link
Member

@akshat5302 akshat5302 commented May 7, 2025

Description

  • Add Email Service related configurations in Plane-EE Helm Chart

Type of Change

  • Feature (non-breaking change which adds functionality)

Summary by CodeRabbit

  • New Features
    • Introduced configurable email service with deployment, resource limits, and environment variables.
    • Added options to enable/disable the email service, customize replicas, memory, and CPU limits.
    • Included SMTP domain, webhook URL, and SSL configuration with automatic TLS certificate management.
    • Enhanced certificate issuer creation to support email service alongside ingress.
  • Chores
    • Updated Helm chart version to 1.2.3.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 7, 2025

## Walkthrough

This update introduces a configurable email service to the plane-enterprise Helm chart. It adds new values, questions, and conditional Kubernetes manifests for deploying, configuring, and securing the email service. The chart version is incremented, and resources for certificates, secrets, config maps, and deployments are included, all gated by an enablement flag. Additionally, certificate issuer creation logic is extended to consider email service enablement.

## Changes

| File(s)                                                                                         | Change Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| charts/plane-enterprise/Chart.yaml                                                              | Incremented chart version from 1.2.2 to 1.2.3.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| charts/plane-enterprise/questions.yml                                                           | Added a new "Email Service" configuration section with variables for image, enablement, resource limits, environment variables, and SSL settings. Conditional subquestions and visibility logic included.                                                                                                                                                                                                                                                                                                            |
| charts/plane-enterprise/values.yaml                                                             | Introduced `email_service` configuration under `services` and `email_service_envs` under `env` for email service enablement, resource limits, image, webhook URL, and SMTP domain.                                                                                                                                                                                                                                                                                                                                   |
| charts/plane-enterprise/templates/certs/email-certs.yaml                                        | Added a new template for a cert-manager `Certificate` resource, conditionally created for the email service when enabled and an SMTP domain is specified.                                                                                                                                                                                                                                                                                                                                                            |
| charts/plane-enterprise/templates/config-secrets/email-env.yaml                                 | Added a template for a Kubernetes ConfigMap for the email service, conditionally created. The ConfigMap stores SMTP domain and embedded blacklist/spam files, plus fixed internal API URLs.                                                                                                                                                                                                                                                                                                                           |
| charts/plane-enterprise/templates/workloads/email.deployment.yaml                               | Added a conditional template for deploying the email service, including a Service (LoadBalancer) and Deployment with configurable image, resources, environment, volume mounts, and annotations for reloads.                                                                                                                                                                                                                                                                                                         |
| charts/plane-enterprise/templates/certs/cert-issuers.yaml                                      | Modified conditional logic for rendering certificate issuer secret and issuer resources to include email service enablement alongside ingress enablement.                                                                                                                                                                                                                                                                                                                                                            |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant Helm
    participant Kubernetes API
    participant Email Service Pod
    participant ConfigMap/Secret
    participant Cert-Manager

    User->>Helm: Enable email_service and set config
    Helm->>Kubernetes API: Deploy email Service, Deployment, ConfigMap, Certificate (if enabled)
    Kubernetes API->>ConfigMap/Secret: Create email-env resources
    Kubernetes API->>Cert-Manager: Create Certificate for SMTP domain (if needed)
    Kubernetes API->>Email Service Pod: Start pod with mounted secrets, config, and certs
    Email Service Pod->>User: Ready to handle email traffic (SMTP/SMTPS)

Suggested reviewers

  • mguptahub

Poem

🐇
New email winds begin to blow,
With configs, secrets, certs in tow.
SMTP ports open wide,
Helm charts guide the bunny’s ride.
Blacklists, spam, and tokens too—
The email service hops anew!
📧✨


<!-- walkthrough_end -->

<!-- announcements_start -->

> [!NOTE]
> <details>
> <summary>⚡️ AI Code Reviews for VS Code, Cursor, Windsurf</summary>
> 
> CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
> Learn more [here](http://coderabbit.ai/ide).
> 
> </details>

---

> [!NOTE]
> <details>
> <summary>⚡️ Faster reviews with caching</summary>
> 
> CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure `Review - Disable Cache` at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the `Data Retention` setting under your Organization Settings.
> Enjoy the performance boost—your workflow just got faster.
> 
> </details>

<!-- announcements_end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 0a8362e90c69edfccd293c985842671085bfb7e1 and 98ef978e4a4daef2ec06729af46e16e9ed3298b0.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `charts/plane-enterprise/templates/certs/cert-issuers.yaml` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 YAMLlint (1.37.1)</summary>

<details>
<summary>charts/plane-enterprise/templates/certs/cert-issuers.yaml</summary>

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

</details>

</details>

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAbQBJADkAMRsAQTAARkyATgBday9MEjAAUVKuADMSai402npS5m1fAGVKCXgGEmjIAHc0ZAcBZnUaejkw2A9sREp0AGtEWGoAVgBmAAYAJnRkbm9ffyCQyAxHAXmcgA5+LFxpvxJufER1fBdIZoXnovIAemmXmYYAYKwouEQGhgj1sKAwuAoimw3WQ5D6CgwlXgRGwVHE+AwyH8RXGYXwUw8TRakHaFE63X66gQ91hfxK5UgAAkSM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WOxl5SqLbgvKQp44wDRmGf5NjJsuMMPn3jAJJW491v0CqD/H/HQNxl9OY1gIOoEvhiLF+SmCOLbuARSENlJV1oVsImnosSgY8KMA0A5HUymA05AiQMyFxR4Okl/ktZlG02VWae2FwkuqlNk5DBSCOKhQdNU/7Q4Q2l/PZmIt0J0p5K8J3fMKbl0FGQXY40mJk38W9JAsbgU2aBiMHfVYwIQl5dMJAszbFTbss1ECQFIAujGGs5k282Gd7v3oYhNOoGJrs+MF1Rdi/ddm1NYWtb1V/U4WNb/e9tNNNZ4d9hSGbZ7CNS9oS5NcS7NBOndpYeVJAlVCQAANx3Biba51NII2NuG5PVxVhaa0ByNU6vgGAYRTRfg/h/hG1rwkRgR+BoAUTi53Q0SKB0RqAMRoTMQSvvgKCsDqDazwDiHayhOmTlS0C6wzhO7iuSt4nwqbCZC0ACChIEkCDbDrAMCbCkkkB4lbDbACDxWbAMAUrbC0B4kkDrC0CrCrDutklMSGCSs5AkCZB4mVDrDbBkmeu+YCCrAuurCXCbBkk+sCDXAMCZAEnbB4kCC0BOuZDrCZBoA5ACCJt6sQCQCbBoDXDrBVskA5AhsEkptarxW0DbA5Bes3Ckl4nbAElknwrXCFuVACBkmpttvJvXCDI5Bkmbt4loB4mJiDLbCiCbBzvju1aEmpsEn9t0CZs3ACCbBtvttQAgRGsmuIBmtgsWt0CcP0D6BAA= -->

<!-- internal state end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=makeplane/helm-charts&utm_content=98):

- 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](https://www.coderabbit.ai/contact-us/support) 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](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in 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.

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@akshat5302 akshat5302 changed the title Plane-EE: feat: Add Email Service [INFRA-119]Plane-EE: feat: Add Email Service May 7, 2025
@makeplane
Copy link

makeplane bot commented May 7, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

@akshat5302 akshat5302 changed the title [INFRA-119]Plane-EE: feat: Add Email Service [INFRA-119] Plane-EE: feat: Add Email Service May 7, 2025
…es to use artifacts.plane.so for consistency across configurations.
@akshat5302 akshat5302 marked this pull request as ready for review May 21, 2025 10:51
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: 6

🧹 Nitpick comments (11)
charts/plane-enterprise/templates/certs/email-certs.yaml (1)

10-10: Remove trailing whitespace
Line 10 contains trailing spaces which YAMLLint flags; please remove them to avoid formatting errors. Also add a newline at EOF to satisfy POSIX conventions.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 10-10: trailing spaces

(trailing-spaces)

charts/plane-enterprise/values.yaml (1)

154-160: Add standard pullPolicy and cluster IP settings
All other services define a pullPolicy (e.g. IfNotPresent) and assign_cluster_ip flag. Consider extending the email service block for consistency:

  email_service:
    enabled: false       # or true, per above
    replicas: 1
    memory_limit: 1000Mi
    cpu_limit: 500m
    image: artifacts.plane.so/makeplane/email-commercial
    pullPolicy: IfNotPresent          # ← new
    assign_cluster_ip: false          # ← new
charts/plane-enterprise/templates/config-secrets/email-env.yaml (1)

14-16: Remove trailing spaces and add EOF newline
Lines 14 and 15 end with extraneous spaces; please strip them. Also ensure the file ends with a single newline character.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 14-14: trailing spaces

(trailing-spaces)


[error] 15-15: trailing spaces

(trailing-spaces)

charts/plane-enterprise/questions.yml (1)

71-71: Remove trailing whitespace
Line 71 has trailing spaces; please remove to adhere to YAMLLint conventions.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 71-71: trailing spaces

(trailing-spaces)

charts/plane-enterprise/templates/workloads/email.deployment.yaml (7)

3-26: Service manifest review: Consider configurability of Service type.

The Service resource exposes SMTP ports via a LoadBalancer, which may incur cloud-provider costs. To increase flexibility, consider making the Service type configurable (e.g., .Values.services.email_service.serviceType) with a sensible default (LoadBalancer) so users can opt for ClusterIP or NodePort in different environments.


28-36: Deployment metadata: Add metadata.labels for Deployment.

Best practice dictates that Deployment.metadata.labels match spec.selector.matchLabels and spec.template.metadata.labels, which improves discoverability in dashboards and promotes consistency. Consider adding:

metadata:
  labels:
    app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-email-app

under the Deployment metadata block.


44-45: Remove trailing spaces and fix indentation under labels.

Lines 44 and 45 have trailing whitespace and misaligned indentation. Align the app.name entry two spaces under labels and remove trailing spaces:

-      labels:
-       app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-email-app 
+      labels:
+        app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-email-app
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 44-44: trailing spaces

(trailing-spaces)


[error] 45-45: trailing spaces

(trailing-spaces)


69-77: VolumeMount indentation: Fix alignment under volumeMounts.

Static analysis flagged inconsistent indentation at lines 70–77. Align all volume mounts two spaces under volumeMounts:

-        volumeMounts:
-          - name: tls-cert
-            mountPath: /opt/email/keys
+        volumeMounts:
+          - name: tls-cert
+            mountPath: /opt/email/keys
            ...

Ensure each - name: entry is indented exactly two spaces under volumeMounts.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 70-70: wrong indentation: expected 8 but found 10

(indentation)


78-86: Volume spec indentation and secretName consistency.

The volumes block has incorrect indentation (line 79). Also, double-check that secretName: {{ .Release.Name }}-mail-tls-secret matches the name used in the certificate template (email-certs.yaml). Align indentation so that:

      volumes:
        - name: spam-blacklist
          configMap:
            name: {{ .Release.Name }}-email-vars
        - name: tls-cert
          secret:
            secretName: {{ .Release.Name }}-mail-tls-secret
            items:
              - key: tls.crt
                path: cert.pem
              - key: tls.key
                path: key.pem
            optional: false
🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 79-79: wrong indentation: expected 6 but found 8

(indentation)


91-92: Remove deprecated serviceAccount field.

serviceAccountName is sufficient for binding a ServiceAccount to the Pod. The serviceAccount field is deprecated and can be removed to avoid confusion:

-      serviceAccount: {{ .Release.Name }}-srv-account
        serviceAccountName: {{ .Release.Name }}-srv-account

94-94: Add newline at end of file.

YAML files should end with a newline to satisfy POSIX standards and tools like yamllint. Please add an empty line after {{- end }}.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 94-94: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between c76b1a7 and 41001db.

📒 Files selected for processing (6)
  • charts/plane-enterprise/Chart.yaml (1 hunks)
  • charts/plane-enterprise/questions.yml (2 hunks)
  • charts/plane-enterprise/templates/certs/email-certs.yaml (1 hunks)
  • charts/plane-enterprise/templates/config-secrets/email-env.yaml (1 hunks)
  • charts/plane-enterprise/templates/workloads/email.deployment.yaml (1 hunks)
  • charts/plane-enterprise/values.yaml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
charts/plane-enterprise/templates/certs/email-certs.yaml

[error] 10-10: trailing spaces

(trailing-spaces)


[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

charts/plane-enterprise/templates/config-secrets/email-env.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 14-14: trailing spaces

(trailing-spaces)


[error] 15-15: trailing spaces

(trailing-spaces)


[error] 36-36: no new line character at the end of file

(new-line-at-end-of-file)

charts/plane-enterprise/questions.yml

[error] 71-71: trailing spaces

(trailing-spaces)

charts/plane-enterprise/templates/workloads/email.deployment.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 44-44: trailing spaces

(trailing-spaces)


[error] 45-45: trailing spaces

(trailing-spaces)


[warning] 63-63: wrong indentation: expected 8 but found 10

(indentation)


[warning] 70-70: wrong indentation: expected 8 but found 10

(indentation)


[warning] 79-79: wrong indentation: expected 6 but found 8

(indentation)


[error] 94-94: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (3)
charts/plane-enterprise/Chart.yaml (1)

8-8: Approve version bump
The chart version has been correctly incremented from 1.2.2 to 1.2.3 to reflect the new email service additions.

charts/plane-enterprise/templates/workloads/email.deployment.yaml (2)

1-2: Conditional rendering check: Ensure Helm conditional is correct.

The {{- if .Values.services.email_service.enabled }} directive properly gates the Service and Deployment resources. This matches the intended enablement flag and follows Helm templating best practices.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


62-68: Verify environment ConfigMap/Secret names match.

Ensure that {{ .Release.Name }}-email-vars and {{ .Release.Name }}-email-secrets are created in the email-env.yaml template and include the expected keys (spam-blacklists and credentials). A mismatch here could lead to pod startup failures.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 63-63: wrong indentation: expected 8 but found 10

(indentation)

Comment on lines +48 to +62
containers:
- name: {{ .Release.Name }}-email-app
image: {{ .Values.services.email_service.image | default "artifacts.plane.so/makeplane/email-commercial" }}:{{ .Values.planeVersion }}
securityContext:
runAsUser: 100
stdin: true
tty: true
resources:
requests:
memory: "50Mi"
cpu: "50m"
limits:
memory: {{ .Values.services.email_service.memory_limit | default "1000Mi" | quote }}
cpu: {{ .Values.services.email_service.cpu_limit | default "500m" | quote}}
envFrom:
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider adding health probes and configurable resource requests.

Currently, the container lacks liveness/readiness probes and has hardcoded resource requests. For production readiness, add livenessProbe and readinessProbe, and make the requests (CPU/memory) configurable via chart values (e.g., .Values.services.email_service.requests).

🤖 Prompt for AI Agents
In charts/plane-enterprise/templates/workloads/email.deployment.yaml between
lines 48 and 62, the container definition lacks liveness and readiness probes
and has hardcoded resource requests. To fix this, add `livenessProbe` and
`readinessProbe` sections with appropriate probe configurations, and update the
resource requests for CPU and memory to be configurable via chart values such as
`.Values.services.email_service.requests.cpu` and
`.Values.services.email_service.requests.memory` instead of hardcoded values.

…and questions, update email secrets to use ConfigMap, and add readiness probe to email deployment.
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: 1

♻️ Duplicate comments (2)
charts/plane-enterprise/questions.yml (1)

432-476: Validate SSL question variables usage
The SSL fields (ssl.issuer, ssl.server, ssl.email, ssl.token) are defined at the top level and will collide with the global ingress ssl.* settings. Please confirm whether the email service should consume the global ssl.* values or introduce a dedicated services.email_service.ssl.* block—and update email-certs.yaml accordingly.

charts/plane-enterprise/templates/workloads/email.deployment.yaml (1)

55-73: Add livenessProbe and make requests configurable
For production readiness, include a livenessProbe alongside the existing readinessProbe and expose resource requests via chart values (e.g., .Values.services.email_service.requests.cpu/.memory) instead of hardcoding them.

🧹 Nitpick comments (5)
charts/plane-enterprise/templates/config-secrets/email-env.yaml (2)

10-11: Remove trailing whitespace
There's an extra space at the end of the EMAIL_SAVE_ENDPOINT line that may trigger lint warnings.


22-22: Add newline at end of file
Ensure the file ends with a newline to satisfy POSIX conventions and avoid linter errors.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 22-22: no new line character at the end of file

(new-line-at-end-of-file)

charts/plane-enterprise/questions.yml (1)

71-71: Remove trailing whitespace
There is a trailing space on this blank line that can cause lint warnings.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 71-71: trailing spaces

(trailing-spaces)

charts/plane-enterprise/templates/workloads/email.deployment.yaml (2)

44-45: Remove trailing whitespace
There are trailing spaces on these lines which may lead to lint failures; please clean them up.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 44-44: trailing spaces

(trailing-spaces)


[error] 45-45: trailing spaces

(trailing-spaces)


102-102: Add newline at end of file
Ensure the file ends with a newline to comply with POSIX standards and avoid linter warnings.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 102-102: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41001db and 9e14f32.

📒 Files selected for processing (4)
  • charts/plane-enterprise/questions.yml (2 hunks)
  • charts/plane-enterprise/templates/config-secrets/email-env.yaml (1 hunks)
  • charts/plane-enterprise/templates/workloads/email.deployment.yaml (1 hunks)
  • charts/plane-enterprise/values.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/plane-enterprise/values.yaml
🧰 Additional context used
🪛 YAMLlint (1.37.1)
charts/plane-enterprise/templates/workloads/email.deployment.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 44-44: trailing spaces

(trailing-spaces)


[error] 45-45: trailing spaces

(trailing-spaces)


[warning] 74-74: wrong indentation: expected 8 but found 10

(indentation)


[warning] 78-78: wrong indentation: expected 8 but found 10

(indentation)


[warning] 87-87: wrong indentation: expected 6 but found 8

(indentation)


[error] 102-102: no new line character at the end of file

(new-line-at-end-of-file)

charts/plane-enterprise/questions.yml

[error] 71-71: trailing spaces

(trailing-spaces)

charts/plane-enterprise/templates/config-secrets/email-env.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 20-20: trailing spaces

(trailing-spaces)


[error] 22-22: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (3)
charts/plane-enterprise/templates/config-secrets/email-env.yaml (1)

3-13: ConfigMap resource definition is correct
The ConfigMap is conditionally created and properly populates SMTP domain, internal API endpoints, and embedded blacklists when the email service is enabled.

charts/plane-enterprise/questions.yml (1)

63-68: Approve new Docker image variable
The services.email_service.image entry is correctly added as a required subquestion under the Plane Version group, matching existing service definitions.

charts/plane-enterprise/templates/workloads/email.deployment.yaml (1)

3-13: Service resource definition is correct
The LoadBalancer service exposing SMTP ports with externalTrafficPolicy: Local is well-configured and aligns with best practices for email ingress.

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: 1

🧹 Nitpick comments (1)
charts/plane-enterprise/templates/certs/cert-issuers.yaml (1)

1-1: YAMLLint False Positive on Helm Directive
YAMLLint may flag the leading {{- if … }} on column 1 as a syntax error. To keep CI clean, consider disabling YAMLLint for this template or adding a file-level directive, e.g.:

# yamllint disable
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e14f32 and 0a8362e.

📒 Files selected for processing (1)
  • charts/plane-enterprise/templates/certs/cert-issuers.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
charts/plane-enterprise/templates/certs/cert-issuers.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

@@ -1,4 +1,4 @@
{{- if and .Values.ingress.enabled .Values.ssl.createIssuer (empty .Values.ssl.tls_secret_name) }}
{{- if and (or .Values.ingress.enabled .Values.services.email_service.enabled) .Values.ssl.createIssuer (empty .Values.ssl.tls_secret_name) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Conditional Logic Expanded to Include Email Service
The addition of .Values.services.email_service.enabled to the or clause correctly extends the ACME issuer provisioning to the new email-service component without breaking the existing ingress path.

Please verify that the path services.email_service.enabled is defined in your values.yaml. You can run:


🏁 Script executed:

#!/bin/bash
# Confirm the email_service flag path in values.yaml
rg -n 'services\.email_service\.enabled' charts/plane-enterprise/values.yaml

Length of output: 78


Let's search for any email_service or email-service keys in your values file:


🏁 Script executed:

#!/bin/bash
# Look for email service flags in values.yaml
echo "Checking for 'email_service' occurrences:"
rg -n 'email_service' -C2 charts/plane-enterprise/values.yaml
echo
echo "Checking for 'email-service' occurrences:"
rg -n 'email-service' -C2 charts/plane-enterprise/values.yaml

Length of output: 519


Incorrect Values Path in Certificate Issuer Conditional
It looks like the template is checking .Values.services.email_service.enabled, but your values.yaml defines email_service at the root, not under services. This means the email‐service branch will never be picked up.

Please update one of the following:

  • Move email_service: under a services: block in charts/plane-enterprise/values.yaml, or
  • Change the template at charts/plane-enterprise/templates/certs/cert-issuers.yaml to:
    - {{- if and (or .Values.ingress.enabled .Values.services.email_service.enabled) .Values.ssl.createIssuer (empty .Values.ssl.tls_secret_name) }}
    + {{- if and (or .Values.ingress.enabled .Values.email_service.enabled) .Values.ssl.createIssuer (empty .Values.ssl.tls_secret_name) }}

Locations to check:

  • charts/plane-enterprise/values.yaml (ensure the path you choose matches the template)
  • charts/plane-enterprise/templates/certs/cert-issuers.yaml (update the conditional)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- if and (or .Values.ingress.enabled .Values.services.email_service.enabled) .Values.ssl.createIssuer (empty .Values.ssl.tls_secret_name) }}
{{- if and (or .Values.ingress.enabled .Values.email_service.enabled) .Values.ssl.createIssuer (empty .Values.ssl.tls_secret_name) }}
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🤖 Prompt for AI Agents
In charts/plane-enterprise/templates/certs/cert-issuers.yaml at line 1, the
conditional references .Values.services.email_service.enabled, but your
values.yaml defines email_service at the root level, not under services. To fix
this, either move the email_service block under services in
charts/plane-enterprise/values.yaml or update the conditional in
cert-issuers.yaml to check .Values.email_service.enabled instead, ensuring the
paths are consistent between the template and values file.

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