Autonomous session: Phase-2 platform authoring + Flux bootstrap progress
Author-only Phase-2 components (platform suspended; cluster untouched): - platform/longhorn: 3-replica SC + bulk external-mount indirection (R-STATE) - platform/monitoring: kube-prometheus-stack + Loki + Alloy (dev-trimmed) + 8 alert rules (R-OBS) - platform/cilium: parity fix (k8sServiceHost=10.73.0.11 + masquerade) safe to adopt Phase 2 - conformance: partial L2 tests (worker hit session limit; incomplete — see DECISIONS-LOG K2) - bootstrap/gitea: fix rootless-podman perms (host bind-mount -> named volume) Flux installed on the cluster; host Gitea up + repo pushed; GitRepository BLOCKED by host firewalld (VM->10.73.0.1:3000) — needs one operator sudo command (DECISIONS-LOG). Known issue K1: cluster-vars substitution-var case mismatch (fix before un-suspend). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
1 parent
397f29e99a
commit
cc89b4b830
19 files changed
+1567
-221
No files matched your search
@@ -0,0 +1,141 @@
|
||||
# =============================================================================
|
||||
# Fixtures for the deny-undeclared behavior test (R-NET-02).
|
||||
# Applied into the per-test namespace chainsaw creates (hermetic, self-cleaned).
|
||||
#
|
||||
# Models: a namespace default-deny baseline + ONE explicit declared dependency
|
||||
# source(app=source) --> declared-dest : tcp/8080
|
||||
# Everything else (declared-dest:9090, other-dest:8080) is UNDECLARED and must
|
||||
# be blocked purely by policy. The destinations LISTEN on those ports, so a
|
||||
# blocked probe proves policy enforcement, not a missing listener.
|
||||
#
|
||||
# Standard Kubernetes NetworkPolicy is used (Cilium enforces it) for portability;
|
||||
# the platform will render CiliumNetworkPolicies from catalog `dependencies`
|
||||
# (T-2.3), but the asserted BEHAVIOR is identical (R-TEST-01).
|
||||
# =============================================================================
|
||||
---
|
||||
# --- Default-deny baseline: deny all ingress+egress, allow only DNS egress. -----------
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: default-deny-baseline
|
||||
spec:
|
||||
podSelector: {}
|
||||
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
|
||||
---
|
||||
# --- The ONE explicit allow (a declared dependency): source --> declared-dest tcp/8080.
|
||||
# Expressed as the two matching halves a real rendered dependency produces:
|
||||
# egress permit on the source, ingress permit on the destination.
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: allow-source-to-declared-8080-egress
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels: { app: source }
|
||||
policyTypes: [Egress]
|
||||
egress:
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels: { app: declared-dest }
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: allow-source-to-declared-8080-ingress
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels: { app: declared-dest }
|
||||
policyTypes: [Ingress]
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels: { app: source }
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
---
|
||||
# --- declared-dest: LISTENS on BOTH 8080 (declared) and 9090 (undeclared port). --------
|
||||
# Two agnhost netexec containers, each an HTTP listener; a TCP connect on
|
||||
# either port reaches a live socket, so a block is caused only by policy.
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: declared-dest
|
||||
labels: { app: declared-dest }
|
||||
spec:
|
||||
containers:
|
||||
- name: dest-8080
|
||||
image: registry.k8s.io/e2e-test-images/agnhost:2.47
|
||||
args: ["netexec", "--http-port=8080"]
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 8080 }
|
||||
periodSeconds: 2
|
||||
- name: dest-9090
|
||||
image: registry.k8s.io/e2e-test-images/agnhost:2.47
|
||||
args: ["netexec", "--http-port=9090"]
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 9090 }
|
||||
periodSeconds: 2
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: declared-dest
|
||||
spec:
|
||||
selector: { app: declared-dest }
|
||||
ports:
|
||||
- name: p8080
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
- name: p9090
|
||||
port: 9090
|
||||
targetPort: 9090
|
||||
---
|
||||
# --- other-dest: an UNDECLARED destination. Listens on 8080 but no allow reaches it. ---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: other-dest
|
||||
labels: { app: other-dest }
|
||||
spec:
|
||||
containers:
|
||||
- name: dest-8080
|
||||
image: registry.k8s.io/e2e-test-images/agnhost:2.47
|
||||
args: ["netexec", "--http-port=8080"]
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 8080 }
|
||||
periodSeconds: 2
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: other-dest
|
||||
spec:
|
||||
selector: { app: other-dest }
|
||||
ports:
|
||||
- name: p8080
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
Reference in new issue
Block a user