Repository navigation
v0.12.0
Breaking: the registry moved to port 4561, and loopback listeners also take [::1]
On macOS, AirPlay Receiver listens on port 5000 on all interfaces, and it's on by default. macOS
let gcpemu bind 127.0.0.1:5000 beside it, so the Instance started, but a host client that
resolves localhost to ::1 reached AirPlay and timed out. Two changes fix this:
- The Artifact Registry port is now 4561. Host clients push and pull with
localhost:4561/...
or127.0.0.1:4561/....gcpemu env(GCPEMU_REGISTRY),endpoints.jsonand the console's pull
and push commands give the new port. To keep the old port, start with--port ar=5000. A
Persistent Instance needs no other change: on start its GKE nodes and Build agent pull from the
new port. - With
--bind 127.0.0.1orlocalhost(the default), every listener on that address also
listens on[::1]at the same port: the API gateway, GCS, Pub/Sub, the registry, DNS over
TCP, the metadata server and the Google front end. Service endpoints still report the
127.0.0.1address. A host without IPv6 loopback runs IPv4-only, as before. But if another
process holds[::1]:<port>itself, the Instance now doesn't start, and the error names the
port and IPv6. To fix it, free the port, or move that listener with--port NAME=....
gcpemu doctor now checks each port on 127.0.0.1 and [::1], and warns when another process
still answers on a port it could bind: that process holds the port on all interfaces. On macOS,
for ports 5000 and 7000, the warning tells you how to turn off AirPlay Receiver (System Settings
→ General → AirDrop & Handoff).
Known issue: docker push on a VM runtime still can't reach the registry (#831). Neither
change helps it: on a VM runtime, such as Docker Desktop, the daemon pushes from inside its VM,
where 127.0.0.1 and [::1] are the VM's own loopback, not the host's. Push from the host
instead, for example docker save -o image.tar REF and then crane push --insecure image.tar REF.
Breaking: the API gateway moved from port 4510 to 4562
LocalStack publishes its whole external-service range, 4510–4559, when its container starts. With
the API gateway on 4510, whichever of gcpemu and LocalStack started second either failed to start
or, with the range published on all interfaces, shared the port with the other without any error.
The API gateway's default port is now 4562, outside that range and LocalStack's edge port, 4566.
The Web console is at http://127.0.0.1:4562/console/, and gcpemu env (GCPEMU_GATEWAY) and
endpoints.json give the new port. The container image's API gateway listens on 4562 too: publish
it with -p 4562:4562.
Update anything that names the old port: SDK endpoint overrides,
CLOUDSDK_API_ENDPOINT_OVERRIDES_*, GCPEMU_GATEWAY, console bookmarks, and CI service-container
port mappings. To keep the old port instead, start with --port gateway=4510. A Persistent Instance
needs no other change: on start, its Managed containers, GKE nodes and Build agent reach the API
gateway on its new port, and each Build's logUrl points at it. Operations of Builds that finished
before the upgrade still give the old logUrl in their metadata.
When gcpemu doctor finds a named port in 4510–4559 or 4566 held, by a bind that fails or by
another process on all interfaces, it now says the port is in LocalStack's range.
GKE clusters serve the resource metrics API
Every emulated GKE cluster now runs k3s's bundled metrics-server and serves
metrics.k8s.io/v1beta1, as GKE does. kubectl top nodes and kubectl top pods work, and HPAs
on CPU or memory utilization scale instead of reporting FailedGetResourceMetric. Private
clusters get it too: its image is preloaded on every node. There is no setting to turn it off,
as on GKE. It runs as k3s ships it (Deployment kube-system/metrics-server), not under GKE's
metrics-server-v<version> name.
Existing clusters don't need to be recreated: a Persistent Instance installs metrics-server in each
cluster the next time it starts.
Linked Instances
Two Instances, say one on a laptop and one on an office machine, can now pair and share whole
Projects (ADR 0027). The office Instance starts with --link-bind <address> (port 4511, mutual
TLS), and the laptop runs gcpemu link pair <address>, or gcpemu link discover first to find it
on the LAN over mDNS. Each side checks the other's CA fingerprint, and the office approves with
gcpemu link approve. Then:
gcpemu link share team-shared # on the office Instance
gcpemu link delegate team-shared --to office # on the laptopFrom then on, the laptop is the front Instance: every request that names team-shared, through
any Service, REST or gRPC, goes over the link, and the office serves it as the caller's
Principal. Access tokens, ID tokens and STS exchanges that either Instance issued verify on the
other, and key files and service endpoints name addresses the caller can reach. The Web console
shows Links, Delegated Projects and Pairing requests. See "Linked Instances" in the README.
Cloud SQL and GKE LoadBalancer Services on the LAN
--sql-bind <address> serves every Cloud SQL instance with a public IP on that address:
Postgres on a port of its own, and the Auth Proxy and connectors on 3307. The usual credentials
are checked at every IAM enforcement level, and authorized networks match the LAN client's own
address. Each instance now has a dnsName, which its server certificate names.
--lb-bind now serves the ports of GKE LoadBalancer Services as well as forwarding rules, and
such a Service lists the --lb-bind address in its status.loadBalancer.ingress.
GKE Autopilot clusters
Creating a cluster with autopilot.enabled used to fail with UNIMPLEMENTED. An Autopilot cluster
now gets the settings GKE gives one, and:
- starts with one node and adds a node for each pod Pending for lack of room, sized to the GKE
shape the pod fits, in the zone its node affinity asks for, with compute-class and Spot labels.
An empty node goes after 30 s.GCPEMU_GKE_MAX_NODEScaps nodes for both cluster modes. - applies GKE's Workload restrictions through admission webhooks: default and minimum resource
requests, and no privileged pods, host namespaces,hostPort, writablehostPathor extra
capabilities. - refuses node pool changes, since GKE owns its node pools.
gcloud container clusters check-autopilot-compatibility works on Standard clusters. The Web
console creates and edits Autopilot clusters and shows each cluster's mode, and Export, Seed and
Copy keep it.
GKE managed telemetry
With the Instance's OTEL_EXPORTER_OTLP_* variables set (ADR 0034):
- A cluster whose Managed OpenTelemetry scope is
COLLECTION_AND_INSTRUMENTATION_COMPONENTS
serves GKE's managed collector at
opentelemetry-collector.gke-managed-otel.svc.cluster.local(4317 gRPC, 4318 HTTP). The
Instance adds the pod's Kubernetes attributes and forwards to your endpoint. No collector pods
run. - An
Instrumentationobject sets the OTel SDK variables on the pods it selects, so they send to
that collector. - With Managed Prometheus on (the default on Autopilot),
PodMonitoringand
ClusterPodMonitoringapply, and the Instance scrapes their targets into the same endpoint.
Google's emulators behind the API gateway
--external <api>=<host:port> forwards an API with no Service, such as Firestore or Spanner, to
an emulator you run, so clients use the one gateway address. --external <api>=managed has the
Instance run Google's own emulator in a container for firestore, datastore, spanner or
bigtable. A Persistent Instance keeps Firestore's and Datastore's data across restarts. Spanner
and Bigtable keep theirs only in memory, and the Instance warns about it on start. See "External
emulators" in the README.
Also in this release
- A runtime that gives containers no cpuset cgroup, such as a rootless Podman machine, now fails
gcpemu doctorand GKE cluster create up front with the fix (podman machine set --rootful),
instead of k3s exiting with an opaque error.
What's Changed
- ci: the release workflow attests SBOMs with actions/attest, replacing the deprecated actions/attest-sbom by @linuxuser586 in #636
- feat: External emulators serve Delegated APIs such as Firestore and Spanner (#623) by @linuxuser586 in #640
- feat: --sql-bind serves Cloud SQL on the LAN, with credentials (#620) by @linuxuser586 in #642
- feat: Linked Instances pair over a --link-bind listener (#616) by @linuxuser586 in #638
- docs: ADR 0029 and the Managed emulator term for #624 by @linuxuser586 in #650
- docs: ADR 0030, the --sql-bind relay tells the Sidecar agent the LAN caller's address, for #639 by @linuxuser586 in #652
- fix: a GKE cluster's certificate covers its Public endpoint on every start (#644) by @linuxuser586 in #651
- test: TestInwardKeepsFreePort holds its TCP+UDP port until the relay binds it (#643) by @linuxuser586 in #654
- fix: the VM relay test accepts the control port staying put (#647) by @linuxuser586 in #655
- feat: Linked Instances share Projects, and the front Instance delegates them (#617) by @linuxuser586 in #656
- feat: Linked Instances route requests that name no Project (#618) by @linuxuser586 in #658
- docs: GKE Autopilot is an M requirement for v1.0, with ADR 0031, for #659 by @linuxuser586 in #667
- fix: the registry moves to 4561, and loopback listeners also take [::1] (#641) by @linuxuser586 in #668
- feat: Linked Instances report Data plane addresses by caller over a link (#619) by @linuxuser586 in #670
- docs: a flake includes a test that fails on unrelated commits, and a Cloud SQL Public IP is kept across starts by @linuxuser586 in #676
- feat: Autopilot clusters through the container API, with the settings GKE sets (#660) by @linuxuser586 in #680
- feat: Linked Instances discover each other on the LAN over mDNS/DNS-SD (#621) by @linuxuser586 in #678
- fix: the Build daemon prune removes build history, so its size holds (#672) by @linuxuser586 in #682
- fix: the Edge relay leaves a subnetwork once its pod routes are gone (#683) by @linuxuser586 in #684
- docs: costly Products record weekly, and "GKE's own node pool" over "managed pool" (#679, #687) by @linuxuser586 in #688
- fix: a Build sees no earlier Build's build history in the Build daemon (#681) by @linuxuser586 in #686
- feat: the Web console shows Links, Delegated Projects and Pairing requests (#622) by @linuxuser586 in #689
- test: TestHealthWaitCondition waits for each backend service's reason to settle (#690) by @linuxuser586 in #691
- docs: define "front Instance" in the glossary (#657) by @linuxuser586 in #694
- feat: a key file created over a link names the front Instance's URLs (#657) by @linuxuser586 in #696
- feat: Autopilot nodes are added for Pending pods and removed once empty (#661) by @linuxuser586 in #698
- test: the Pre-release host checks run the VM relay's own tests on each runtime (#653) by @linuxuser586 in #700
- feat: authorized networks match a --sql-bind client's own address (#639) by @linuxuser586 in #701
- docs: managed telemetry on GKE clusters, with ADR 0034, for #666 by @linuxuser586 in #707
- feat: --external API=managed runs Google's emulator as a Managed emulator (#624) by @linuxuser586 in #699
- docs: record anonymous public endpoints on LAN listeners as out of scope (#708) by @linuxuser586 in #710
- feat: ID tokens from a Delegated Project verify through the front Instance (#693) by @linuxuser586 in #709
- docs: define "Federated principal" and narrow "Foreign credentials" in the glossary (#711) by @linuxuser586 in #712
- docs: ADR 0027 says credentials name the address the caller used (#695) by @linuxuser586 in #714
- docs: load balancing addresses over a link, in ADR 0027, for #669 by @linuxuser586 in #716
- feat: emulated GKE serves the resource metrics API (#637) by @linuxuser586 in #717
- feat: --lb-bind serves GKE LoadBalancer Services, which list it in their ingress (#713) by @linuxuser586 in #720
- fix: add the macOS loopback aliases as /32s (#677) by @linuxuser586 in #721
- test: TestHostLockHolderDies's holder keeps its lock reachable (#685) by @linuxuser586 in #718
- fix: per-Service bind address for Published ports in lb (#674) by @linuxuser586 in #723
- fix: serve certificates at Google's /robot/v1/metadata/ path (#692) by @linuxuser586 in #724
- feat: the Web console GKE view shows the Cluster mode (#663) by @linuxuser586 in #729
- feat: STS exchange for a pool in a Delegated Project, and its Federated principal, work through the front Instance (#711) by @linuxuser586 in #725
- fix: make the GKE published bind address per-Service state (#722) by @linuxuser586 in #730
- fix: a Cloud SQL Public IP moves only for holders outside the emulator (#673) by @linuxuser586 in #731
- fix: key files name the address the caller used, whoever the caller is (#695) by @linuxuser586 in #728
- fix: setup-gcpemu's post step reads the runner's job.status before the API (#671) by @linuxuser586 in #732
- feat: Autopilot clusters apply Workload restrictions (#662) by @linuxuser586 in #739
- fix: the API gateway moves to 4562, out of LocalStack's range (#645) by @linuxuser586 in #735
- feat: STS exchange on the front Instance accepts ID tokens a Linked Instance signed (#702) by @linuxuser586 in #734
- fix: TestSQLBind serves host clients only where the host has loopback aliases (#719) by @linuxuser586 in #740
- docs: define "Autopilot compatibility check" in the glossary (#664) by @linuxuser586 in #741
- fix: TestPrivilegedWildcard turns on single-loopback mode (#646) by @linuxuser586 in #742
- fix: TestOfferThroughRelay holds its ports until the relay binds them (#648) by @linuxuser586 in #744
- feat: gcloud storage rsync and sign-url in the Client compatibility suite (#599) by @linuxuser586 in #745
- feat: CheckAutopilotCompatibility on Standard clusters (#664) by @linuxuser586 in #746
- feat: GKE stores managed telemetry settings on both cluster modes (#703) by @linuxuser586 in #747
- fix: access-token lookup on Linked Instances reports unreachable links (#733) by @linuxuser586 in #748
- fix: tests pick free ports from below the ephemeral range (#743) by @linuxuser586 in #749
- fix: build and e2e tests take their free ports from porttest (#743) by @linuxuser586 in #752
- test: Autopilot acceptance with Kubernetes conformance and Istio injection (#665) by @linuxuser586 in #755
- fix: every token check on the front Instance asks its Linked Instances (#736) by @linuxuser586 in #753
- fix: UDP and mDNS test ports come from porttest (#750) by @linuxuser586 in #756
- feat: node provisioning counts a Pod's request as the scheduler does (#738) by @linuxuser586 in #757
- fix: the LAN relay agent binds its own control port (#751) by @linuxuser586 in #760
- feat: Autopilot provisions nodes for compute class and Spot required through node affinity (#697) by @linuxuser586 in #759
- feat: Web console creates and edits Autopilot clusters (#726) by @linuxuser586 in #761
- feat: gcpemu env on the front Instance names Delegated Projects' --lb-bind addresses (#715) by @linuxuser586 in #762
- feat: GKE managed collector forwards to the Instance's OTLP endpoint (#704) by @linuxuser586 in #763
- feat: Autopilot provisions a node in a zone required through node affinity (#758) by @linuxuser586 in #764
- fix: Copy as an Autopilot cluster gives Autopilot's commands (#727) by @linuxuser586 in #767
- docs: ADR 0036, Firestore's and Datastore's Managed emulators keep their data (#649) by @linuxuser586 in #770
- feat: GKE managed Prometheus scrapes PodMonitoring into the OTLP endpoint (#705) by @linuxuser586 in #768
- feat: Firestore and Datastore Managed emulators keep their data (#649) by @linuxuser586 in #771
- docs: define System metrics (#773) by @linuxuser586 in #774
- fix: Export writes privateNodes for a cluster private through networkConfig (#769) by @linuxuser586 in #776
- docs: FR-GKE-019 identifies the sending pod by k8s.pod.uid (#775) by @linuxuser586 in #778
- feat: detect a runtime without the cpuset cgroup before GKE nodes start (#632) by @linuxuser586 in #780
- fix: Export and Seed carry an Autopilot cluster's Cluster mode (#772) by @linuxuser586 in #779
- feat: GKE Instrumentation objects configure workloads for the managed collector (#706) by @linuxuser586 in #777
- fix: make exited GKE containers' logs readable on Podman, or say where they are (#633) by @linuxuser586 in #781
- feat: GKE Managed collector attributes pods by k8s.pod.uid (#775) by @linuxuser586 in #782
- fix: Seed file declares a cluster's telemetry settings (#773) by @linuxuser586 in #783
- test: Python and Node Storage and Pub/Sub flows in the compat suite (#601) by @linuxuser586 in #784
- test: aws CLI against the XML API with an HMAC key (#600) by @linuxuser586 in #785
- feat: Java Storage and Pub/Sub libraries in the Client compatibility suite (#602) by @linuxuser586 in #787
- test: Kubernetes conformance with Sonobuoy quick mode at each GKE minor (#18) by @linuxuser586 in #788
- fix: give ADRs 0035 and 0036 unique numbers so task vet passes (#786) by @linuxuser586 in #789
- fix: porttest sets SO_REUSEPORT through x/sys/unix, so it builds on linux/amd64 (#766) by @linuxuser586 in #791
- feat: Conformance suite harness, Recordings and comparison against the emulator (#577) by @linuxuser586 in #790
- fix: ADR check in its own CI job, and the failures main's tests show again (#766) by @linuxuser586 in #793
- docs: define Mirror cache in CONTEXT.md (#798) by @linuxuser586 in #800
- test: GKE Autopilot tests wait out slow bring-up and only report NFR-PERF-010 (#796, #797) by @linuxuser586 in #799
- fix: every repository that pulls a blob through the mirror gets it linked (#798) by @linuxuser586 in #801
- fix: a pinned network's probe in the fallback range stays unattached, so it can be deleted (#794) by @linuxuser586 in #795
- test: TestGKEIngressAndGateway waits for the HTTPRoute's status by @linuxuser586 in #804
- test: instance tests get text logs from one helper, whatever CI says (#792) by @linuxuser586 in #803
- fix: a Podman machine's cpuset comes from /libpod/info, not compat /info (#805) by @linuxuser586 in #809
- docs: CONTEXT.md names the Self address (#811) by @linuxuser586 in #813
- docs: release notes for v0.12.0 by @linuxuser586 in #815
Full Changelog: v0.11.0...v0.12.0