diff --git a/apps/k8s01/uptime-kuma/kustomization.yaml b/apps/k8s01/uptime-kuma/kustomization.yaml index ba695526257550405fddba1c4b1efe7ea7f884c7..dec8ee28ac5f9266c6c7078f9c06c9f56e0d38d9 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 0000000000000000000000000000000000000000..730465a3a96a3017487dd95f615eaef0e2a36340 --- /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 0000000000000000000000000000000000000000..4c08417938f3cb77a77fd2be2551c9a16849feb6 --- /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