feat(notification): enable production publisher
Preserve production broker definitions and allow bounded SMTP delivery. Ref: IT-1508
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: production-to-rabbitmq
|
||||
namespace: invemory-production
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: invemory-production
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: In
|
||||
values: [api, worker]
|
||||
policyTypes: [Egress]
|
||||
egress:
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: shared-notification
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: rabbitmq
|
||||
app.kubernetes.io/name: hrynco-shared-notification
|
||||
app.kubernetes.io/managed-by: hrynco-shared-notification
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5672
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: rabbitmq-from-invemory-production
|
||||
namespace: shared-notification
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: rabbitmq
|
||||
app.kubernetes.io/name: hrynco-shared-notification
|
||||
app.kubernetes.io/managed-by: hrynco-shared-notification
|
||||
policyTypes: [Ingress]
|
||||
ingress:
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: invemory-production
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: invemory-production
|
||||
invemory.com/environment: production
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: In
|
||||
values: [api, worker]
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5672
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: worker-to-external-smtp
|
||||
namespace: shared-notification
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: worker
|
||||
app.kubernetes.io/name: hrynco-shared-notification
|
||||
app.kubernetes.io/managed-by: hrynco-shared-notification
|
||||
policyTypes: [Egress]
|
||||
egress:
|
||||
- to:
|
||||
- ipBlock:
|
||||
cidr: 0.0.0.0/0
|
||||
except:
|
||||
- 10.0.0.0/8
|
||||
- 100.64.0.0/10
|
||||
- 127.0.0.0/8
|
||||
- 169.254.0.0/16
|
||||
- 172.16.0.0/12
|
||||
- 192.168.0.0/16
|
||||
- 224.0.0.0/4
|
||||
- 240.0.0.0/4
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 587
|
||||
Reference in New Issue
Block a user