Skip to content

Commit 62267b9

Browse files
committed
style(llama-cpp): match karma's network-policy style
1 parent 2fb6e05 commit 62267b9

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

apps/llama-cpp/k8s.np.llama-cpp.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
# llama-cpp Network Policy
3-
# Allows:
4-
# - Ingress from Traefik on port 8080 (the OpenAI API surface)
5-
# - DNS egress (CoreDNS) — required for Service-name resolution at startup
6-
# No other egress: the model is local, no internet access at runtime.
2+
# llama-cpp application-specific network policy.
3+
# Selecting the pod via endpointSelector implicitly puts it under default-deny;
4+
# only explicitly allowed traffic passes.
75
apiVersion: cilium.io/v2
86
kind: CiliumNetworkPolicy
97
metadata:
@@ -16,19 +14,17 @@ spec:
1614
matchLabels:
1715
app: llama-cpp
1816
ingress:
19-
# Traefik -> llama-cpp on port 8080. Traefik is the kube-system Helm
20-
# release `traefik-kube-system`. This selector matches the instance label
21-
# that the chart sets — same pattern as apps/lldap/k8s.np.lldap.yaml.
17+
# Traefik forwards client traffic to the OpenAI API surface
2218
- fromEndpoints:
2319
- matchLabels:
24-
k8s:io.kubernetes.pod.namespace: kube-system
2520
k8s:app.kubernetes.io/instance: traefik-kube-system
21+
k8s:io.kubernetes.pod.namespace: kube-system
2622
toPorts:
2723
- ports:
2824
- port: "8080"
2925
protocol: TCP
3026
egress:
31-
# DNS via CoreDNS
27+
# DNS
3228
- toEndpoints:
3329
- matchLabels:
3430
k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name: kube-system

0 commit comments

Comments
 (0)