Repository navigation
fix(chart): allow detected apiserver endpoints in agent egress policy - #930
ValgulNecron wants to merge 3 commits into
Conversation
On k3s and kubeadm single-node installs the kubernetes Service is DNATed to the node's own IP. When that IP is public, the default allow-agent-to-apiserver policy (RFC1918 + link-local only) blocks it, every agent heartbeat times out and servers stay "Starting". When networkPolicies.apiServerCIDRs is unset, the chart now also allows the kubernetes Service ClusterIPs and EndpointSlice addresses it looks up at install/upgrade time (as /32 or /128). Explicit lists and offline renders are unchanged. Applies to the sentinel's apiserver policy too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
WalkthroughWhen ChangesAPI server egress peers
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Possibly related issues
Possibly related PRs
Pre-merge checks:
|
CI Report - 63e5b20run 43117002882 - attempt 1 0 failed - 19 passed - 14 skipped - 132m24s elapsed Test selection: partial - per-suite table Coverageno coverage/* commit statuses found on 63e5b20 Changed
Slowest jobs
e2e buckets run
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Summary
On k3s and kubeadm single-node installs, the
kubernetesService (for example10.43.0.1) is DNATed to the node's own IP on port 6443. When that IP is public, the defaultallow-agent-to-apiserverpolicy blocks it, because it only allows RFC1918 and link-local ranges. Every agent heartbeat then fails withdial tcp 10.43.0.1:443: i/o timeout, and every game server stays at "Starting" (WaitingForAgent). This was found on a homelab node whose apiserver endpoint is a public IPv4.Change
gameplane.apiServerEgressPeersin_helpers.tplrenders theto:peers.networkPolicies.apiServerCIDRslist wins, unchanged, so strict mode is unaffected.kubernetesService, meaning itsspec.clusterIPsand its EndpointSlice endpoint addresses, as/32or/128. The list is deduplicated.allow-agent-to-apiserverandallow-sentinel-to-apiserver.helm template, client dry-run and Argo CD get empty lookups, so they render exactly as before. The existing chart checks and the e2e default-policy test still hold.values.yaml,docs/install.md,docs/security.mdandCHANGELOG.mdare updated. They note that addresses are read at install or upgrade time, and that offline renderers must set the list explicitly when the endpoint is public.Verification
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation