> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jedify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Existing network

> Install into a network your network team owns: the subnets, ranges, firewall rules and private DNS they provide, and the OpenTofu settings that use them.

By default, OpenTofu creates the install's own network: a subnet and its ranges, the subnet the Gateway's load balancer needs, private addresses for Cloud SQL and Memorystore, private DNS for Google APIs, and Cloud NAT for the way out.

When your network team owns the network, set `existing_network` instead. OpenTofu then creates nothing inside the network, so the team provides everything below. Everything else (the cluster, the databases, the buckets, the service accounts) is still created in your project. A Shared VPC works too.

## What the network team provides

| What | Why | Size |
| - | - | - |
| A node subnet in your region, with Private Google Access on | The cluster's nodes, and their path to Google APIs | /26 or larger. GKE Autopilot adds nodes as load grows, and more during upgrades. |
| A pod secondary range on that subnet | Each node takes a /26 for its pods | /21 or larger. Non-RFC 1918 space such as 100.64.0.0/10 works when pod addresses are hidden (below). |
| A service secondary range on that subnet (optional) | Kubernetes service addresses. Without one, GKE uses its own range, 34.118.224.0/20. | /24 |
| A proxy-only subnet in your region (`REGIONAL_MANAGED_PROXY`, `ACTIVE`) | The Gateway's internal load balancer. Without it, the Gateway never gets an address. | /26 or larger. One per region per network, shared by every regional load balancer. |
| Private Services Access: a `servicenetworking` connection with free allocated space | Cloud SQL and Memorystore take their private addresses from it | About a /20 free |
| Private DNS for `googleapis.com`, `pkg.dev`, `gcr.io` and `firestore.goog`, to Google's private or restricted addresses, and a route to them | Google APIs with no path through the internet, including Firestore, the application's database | - |
| Firewall rules allowing Google's health checks (35.191.0.0/16 and 130.211.0.0/22) and the proxy-only subnet in to the nodes, and the control plane to the nodes | The load balancer, and GKE itself | - |
| A way out to what Jedify calls outside Google: your identity provider, your warehouses, dbt Cloud if you connect it, your own model gateway if you use one, and the image registry | Nothing else leaves. A blocked call hangs rather than fails. | - |
| A free /28 for the control plane, or a subnet for its private endpoint | Where the control plane's private address lives | /28 |

For Snowflake, the way out covers every host `SELECT SYSTEM$ALLOWLIST()` returns.

## Set it

In `terraform/terraform.tfvars`:

```hcl theme={null}
existing_network = {
  # The Shared VPC host project. Leave it out if the network is in project_id.
  project             = "acme-network"
  network             = "acme-vpc"
  subnetwork          = "acme-jedify-nodes"
  pods_range_name     = "acme-jedify-pods"
  services_range_name = "acme-jedify-services" # optional
}
```

The plan reads the subnet and its ranges, and stops at once, naming what is missing.

### Private Service Connect instead of peering

To give Cloud SQL and the cache Private Service Connect endpoints instead of Private Services Access:

```hcl theme={null}
datastore_connectivity = "psc"
```

The cache is then Memorystore for Valkey, since Memorystore for Redis has no Private Service Connect. The network team creates a Service Connection Policy for the `gcp-memorystore` service class in your region, naming the subnet the endpoints use: the node subnet, or a subnet of their own, which you name as `existing_network.psc_subnetwork`. The endpoints take two or three addresses.

On a Shared VPC, also set `cloudsql_psc_endpoint = "connection_policy"`, and the team creates a second policy, for the `google-cloud-sql` service class, naming the same subnet. Cloud SQL then makes its own endpoint, and whoever runs OpenTofu needs no role on the host project.

### A control plane reachable only from inside

```hcl theme={null}
enable_private_endpoint        = true
private_endpoint_subnetwork    = "acme-jedify-control-plane"
private_endpoint_global_access = true   # only if your VPN enters the network outside your region
master_authorized_networks = [
  { cidr_block = "10.8.0.0/16", display_name = "vpn" },
]
```

List every range `kubectl` and `helm` run from, such as your VPN's. Left empty, only the cluster's own nodes and pods reach the control plane.

