Skip to content

Add the Serval API and controller for the non-cluster host gateway - #5067

Draft
hjiawei wants to merge 1 commit into
tigera:masterfrom
hjiawei:serval-non-cluster-host-gateway
Draft

Add the Serval API and controller for the non-cluster host gateway#5067
hjiawei wants to merge 1 commit into
tigera:masterfrom
hjiawei:serval-non-cluster-host-gateway

Conversation

@hjiawei

@hjiawei hjiawei commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Description

New feature. Adds the Serval API (operator.tigera.io/v1) and controller. Serval is a layer-7 gateway that becomes the single entrypoint for non-cluster hosts: one HTTPS endpoint serving the impersonating kube-apiserver proxy, the log ingestion routes, and a WebSocket tunnel that carries the felix-typha sync connection. It supersedes the deprecated NonClusterHost resource; NonClusterHost keeps working unchanged as a legacy mode until a later removal release.

The controller renders the gateway Deployment (combined calico image, controlPlaneReplicas with pod anti-affinity, enableServiceLinks: false), a ClusterIP Service, an operator-issued TLS keypair including the external endpoint SAN, RBAC (impersonation, TokenReview/SubjectAccessReview create, get on serviceaccounts for the Tigera-JWT authenticator), and allow-tigera network policies. The fluent-bit input policy admits serval as a source, and the host ClusterRole gains read on servals.

Testing: render unit tests, plus end-to-end validation of the rendered object shapes on a kubeadm Enterprise cluster with a Rocky 9 non-cluster host (felix in sync through the tunnel, apiserver proxy serving the cert-init and token-minting flows, logs flowing to linseed).

Companion PR (calico-private): https://github.com/tigera/calico-private/pull/12765
Design: tigera/designs 2026/serval-non-cluster-host-gateway

Release Note

Added the Serval resource and controller, deploying a layer-7 gateway that is the single entrypoint for non-cluster hosts. NonClusterHost is deprecated.

🤖 Generated with Claude Code

@marvin-tigera marvin-tigera added this to the v1.44.0 milestone Jul 19, 2026
@hjiawei
hjiawei force-pushed the serval-non-cluster-host-gateway branch 5 times, most recently from bce1311 to c042677 Compare July 26, 2026 06:07
Render serval, the single HTTPS entrypoint for non-cluster hosts, from
the existing NonClusterHost CR. spec.typhaEndpoint is deprecated: unset
selects the tunnel and the nonclusterhost controller renders serval; set
keeps today's direct-to-typha path and renders
calico-typha-noncluster-host. Exactly one exists at a time, both owned by
the same CR, so flipping the field is an ordinary reconcile. There is no
Serval CR and no separate controller.

Serval runs Typha in-process, sourced from the in-cluster calico-typha,
so it needs a Typha client keypair (serval-typha-client-certs, common
name typha-client) and no datastore RBAC. Its egress rule to calico-typha
matches the Service rather than an endpoint selector, because a plain
selector does not match ClusterIP-DNAT'd traffic; a service selector
implies the Service's ports, so Ports must not be set alongside it.

Serval carries the per-host fan-out, so the HostEndpoint-count autoscaler
drives its replica count, as it did for calico-typha-noncluster-host. The
in-cluster calico-typha keeps scaling on nodes alone: each serval replica
is a single client of it however many hosts it serves. The HostEndpoint
count now includes only the endpoints the node init labels as non-cluster
hosts, so auto and in-cluster host endpoints no longer inflate it.

The non-cluster-host Typha policy is deleted alongside the other v3
policies rather than with that deployment and service. A v3 resource is
only reconcilable while the API server is healthy, so deleting it from
the Typha component made every reconcile fail on a cluster that has no
Calico API server -- including the FV environment, where it stalled
unrelated components behind a degraded installation.

Also refresh the imported FelixConfiguration CRDs, which had drifted from
calico master (nftables flowtable offload fields).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hjiawei
hjiawei force-pushed the serval-non-cluster-host-gateway branch from c042677 to 07751de Compare July 27, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants