From c5f80c48533d23506395f0cab4013620826f9a46 Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Fri, 21 Jul 2023 23:47:26 +0200 Subject: [PATCH] feat(uptime-kuma): Add SMTP support --- apps/k8s01/uptime-kuma/kustomization.yaml | 3 +++ apps/k8s01/uptime-kuma/networkpolicy.yaml | 9 +++++++++ .../networkpolicies/allow-to-mailbox-org.yaml | 17 +++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 apps/k8s01/uptime-kuma/networkpolicy.yaml create mode 100644 shared/networkpolicies/allow-to-mailbox-org.yaml diff --git a/apps/k8s01/uptime-kuma/kustomization.yaml b/apps/k8s01/uptime-kuma/kustomization.yaml index ba6955262..dec8ee28a 100644 --- a/apps/k8s01/uptime-kuma/kustomization.yaml +++ b/apps/k8s01/uptime-kuma/kustomization.yaml @@ -8,3 +8,6 @@ resources: - slo.yaml - oauth2.yaml - ../../../shared/resourcequotas/default.yaml + - ../../../shared/networkpolicies/allow-to-mailbox-org.yaml +patchesStrategicMerge: + - networkpolicy.yaml diff --git a/apps/k8s01/uptime-kuma/networkpolicy.yaml b/apps/k8s01/uptime-kuma/networkpolicy.yaml new file mode 100644 index 000000000..730465a3a --- /dev/null +++ b/apps/k8s01/uptime-kuma/networkpolicy.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-to-mailbox-org +spec: + podSelector: + matchLabels: + app.kubernetes.io/name: uptime-kuma \ No newline at end of file diff --git a/shared/networkpolicies/allow-to-mailbox-org.yaml b/shared/networkpolicies/allow-to-mailbox-org.yaml new file mode 100644 index 000000000..4c0841793 --- /dev/null +++ b/shared/networkpolicies/allow-to-mailbox-org.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-to-mailbox-org +spec: + egress: + - to: + - ipBlock: + cidr: 185.97.174.196/32 + ports: + - protocol: TCP + port: 80 + - protocol: TCP + port: 443 + policyTypes: + - Egress \ No newline at end of file -- GitLab