## On a Shared VPC

The host project grants, before the first apply:

* `roles/container.hostServiceAgentUser` on the host project, to your project's GKE service agent, `service-<project number>@container-engine-robot.iam.gserviceaccount.com`.
* `roles/compute.networkUser` on the node subnet, to that GKE service agent and to the Google APIs service agent, `<project number>@cloudservices.gserviceaccount.com`.
* `roles/compute.networkUser` on the node subnet, and on `psc_subnetwork` if you set it, to whoever runs OpenTofu.

Your project is attached to the host as a service project, and the host project has the GKE API enabled.

## Fixed addresses for allowlists

Some sources accept calls only from addresses on their list: dbt Cloud with IP restrictions, or a Snowflake network policy. In your own network, Jedify's calls leave through your NAT or firewall, so give those sources your NAT's addresses. With Cloud NAT, reserve the addresses and assign them by hand, so they don't change.

> [!NOTE]
>
> The network OpenTofu creates by default has Cloud NAT with addresses Google picks and may change. Where a source allowlists addresses, use your own network.

## Keep pod addresses inside the network

GKE keeps a pod's own address when it calls a private destination. If your firewalls should see node addresses instead, or your pod range is reused elsewhere, add this to your Jedify resource:

```yaml theme={null}
spec:
  install:
    platform:
      egressMasquerade:
        enabled: true
```

Every packet a pod sends out of the cluster then leaves with its node's address. Traffic inside the cluster is unaffected.

## With no internet access

Jedify runs with no path to the internet, as long as nothing you connect it to lives there.

### Google APIs, privately

Every Google API Jedify calls, Firestore included, is reached through Google's private addresses, with these private DNS zones bound to the network:

| Zone | Covers | Points to |
| - | - | - |
| `googleapis.com` | Vertex AI, Secret Manager, and the token services every keyless call depends on | `199.36.153.4/30` |
| `pkg.dev` | Artifact Registry: every image, from Jedify's registry or your copy of it | `199.36.153.4/30` |
| `gcr.io` | GKE's own images | `199.36.153.4/30` |
| `firestore.goog` | Firestore, the application's database | `199.36.153.2/31` |

The network also routes `199.36.153.0/24` to the default internet gateway, which keeps that traffic inside Google's network. On a network OpenTofu creates, it makes the zones and the route (`enable_private_google_access_dns`). On your own network, your network team provides them.

> [!WARNING]
>
> Firestore has its own address range. A `firestore.goog` zone that points at the range of the other zones leaves the database unreachable, while every other Google call works.

### What still needs a way out

Only what you connect Jedify to outside Google Cloud:

* **An identity provider on the internet**, such as Okta, Google or Entra ID. The sign-in service calls its token endpoint from the cluster at every sign-in. One you reach privately needs nothing.
* **A model provider outside Google Cloud**, if you route models to one. Vertex AI is a Google API, so the zones above cover it.
* **A data source outside Google Cloud**, such as Snowflake or dbt Cloud, unless you reach it privately. BigQuery is a Google API.
* **Let's Encrypt**, if the certificate comes from it. A certificate from your own certificate authority needs nothing.

In 2026.12.9 the sign-in service also sends usage reports to `zitadel.com`. A later release turns them off, and nothing in Jedify depends on them.

### Routing is not enforcement

The private zones keep Google traffic off the internet; they don't stop anything else from reaching it. To enforce no internet access, add a deny-by-default egress firewall rule with one allow for `199.36.153.0/24`, keep nodes without external addresses, and consider a VPC Service Controls perimeter around the project.

### The install host

The install host needs no internet either, but OpenTofu needs its providers: mirror them with `tofu providers mirror` on a connected machine, and point the install host's `.tofurc` at the mirror with `filesystem_mirror`. Helm pulls the operator's chart from Jedify's registry, under `pkg.dev`.

## Check it

The preflight checks every row above from the install host, before you apply, and names each fix:

```sh theme={null}
./scripts/preflight.sh --state-bucket acme-jedify-tfstate
```

It changes nothing, so your network team can run it as themselves.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.