-
Notifications
You must be signed in to change notification settings - Fork 23
[INFRA-119] Plane-EE: feat: Add Email Service #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0dcfd33
Plane-EE: Add Email Service configuration to Helm chart
akshat5302 7f56a22
Add TLS certificate configuration for email service in Helm chart
akshat5302 8f792c3
Merge branch 'develop' of https://github.com/makeplane/helm-charts in…
akshat5302 41001db
Update Plane version to 1.2.3 and change email service image referenc…
akshat5302 4f99c91
Refactor email service configuration: remove webhook URL from values …
akshat5302 9e14f32
Disable email service in values.yaml configuration
akshat5302 0a8362e
Update cert-issuers.yaml to conditionally enable SSL issuer based on …
akshat5302 98ef978
Refactor condition for SSL issuer in cert-issuers.yaml to prioritize …
akshat5302 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| {{- if and .Values.services.email_service.enabled .Values.env.email_service_envs.smtp_domain }} | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: {{ .Release.Name }}-mail-tls-cert | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| dnsNames: | ||
| - {{ .Values.env.email_service_envs.smtp_domain | quote }} | ||
|
|
||
| issuerRef: | ||
| name: {{ .Release.Name }}-cert-issuer | ||
| secretName: {{ .Release.Name }}-mail-tls-secret | ||
| --- | ||
mguptahub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| {{- end }} | ||
mguptahub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
22 changes: 22 additions & 0 deletions
22
charts/plane-enterprise/templates/config-secrets/email-env.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| {{- if .Values.services.email_service.enabled }} | ||
|
|
||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ .Release.Name }}-email-vars | ||
| namespace: {{ .Release.Namespace }} | ||
| data: | ||
| SMTP_DOMAIN: {{ .Values.env.email_service_envs.smtp_domain | default "" | quote }} | ||
| EMAIL_SAVE_ENDPOINT: "http://{{ .Release.Name }}-api.{{ .Release.Namespace }}.svc.cluster.local:8000/intake/email/" | ||
| WEBHOOK_URL: "http://{{ .Release.Name }}-api.{{ .Release.Namespace }}.svc.cluster.local:8000/intake/email/" | ||
| domain-blacklist.txt: | | ||
| 10minutemail.com | ||
| 10minutemail.net | ||
| 10minutemail.org | ||
| spam.txt: | | ||
| casino | ||
| lottery | ||
| jackpot | ||
|
|
||
| --- | ||
| {{- end }} |
102 changes: 102 additions & 0 deletions
102
charts/plane-enterprise/templates/workloads/email.deployment.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| {{- if .Values.services.email_service.enabled }} | ||
|
|
||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ .Release.Name }}-email-service | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| type: LoadBalancer | ||
| externalTrafficPolicy: Local # Important for email servers | ||
| selector: | ||
| app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-email-app | ||
| ports: | ||
| - name: smtp | ||
| port: 25 | ||
| targetPort: 10025 | ||
| protocol: TCP | ||
| - name: smtps | ||
| port: 465 | ||
| targetPort: 10465 | ||
| protocol: TCP | ||
| - name: submission | ||
| port: 587 | ||
| targetPort: 10587 | ||
| protocol: TCP | ||
| --- | ||
|
|
||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ .Release.Name }}-email-app | ||
| namespace: {{ .Release.Namespace }} | ||
| annotations: | ||
| reloader.stakater.com/auto: "true" | ||
| spec: | ||
| replicas: {{ .Values.services.email_service.replicas | default 1 }} | ||
| selector: | ||
| matchLabels: | ||
| app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-email-app | ||
| template: | ||
| metadata: | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
mguptahub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-email-app | ||
| annotations: | ||
| timestamp: {{ now | quote }} | ||
| spec: | ||
mguptahub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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 | ||
| readinessProbe: | ||
| exec: | ||
| command: | ||
| - nc | ||
| - -zv | ||
| - localhost | ||
| - "10025" | ||
| initialDelaySeconds: 30 | ||
| periodSeconds: 10 | ||
| timeoutSeconds: 5 | ||
| failureThreshold: 3 | ||
| 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: | ||
| - configMapRef: | ||
| name: {{ .Release.Name }}-email-vars | ||
| optional: false | ||
| volumeMounts: | ||
| - name: tls-cert | ||
| mountPath: /opt/email/keys | ||
| - name: spam-blacklist | ||
| mountPath: /opt/email/spam.txt | ||
| subPath: spam.txt | ||
| - name: spam-blacklist | ||
| mountPath: /opt/email/domain-blacklist.txt | ||
| subPath: domain-blacklist.txt | ||
| 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 | ||
| serviceAccount: {{ .Release.Name }}-srv-account | ||
| serviceAccountName: {{ .Release.Name }}-srv-account | ||
| --- | ||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.enabledto theorclause 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.enabledis defined in yourvalues.yaml. You can run:🏁 Script executed:
Length of output: 78
Let's search for any
email_serviceoremail-servicekeys in your values file:🏁 Script executed:
Length of output: 519
Incorrect Values Path in Certificate Issuer Conditional
It looks like the template is checking
.Values.services.email_service.enabled, but yourvalues.yamldefinesemail_serviceat the root, not underservices. This means the email‐service branch will never be picked up.Please update one of the following:
email_service:under aservices:block incharts/plane-enterprise/values.yaml, orcharts/plane-enterprise/templates/certs/cert-issuers.yamlto:Locations to check:
📝 Committable suggestion
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
🤖 Prompt for AI Agents