Three fenced worker Pods claim Hermes Kanban runs through a coordinator that owns every state transition, with per-ordinal HMAC authority, a mediated broker-only SCM path, and durable per-ordinal workspaces. Content is the reviewed head of PR #18 (689bcb6e) with PR 16's and PR 19's contributions removed: they were merged in only to validate co-existence and are not prerequisites, so this branch no longer carries them as ancestors. Only PR 14 and PR 15 remain, because the broker boundary and the cli_lane_* decomposition are load-bearing for two of the fixed P0 boundaries. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
207 lines
5.4 KiB
YAML
207 lines
5.4 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-worker-isolation
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: hermes-execution-worker
|
|
policyTypes: [Ingress, Egress]
|
|
ingress: []
|
|
egress:
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: kube-system}
|
|
podSelector:
|
|
matchLabels: {k8s-app: kube-dns}
|
|
ports: [{protocol: UDP, port: 53}, {protocol: TCP, port: 53}]
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: vault}
|
|
podSelector:
|
|
matchLabels: {app: vault}
|
|
ports: [{protocol: TCP, port: 8200}]
|
|
- to:
|
|
- podSelector:
|
|
matchLabels: {app: hermes-switchyard}
|
|
ports: [{protocol: TCP, port: 9005}]
|
|
- 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
|
|
ports: [{protocol: TCP, port: 443}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-worker-mediator-0
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: hermes-execution-worker
|
|
apps.kubernetes.io/pod-index: "0"
|
|
policyTypes: [Egress]
|
|
egress:
|
|
- to:
|
|
- podSelector:
|
|
matchLabels: {app: hermes-execution-mediator, pool-ordinal: "0"}
|
|
ports: [{protocol: TCP, port: 9009}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-worker-mediator-1
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: hermes-execution-worker
|
|
apps.kubernetes.io/pod-index: "1"
|
|
policyTypes: [Egress]
|
|
egress:
|
|
- to:
|
|
- podSelector:
|
|
matchLabels: {app: hermes-execution-mediator, pool-ordinal: "1"}
|
|
ports: [{protocol: TCP, port: 9009}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-worker-mediator-2
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: hermes-execution-worker
|
|
apps.kubernetes.io/pod-index: "2"
|
|
policyTypes: [Egress]
|
|
egress:
|
|
- to:
|
|
- podSelector:
|
|
matchLabels: {app: hermes-execution-mediator, pool-ordinal: "2"}
|
|
ports: [{protocol: TCP, port: 9009}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-pool-ingress
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {app: hermes-agent}
|
|
policyTypes: [Ingress]
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels: {app: hermes-execution-mediator}
|
|
ports: [{protocol: TCP, port: 9007}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-mediator-isolation
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {app: hermes-execution-mediator}
|
|
policyTypes: [Ingress, Egress]
|
|
ingress: []
|
|
egress:
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: kube-system}
|
|
podSelector:
|
|
matchLabels: {k8s-app: kube-dns}
|
|
ports: [{protocol: UDP, port: 53}, {protocol: TCP, port: 53}]
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: vault}
|
|
podSelector:
|
|
matchLabels: {app: vault}
|
|
ports: [{protocol: TCP, port: 8200}]
|
|
- to:
|
|
- podSelector:
|
|
matchLabels: {app: hermes-agent}
|
|
ports: [{protocol: TCP, port: 9007}]
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: hermes-scm}
|
|
podSelector:
|
|
matchLabels: {app: hermes-scm-broker}
|
|
ports: [{protocol: TCP, port: 9081}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-mediator-worker-0
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {app: hermes-execution-mediator, pool-ordinal: "0"}
|
|
policyTypes: [Ingress]
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels:
|
|
app: hermes-execution-worker
|
|
apps.kubernetes.io/pod-index: "0"
|
|
ports: [{protocol: TCP, port: 9009}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-mediator-worker-1
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {app: hermes-execution-mediator, pool-ordinal: "1"}
|
|
policyTypes: [Ingress]
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels:
|
|
app: hermes-execution-worker
|
|
apps.kubernetes.io/pod-index: "1"
|
|
ports: [{protocol: TCP, port: 9009}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-mediator-worker-2
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {app: hermes-execution-mediator, pool-ordinal: "2"}
|
|
policyTypes: [Ingress]
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels:
|
|
app: hermes-execution-worker
|
|
apps.kubernetes.io/pod-index: "2"
|
|
ports: [{protocol: TCP, port: 9009}]
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: hermes-execution-switchyard-ingress
|
|
namespace: hermes
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {app: hermes-switchyard}
|
|
policyTypes: [Ingress]
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels: {app: hermes-execution-worker}
|
|
ports: [{protocol: TCP, port: 9005}]
|