feat(mail): add stunnel support for Dovecot and Postfix with configuration and certificate management
This commit is contained in:
@@ -47,6 +47,7 @@ resource "kubernetes_deployment" "postfix" {
|
||||
annotations = {
|
||||
"checksum/runconfig" = local.postfix_run_config_checksum
|
||||
"checksum/bccmap" = local.postfix_bcc_map_checksum
|
||||
"checksum/stunnel" = local.postfix_stunnel_config_checksum
|
||||
}
|
||||
}
|
||||
spec {
|
||||
@@ -105,6 +106,23 @@ resource "kubernetes_deployment" "postfix" {
|
||||
read_only = false
|
||||
}
|
||||
}
|
||||
container {
|
||||
name = "stunnel"
|
||||
image = "chainguard/stunnel:${local.stunnel_tag}"
|
||||
args = ["/etc/conf/stunnel.conf"]
|
||||
volume_mount {
|
||||
name = "stunnel-config"
|
||||
mount_path = "/etc/conf/stunnel.conf"
|
||||
sub_path = "stunnel.conf"
|
||||
read_only = true
|
||||
}
|
||||
volume_mount {
|
||||
name = "stunnel-ca"
|
||||
mount_path = "/etc/ssl/certs/ca.pem"
|
||||
sub_path = "ca.pem"
|
||||
read_only = true
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "email-storage"
|
||||
host_path {
|
||||
@@ -135,6 +153,18 @@ resource "kubernetes_deployment" "postfix" {
|
||||
path = "/var/log/postfix"
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "stunnel-config"
|
||||
config_map {
|
||||
name = kubernetes_config_map.stunnel_postfix.metadata[0].name
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "stunnel-ca"
|
||||
config_map {
|
||||
name = kubernetes_config_map.ca_pem.metadata[0].name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user