Skip to content

v0.14.0

Choose a tag to compare

@github-actions github-actions released this 03 Nov 16:45
· 197 commits to main since this release
92c52ae

Changed: Host mode's hostnames serve only public APIs

A request whose Host is one of Host mode's hostnames (a Service's or Delegated API's host, or
www.googleapis.com) never reaches the Admin API or the Web console any more: /_emu/… and
/console… there are public API paths, and www.googleapis.com/console answers Not Found (#890,
ADR 0052). Before, firestore.googleapis.com/_emu/… was forwarded to the External emulator with
the Admin token cookie, and www.googleapis.com served the console.

Reach the Admin API and the Web console at the API gateway's own address, as gcpemu env prints
it. A bucket named console is now reachable through Host mode on storage.googleapis.com.

Changed: the API gateway drops cookies from public API requests

The Web console now sends same-origin cookies, so it works behind an Authenticating proxy such as
oauth2-proxy on the same origin (#888). In turn, the API gateway deletes Cookie from every request
that isn't an Admin API or Web console request, and from every request a Linked Instance forwards
(ADR 0052). Neither the Admin token nor a proxy's session reaches a Service, a cluster's
kube-apiserver, an External emulator or another Instance. No public API reads cookies: a Principal
comes only from an access token. Load balancer session affinity cookies are unaffected.

Changed: Cloud CDN compression follows GCP's rules

With compressionMode: AUTOMATIC:

  • Cloud CDN serves Brotli (br) when the client accepts it, and gzip otherwise (#907). A coding
    whose q weight is 0 is refused, and a refusal beats an acceptance of the same coding.
  • Only a 200 with a Content-Length from 1 KiB to 10 MiB is compressed, and only for GCP's
    documented types: its exact list plus text/*, application/*+json, application/*+xml and
    application/*mpegURL (#908). A response without Content-Length is no longer compressed.
  • A compressed response sends Accept-Ranges: none, and a GET answered from a cached object
    ignores Range and If-Range when it will be compressed: the client gets 200 with the whole
    compressed object instead of 206 (ADR 0054). A response that won't be compressed still gets its
    range.
  • A cached object stored without a Content-Type is answered without one, and so isn't
    compressed.

Changed: external addresses never leave the emulated network

A pod could reach an address the emulator hands out as public on the real internet, where someone
else owns it. Now it can't:

  • While an external forwarding rule exists, its address always has a route: via the Edge relay
    while that serves it, and unreachable otherwise (#912, ADR 0055). Before, while the Edge relay
    wasn't serving it, or after a failed update, a pod's traffic to 34.120.0.1 went out through
    Cloud NAT to the internet, and a real server answered with its own certificate.
  • Every NAT egress proxy and every GKE node with an external IP holds unreachable routes for the
    External address pools, 34.16.0.0/12 and 34.120.0.0/14, and for each reserved external
    address outside them while it is reserved (#917, ADR 0059). That covers a reserved address with
    no forwarding rule, a NAT IP, and a deleted forwarding rule's ephemeral address.

VPC workloads can no longer reach real hosts in those two ranges. Clients on the host are not
affected. With the Offline sink on, a client of these addresses fails at once instead of being
recorded as internet egress.

Changed: Podman on Linux and the Registry relay

Rootless Podman on Linux no longer gets a Registry relay (#923, ADR 0043). It pushes and pulls in
the host's network namespace, where the registry's loopback endpoint already reaches it, so a relay
there only collided with the Instance's own registry listener. Rootless Docker keeps its relay.

Every Podman on a Linux host is now told to add the [[registry]] entry to the host's
registries.conf: ~/.config/containers/registries.conf when rootless, and
/etc/containers/registries.conf when rootful, including a rootful Podman that does run the relay
(#934). Before, gcpemu doctor and the Instance's log said to edit it inside a Podman machine with
podman machine ssh. Podman machine on macOS and Windows keeps that step.

VM relay detection is right on more hosts

  • On Windows and macOS, every container runtime is a VM runtime (#913, ADR 0056). Before, a host
    adapter that happened to hold a services network's gateway, such as WSL's vEthernet (WSL),
    made gcpemu decide the runtime wasn't a VM: Host attachment bound Offered ports on the host and
    the Registry relay turned itself off.
  • On Linux, a runtime is on the host only when it doesn't describe itself as Docker Desktop or
    rootless and its own bridge holds the network's gateway (#915, ADR 0058). Before, a bind on the
    gateway decided, so a VPN, a libvirt bridge such as virbr0, or a second runtime's bridge
    (Docker Desktop for Linux beside Docker Engine) could hide a VM runtime. gcpemu doctor, Host
    mode and the Registry relay now make the same decision as the VM relay, and Host mode names
    Podman's real bridge interface.

GCPEMU_VM_RELAY still forces the relay on or off.

GKE reissues the Cluster server's serving certificate on every start

The Cluster server's serving certificate is now reissued on every start, and a cluster goes
RUNNING only once the server's certificate names its Public endpoint (#886, ADR 0051). After the
External network moved, a cluster could briefly serve a certificate for its old address; that is
the TestPublicEndpointMoves flake the v0.13.0 release PR listed.

Other fixes

  • gcpemu doctor reports, and gcpemu prune reclaims, an Instance left by a test that ended, even
    while its containers still run; reclaiming it stops its gcpemu process first (#914, ADR 0057).

What's Changed

  • docs: ADR 0051, the Cluster server's serving cert is reissued on every start (#886) by @linuxuser586 in #887
  • fix(gke): reissue the Cluster server's serving cert on every start (#886) by @linuxuser586 in #889
  • fix: the console sends same-origin cookies; the API gateway drops them from public API requests (#888) by @linuxuser586 in #891
  • docs: Host mode's hostnames serve only public APIs (#890) by @linuxuser586 in #892
  • fix(gateway): Host mode's hostnames serve only public APIs (#890) by @linuxuser586 in #893
  • chore: the OCI images build on the current distroless Debian 13 digest (#894) by @linuxuser586 in #897
  • ci: Linux jobs run on Ubuntu 26.04 and the SDK suites on Python 3.15 (#894) by @linuxuser586 in #898
  • chore(deps): Go modules, the googleapis pin and the plumbing images move to their newest versions (#894) by @linuxuser586 in #902
  • chore(deps): the console moves to Node 26 LTS and its packages to their newest versions (#894) by @linuxuser586 in #904
  • chore(deps): the compat and e2e tool pins move to their newest releases, and the Java probe to JDK 25 (#894) by @linuxuser586 in #905
  • fix(lb): Edge aliases skip and reserve addresses on the lb network; vm-relay back on Ubuntu 26.04 (#900) by @linuxuser586 in #906
  • fix(cdn): AUTOMATIC compression serves Brotli when the client accepts it, else gzip (#907) by @linuxuser586 in #909
  • fix(cdn): AUTOMATIC compression follows GCP's documented eligibility rules (#908) by @linuxuser586 in #910
  • docs: ADR 0055, forwarding rule addresses never leave the emulated network (#912) by @linuxuser586 in #916
  • fix(vmrelay): on Windows and macOS every container runtime is a VM runtime (#913) by @linuxuser586 in #918
  • docs: ADR 0057, Test data dirs cover CLI-started Instances and reclaim stops their process (#914) by @linuxuser586 in #922
  • docs: ADR 0058, on Linux only the runtime's own bridge shows a network is on the host (#915) by @linuxuser586 in #924
  • fix(lb): forwarding rule addresses never leave the emulated network (#912) by @linuxuser586 in #919
  • docs: ADR 0059, the External address pools never leave the emulated network (#917) by @linuxuser586 in #925
  • fix(instance): doctor and prune reclaim ended Test data dirs (#914) by @linuxuser586 in #926
  • fix(compute): the External address pools never leave the emulated network (#917) by @linuxuser586 in #927
  • fix(vmrelay): on Linux only the runtime's own bridge holding the gateway rules out a VM runtime (#915) by @linuxuser586 in #928
  • fix(instance): a stop requested over the Admin API logs its cleanup errors (#920) by @linuxuser586 in #929
  • docs: rootless Podman on Linux needs no Registry relay (#923) by @linuxuser586 in #930
  • fix(instance): rootless Podman on Linux gets no Registry relay (#923) by @linuxuser586 in #933
  • fix(prerelease): host check Instances never outlive a failed check or a killed run (#921) by @linuxuser586 in #935
  • fix(instance): rootful Podman on Linux with the Registry relay running gets the host-side step (#934) by @linuxuser586 in #936
  • docs: release notes for v0.14.0 by @linuxuser586 in #911

Full Changelog: v0.13.0...v0.14.0