feat(k8s): add Kubernetes Helm chart for emailks service
- Create Helm chart structure with Chart.yaml and values.yaml - Add deployment template with container configuration and environment variables - Implement service template for gRPC port exposure - Add service account template with security configuration - Include horizontal pod autoscaler template for scaling capabilities - Add helper templates for naming and label management - Configure SMTP settings as configurable parameters in values.yaml - Set up resource limits and requests for container performance - Implement liveness and readiness probes for health checks - Add support for existing secrets and custom configurations
This commit is contained in:
@@ -6,6 +6,7 @@ use lettre::{
|
||||
},
|
||||
transport::smtp::{self, authentication::Credentials, extension::ClientId},
|
||||
};
|
||||
use tracing;
|
||||
|
||||
use crate::{
|
||||
config::{SmtpConfig, SmtpTls},
|
||||
@@ -105,6 +106,13 @@ pub(crate) fn build_single_attachment(
|
||||
url: att.url.clone(),
|
||||
});
|
||||
}
|
||||
if !att.data.is_empty() && !att.url.trim().is_empty() {
|
||||
tracing::warn!(
|
||||
filename = att.filename,
|
||||
url = att.url,
|
||||
"attachment has both inline data and url; url will be ignored"
|
||||
);
|
||||
}
|
||||
let ct: ContentType = if att.content_type.trim().is_empty() {
|
||||
"application/octet-stream"
|
||||
.parse()
|
||||
@@ -228,6 +236,9 @@ pub fn build_message_from_parts(
|
||||
}
|
||||
|
||||
let from = resolve_sender(config, request)?;
|
||||
if request.subject.trim().is_empty() {
|
||||
tracing::warn!("email subject is empty — some SMTP servers may reject it");
|
||||
}
|
||||
let mut builder = Message::builder()
|
||||
.from(from)
|
||||
.subject(request.subject.clone());
|
||||
|
||||
Reference in New Issue
Block a user