NetworkPolicy
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
@@ -11,15 +10,26 @@ spec:
|
||||
app: memelord-raiko-redis
|
||||
app.kubernetes.io/name: dragonfly
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: memelord
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
# App -> Redis
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: memelord
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
|
||||
# Prom -> Redis
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: monitoring
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
@@ -80,15 +90,16 @@ metadata:
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: memelord
|
||||
app: memelord
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: traefik
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8000
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: traefik
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8000
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user