Add M9.8f dev session route design, disabled with fail-closed policy
ADR-0087 records the maintainer's route (void.aeternalisgames.com:7400 via a dedicated internal MetalLB VIP to the evolution-dev region pod, TLS end to end, CIDR-limited) and operator-opened windows enforced by evo-server. The route is a kustomize component included nowhere; the policy check encodes its shape and refuses enabling until VIP/CIDR, the dev quota and --session-window exist, with a 20-case self-test in the CI deploy stage. The base listener stays loopback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -90,11 +90,12 @@ RUN apt-get update \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /source
|
||||
COPY deploy/ deploy/
|
||||
COPY tools/ci/deploy-policy-check.py tools/ci/
|
||||
COPY tools/ci/deploy-policy-check.py tools/ci/deploy-policy-selftest.py tools/ci/
|
||||
COPY tools/ops/ tools/ops/
|
||||
COPY tools/backup/ tools/backup/
|
||||
COPY tools/ci/ops-lib-check.sh tools/ci/
|
||||
RUN python3 tools/ci/deploy-policy-check.py && bash tools/ci/ops-lib-check.sh
|
||||
RUN python3 tools/ci/deploy-policy-check.py && python3 tools/ci/deploy-policy-selftest.py \
|
||||
&& bash tools/ci/ops-lib-check.sh
|
||||
# M8.5: monitoring configuration and alert tests with the pinned images' own tools.
|
||||
COPY --from=quay.io/prometheus/prometheus@sha256:6976aa8a60fec930796ce5772b8d12da7a318a5daa8d40d69c5c7819a05eeed7 /bin/promtool /usr/local/bin/promtool
|
||||
COPY --from=quay.io/prometheus/alertmanager@sha256:e9733bafb1bdef9b00e25a21f8f99dc26a22224bf16641ad754d1649f4c3357a /bin/amtool /usr/local/bin/amtool
|
||||
|
||||
@@ -59,13 +59,14 @@ spec:
|
||||
inputs=()
|
||||
if [ -n "$REGION_INPUTS" ]; then inputs=(--synthetic-inputs "$REGION_INPUTS"); fi
|
||||
# Dev sessions are a drill-time override too (tools/ops/session-drill.sh,
|
||||
# ADR-0083): loopback only, reached by kubectl port-forward, never a Service.
|
||||
# ADR-0083): loopback by default, reached by kubectl port-forward. Only the
|
||||
# disabled dev-session-route component (ADR-0087) may bind the pod interface.
|
||||
# evo-server refuses any environment but dev and needs the synthetic carrier.
|
||||
# Consumed grants persist on the objects volume (outside the object
|
||||
# namespaces, ignored by backups) so a restarted pod refuses them.
|
||||
sessions=()
|
||||
if [ -n "$REGION_SESSION" ]; then
|
||||
sessions=(--session-listen 127.0.0.1:7400 --session-cert /run/session/server.pem
|
||||
sessions=(--session-listen "$REGION_SESSION_LISTEN" --session-cert /run/session/server.pem
|
||||
--session-key /run/session/server.key --session-grant-key /run/session/grant.key
|
||||
--session-grant-ledger /objects/dev-session-grants.v1
|
||||
--session-environment "$REGION_SESSION")
|
||||
@@ -89,6 +90,9 @@ spec:
|
||||
- {name: REGION_RESERVE_MIB, value: "1024"}
|
||||
# M9.7 drill-only: "dev" enables the session listener; Git keeps it empty.
|
||||
- {name: REGION_SESSION, value: ""}
|
||||
# Session listener address; the policy check allows only this loopback value
|
||||
# outside region/dev-session-route.
|
||||
- {name: REGION_SESSION_LISTEN, value: "127.0.0.1:7400"}
|
||||
ports:
|
||||
- {name: ops, containerPort: 9100, protocol: TCP}
|
||||
readinessProbe:
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# M9.8f dev session route for evolution-dev ONLY (ADR-0087). DISABLED: no
|
||||
# kustomization includes this component yet. Enabling it (components: in
|
||||
# region/dev/kustomization.yaml) is refused by tools/ci/deploy-policy-check.py until:
|
||||
# - the REPLACE markers carry the allocated internal MetalLB VIP and the permitted
|
||||
# development/test client CIDR(s);
|
||||
# - the platform dev quota allows exactly one LoadBalancer Service;
|
||||
# - evo-server enforces operator-opened session windows itself (--session-window).
|
||||
# Route: void.aeternalisgames.com:7400 -> VIP -> Service -> evo-region pod:7400 (TLS 1.3
|
||||
# terminates in the pod). Raw TCP only: no Ingress, no TLS at nginx, no PROXY protocol.
|
||||
apiVersion: kustomize.config.k8s.io/v1alpha1
|
||||
kind: Component
|
||||
resources:
|
||||
- service.yaml
|
||||
- networkpolicy.yaml
|
||||
patches:
|
||||
- path: listener.yaml
|
||||
@@ -0,0 +1,15 @@
|
||||
# With the route, the opt-in session listener binds the pod interface and names its
|
||||
# port; it still starts only when sessions are enabled for a window (ADR-0087).
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: evo-region
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: evo-server
|
||||
env:
|
||||
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
|
||||
ports:
|
||||
- {name: session, containerPort: 7400, protocol: TCP}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Session ingress to the region pod: TCP 7400 from the permitted development/test
|
||||
# client CIDR(s) only, which must equal the Service's loadBalancerSourceRanges.
|
||||
# Everything else stays denied by the platform default-deny policy.
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: evo-region-session-ingress
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: evo-region
|
||||
policyTypes: [Ingress]
|
||||
ingress:
|
||||
- from:
|
||||
- ipBlock:
|
||||
cidr: REPLACE-dev-test-client-cidr
|
||||
ports:
|
||||
- {protocol: TCP, port: 7400}
|
||||
@@ -0,0 +1,26 @@
|
||||
# The one LoadBalancer Service AEvolution may own (ADR-0087), evolution-dev only.
|
||||
# - metallb.io/loadBalancerIPs pins the dedicated internal VIP that the internal DNS
|
||||
# name void.aeternalisgames.com resolves to (never the control-plane address).
|
||||
# - externalTrafficPolicy Local keeps client source addresses, so the NetworkPolicy's
|
||||
# ipBlock (same CIDRs) is enforceable; new connections reach only a ready pod.
|
||||
# - allocateLoadBalancerNodePorts false: no node ports (the quota forbids them).
|
||||
# - loadBalancerSourceRanges duplicates the CIDR at the Service; the edge firewall is
|
||||
# the third layer. TLS 1.3, the dev CA and single-use grants remain mandatory.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: evo-region-session
|
||||
annotations:
|
||||
metallb.io/loadBalancerIPs: REPLACE-dev-session-vip
|
||||
labels:
|
||||
app.kubernetes.io/name: evo-region
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
allocateLoadBalancerNodePorts: false
|
||||
externalTrafficPolicy: Local
|
||||
loadBalancerSourceRanges:
|
||||
- REPLACE-dev-test-client-cidr
|
||||
selector:
|
||||
app.kubernetes.io/name: evo-region
|
||||
ports:
|
||||
- {name: session, port: 7400, targetPort: session, protocol: TCP}
|
||||
Reference in New Issue
Block a user