Repository navigation
feat(gke-edge): internal-only mode, a regional internal load balancer (agent-relay 0.7.60) - #483
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
[Medium impact] The PR appears safe to merge; live GKE checks are still needed before relying on it for an installation.
|
miyaontherelay
force-pushed
the
feat/gke-internal-ingress
branch
from
November 18, 2026 22:53
8f14a39 to
6700354
Compare
miyaontherelay
added a commit
that referenced
this pull request
Nov 18, 2026
…s rules Review feedback on #483: - gkeIngress.internal.proxyOnlySubnetCidr accepted malformed text such as 10.129.999.0/23 or 172.16.0.0.1/24, which would reach the NetworkPolicies and be rejected by Kubernetes at install. It must now be four octets of 0-255 in an RFC 1918 block with a /8 to /26 prefix; refusal tests added. - The internal/external route test compared only hosts and path counts. It now compares the complete spec.rules (paths, pathType, backend Services and ports). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… (agent-relay 0.7.60) The chart could only render an external gce Ingress with a global address and a ManagedCertificate, so a GKE install could not be kept off the internet the way an internal-scheme ALB keeps an EKS install. gkeIngress.mode=internal (default external): - Ingress class gce-internal, kubernetes.io/ingress.regional-static-ip-name from gkeIngress.staticIpName, and allow-http "false" (HTTPS only). - No ManagedCertificate and no FrontendConfig: GKE Ingress supports neither on an internal load balancer. The certificate is gkeIngress.tlsSecretName or gkeIngress.internal.preSharedCerts (regional self-managed certificates). - gkeIngress.internal.proxyOnlySubnetCidr is required: the load balancer's proxies reach the pods from the VPC's proxy-only subnet, so every backend NetworkPolicy (and the durable-actors policy) must admit it. - Refused: a missing or public proxy-only range, no certificate or both kinds, a backend policy without the range (named in the error), sslPolicy or securityPolicy in internal mode, internal.* in external mode, an unknown mode. values-gcp-internal.yaml is the overlay. terraform/modules/gcp/internal-edge creates the proxy-only subnet, the regional internal address and the firewall rule from that subnet to the nodes' service account on the backend ports. Docs: chart README "Internal-only GKE edge", docs/gcp-install/3-EDGE-HARDENING.md section 4, registry entry opt.agent-relay.gke-internal-edge. Default renders differ only in the helm.sh/chart labels. Stacked on the edge hardening change (0.7.59), which adds tlsSecretName. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An earlier chart ignores gkeIngress.mode and would create a public load balancer; say so at the top of the section. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s rules Review feedback on #483: - gkeIngress.internal.proxyOnlySubnetCidr accepted malformed text such as 10.129.999.0/23 or 172.16.0.0.1/24, which would reach the NetworkPolicies and be rejected by Kubernetes at install. It must now be four octets of 0-255 in an RFC 1918 block with a /8 to /26 prefix; refusal tests added. - The internal/external route test compared only hosts and path counts. It now compares the complete spec.rules (paths, pathType, backend Services and ports). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
miyaontherelay
force-pushed
the
feat/gke-internal-ingress
branch
from
November 19, 2026 08:26
7d719de to
3e70c0f
Compare
…pgrades carry them Review feedback on #483: the guide added the overlay only in step 11, and the later helm upgrade commands would drop it, switching the install back to a public load balancer. The settings are now merged into values.yaml with yq, and the overlay and chart README say the same for any install. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A finding from the GCP self-host hardening review: the chart could only render an external
gceIngress with a global static address and a ManagedCertificate. A GKE install could not be kept off the internet, the wayscheme: internalkeeps an EKS install behind an internal ALB. This adds that mode for VPN-only installs.What changes
Chart
agent-relay0.7.60gkeIngress.mode: internal(defaultexternal, so default renders are unchanged apart from thehelm.sh/chartlabels):gcegce-internal(regional internal Application Load Balancer)gkeIngress.staticIpNamekubernetes.io/ingress.regional-static-ip-name)tlsSecretNametlsSecretName, orinternal.preSharedCerts(regional self-managed certificates)kubernetes.io/ingress.allow-http: "false")Hosts, routes, backends, BackendConfig timeouts and health checks are the same in both modes (a test compares the rules).
The load balancer's proxies connect to the pods from the VPC's proxy-only subnet, not from Google's front ends. So
gkeIngress.internal.proxyOnlySubnetCidris required, and every backend NetworkPolicy must admit it next to the two health-check ranges.values-gcp-internal.yamlis the overlay that sets the mode and restates the five lists; the durable-actors policy adds the range itself.Refused combinations
modeother thanexternal/internalproxyOnlySubnetCidr, or with a non-RFC 1918 or too-small rangetlsSecretNameandpreSharedCertsnetworkPolicy(relaycast, relay-control, relay-webapp, relayfile, session read API, ingest edge) without the proxy-only range, or with anexceptsecurityPolicysslPolicyinternal.*set whilemodeis externalTerraform
New
terraform/modules/gcp/internal-edge: the proxy-only subnet (REGIONAL_MANAGED_PROXY, or use an existing one), the regional internal address, and the firewall rule GKE does not create: from the proxy-only subnet, to instances running as the node service account, on the backend ports (3000, 7100, 8080, 8081, 8787, checked against the rendered container ports). It creates no external address and no path from outside the VPC. It does not create the certificate, because that would put the private key in state.Docs
Chart README "Internal-only GKE edge",
docs/gcp-install/3-EDGE-HARDENING.mdsection 4 (network, DNS, certificate, values, "Done when" from on and off the VPN), module README, registry entryopt.agent-relay.gke-internal-edge.Decisions
sslPolicy/securityPolicyso that the value feat(gke-edge): TLS policy, Cloud Armor on every backend, TLS from a Secret (agent-relay 0.7.59) #477 puts inmanaged-values.jsondoes not stop an internal install.Tests
ci/agent-relay/render.sh: annotations and absence of the external-only ones, TLS Secret and pre-shared certificate variants, no ManagedCertificate or FrontendConfig, identical rules to the external edge, every NetworkPolicy that admits the health-check range also admits the proxy-only subnet, each refusal above, the overlay clearing an earliersslPolicy, and thevalues-gcp.yamlprofile with the overlay.terraform test(mock provider) for the module: 4 runs.Local:
ci/agent-relay/render.sh,scripts/ci/charts.sh static agent-relay,scripts/ci/version-bump.sh, the requirements registry check,terraform fmt/validate/test, tflint, terraform-docs and checkov on the new module all pass.Not proven
Nothing here has run on a live cluster. Unproven: that GKE syncs the Ingress as rendered (including
allow-http: "false"with aSHARED_LOADBALANCER_VIPaddress), that the firewall rule and NetworkPolicy ranges are sufficient for traffic and health checks, theX-Forwarded-Forshape of the internal load balancer (sotrustedProxiesis unmeasured in this mode), and long-lived WebSockets through it.Note:
render.shhas an existingyq ... | grep -qassertion ("live profile does not mount the internal token") that can fail underpipefailwhengrepexits early. It failed once locally on an unrelated run and passed on rerun; it is not changed here.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.