Files
nplus/samples/shared/centralservices-networkpolicy.yaml

54 lines
1.2 KiB
YAML
Raw Normal View History

2025-01-24 16:18:47 +01:00
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: sample-shared-cs-interinstance-core
labels:
nplus/instance: sample-shared-cs
spec:
podSelector:
matchLabels:
nplus/instance: sample-shared-cs
nplus/type: nstl
policyTypes:
- Ingress
ingress:
#
# allow access from alien CORE components to a central nscale Storage Layer
#
- from:
- podSelector:
matchLabels:
nplus/instance: sample-shared
nplus/type: core
ports:
- protocol: TCP
port: 3005
---
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: sample-shared-cs-interinstance-mon
labels:
nplus/instance: sample-shared-cs
spec:
podSelector:
matchLabels:
nplus/instance: sample-shared-cs
nplus/type: mon
policyTypes:
- Egress
egress:
#
# allow monitoring console to monitor alien components.
# you will have to set the alien monitoring in the target namespace / instance.
# .Values.security.cni.monitoringNamespace .Values.security.cni.monitoringInstance
#
- to:
- podSelector:
matchLabels:
nplus/instance: sample-shared
nplus/type: core
ports:
- protocol: TCP
port: 3005