* ipn,tailcfg: add VIPService struct and c2n to fetch them from client
Updates tailscale/corp#22743, tailscale/corp#22955
Signed-off-by: Naman Sood <mail@nsood.in>
* more review fixes
Signed-off-by: Naman Sood <mail@nsood.in>
* don't mention PeerCapabilityServicesDestination since it's currently unused
Signed-off-by: Naman Sood <mail@nsood.in>
---------
Signed-off-by: Naman Sood <mail@nsood.in>
Userspaceopt.Bool`json:",omitempty"`// if the client is running in userspace (netstack) mode
UserspaceRouteropt.Bool`json:",omitempty"`// if the client's subnet router is running in userspace (netstack) mode
AppConnectoropt.Bool`json:",omitempty"`// if the client is running the app-connector service
ServicesHashstring`json:",omitempty"`// opaque hash of the most recent list of tailnet services, change in hash indicates config should be fetched via c2n
// Location represents geographical location data about a
// Tailscale host. Location is optional and only set if
@ -830,6 +832,26 @@ type Hostinfo struct {
// require changes to Hostinfo.Equal.
}
// VIPService represents a service created on a tailnet from the
// perspective of a node providing that service. These services
// have an virtual IP (VIP) address pair distinct from the node's IPs.
typeVIPServicestruct{
// Name is the name of the service, of the form `svc:dns-label`.
// See CheckServiceName for a validation func.
// Name uniquely identifies a service on a particular tailnet,
// and so also corresponds uniquely to the pair of IP addresses
// belonging to the VIP service.
Namestring
// Ports specify which ProtoPorts are made available by this node
// on the service's IPs.
Ports[]ProtoPortRange
// Active specifies whether new requests for the service should be
// sent to this node by control.
Activebool
}
// TailscaleSSHEnabled reports whether or not this node is acting as a
// Tailscale SSH server.
func(hi*Hostinfo)TailscaleSSHEnabled()bool{
@ -1429,6 +1451,11 @@ const (
// user groups as Kubernetes user groups. This capability is read by
// peers that are Tailscale Kubernetes operator instances.