Documentation
¶
Overview ¶
Package services contains the registrar's mesh-Service generator: it projects the mesh service catalog into selectorless k8s Services on the mesh port — transparent- capture VIP/name handles (proposal 018, Phase 3a). Endpoints stay in the registry (the Services carry no selector, so no EndpointSlices); each Service is annotated with the mesh service + app port so the agent can map a captured ClusterIP (original-dst) back to the registry-backed EDS cluster.
Index ¶
Constants ¶
const ( AppProtocolHTTP = "http" AppProtocolTCP = "tcp" )
AppProtocolHTTP / AppProtocolTCP are the AnnotationMeshAppProtocol values the generator writes (and the agent reads to decide TCP-floor chain emission).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
client.Client
Snapshot *server.Snapshot
MeshPort int32
Interval time.Duration
Log *slog.Logger
}
Generator reconciles the registrar snapshot's mesh services into selectorless k8s Services (one per service, in the service's namespace, on MeshPort). It is a leader-elected manager Runnable: only the leader writes Services.
func (*Generator) NeedLeaderElection ¶
NeedLeaderElection makes the generator run only on the elected leader (single writer).