Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b7499c689 |
@@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
# Keep the GraphQL server reachable only from the one service that proxies it.
|
|
||||||
#
|
|
||||||
# poimen-graphql is already off the internet: its Service is ClusterIP on 8090 and
|
|
||||||
# no Ingress names it. What it lacked is in-cluster isolation — a ClusterIP answers
|
|
||||||
# every pod in the cluster.
|
|
||||||
#
|
|
||||||
# The only caller is poimen-memory, whose /graphql route forwards the request body
|
|
||||||
# to MEM_GQL_PORT (8090). No other workload references this service.
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: NetworkPolicy
|
|
||||||
metadata:
|
|
||||||
name: poimen-graphql-ingress
|
|
||||||
namespace: poimen
|
|
||||||
spec:
|
|
||||||
podSelector:
|
|
||||||
matchLabels:
|
|
||||||
app.kubernetes.io/name: poimen-graphql
|
|
||||||
policyTypes:
|
|
||||||
- Ingress
|
|
||||||
ingress:
|
|
||||||
- from:
|
|
||||||
- podSelector:
|
|
||||||
matchLabels:
|
|
||||||
app.kubernetes.io/name: poimen-memory
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
port: 8090
|
|
||||||
@@ -8,8 +8,6 @@ resources:
|
|||||||
- memory-db.yaml
|
- memory-db.yaml
|
||||||
# ClusterIP alone is not isolation: every pod in the cluster can reach it.
|
# ClusterIP alone is not isolation: every pod in the cluster can reach it.
|
||||||
- memory-db-netpol.yaml
|
- memory-db-netpol.yaml
|
||||||
# Only poimen-memory's /graphql proxy calls 8090.
|
|
||||||
- graphql-netpol.yaml
|
|
||||||
- poimen-sandbox-namespace.yaml
|
- poimen-sandbox-namespace.yaml
|
||||||
- poimen-sandbox-quota.yaml
|
- poimen-sandbox-quota.yaml
|
||||||
- pi-session-netpol.yaml
|
- pi-session-netpol.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user