From e431abb9a6e6f947891e0a10c4e8a08fd1bf7e7e Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Mon, 9 Oct 2023 15:54:59 +0200 Subject: [PATCH] Added postfix deployment, added resource limit to dovecot --- .gitignore | 1 + kustomize/dovecot-deployment.yaml | 4 ++++ kustomize/dovecot-volume.yaml | 2 +- kustomize/postfix-deployment.yaml | 31 +++++++++++++++++++++++++++++++ kustomize/postfix-svc.yaml | 17 +++++++++++++++++ 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..722d5e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode diff --git a/kustomize/dovecot-deployment.yaml b/kustomize/dovecot-deployment.yaml index a6f977e..92bb55d 100644 --- a/kustomize/dovecot-deployment.yaml +++ b/kustomize/dovecot-deployment.yaml @@ -21,6 +21,10 @@ spec: containers: - image: git.altarik.fr/quentinlegot/dovecot:latest name: dovecot + resources: + limits: + memory: "128Mi" + cpu: "500m" ports: - containerPort: 24 name: lmtp diff --git a/kustomize/dovecot-volume.yaml b/kustomize/dovecot-volume.yaml index d21efb8..62a6eaa 100644 --- a/kustomize/dovecot-volume.yaml +++ b/kustomize/dovecot-volume.yaml @@ -9,4 +9,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi \ No newline at end of file + storage: 250Mi \ No newline at end of file diff --git a/kustomize/postfix-deployment.yaml b/kustomize/postfix-deployment.yaml index e69de29..2e2b907 100644 --- a/kustomize/postfix-deployment.yaml +++ b/kustomize/postfix-deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postfix + labels: + app: postfix +spec: + selector: + matchLabels: + app: postfix + template: + metadata: + labels: + app: postfix + tier: smtp + spec: + containers: + - name: postfix + image: git.altarik.fr/quentinlegot/postfix:latest + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 25 + name: smtp + - containerPort: 143 + name: auth smtp tls + - containerPort: 587 + name: msa + diff --git a/kustomize/postfix-svc.yaml b/kustomize/postfix-svc.yaml index e69de29..0dde14d 100644 --- a/kustomize/postfix-svc.yaml +++ b/kustomize/postfix-svc.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: postfix + labels: + app: postfix +spec: + selector: + app: postfix + type: LoadBalancer + ports: + - port: 30025 + targetPort: 25 + - port: 30143 + targetPort: 143 + - port: 30587 + targetPort: 587