apiproxy

package
v1.106.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: BSD-3-Clause Imports: 33 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package apiproxy contains the Kubernetes API Proxy implementation used by k8s-operator and k8s-proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServerProxy added in v1.86.0

type APIServerProxy struct {
	// contains filtered or unexported fields
}

APIServerProxy is an net/http.Handler that authenticates requests using the Tailscale LocalAPI and then proxies them to the Kubernetes API.

func NewAPIServerProxy added in v1.86.0

func NewAPIServerProxy(zlog *zap.SugaredLogger, restConfig *rest.Config, ts *tsnet.Server, mode kubetypes.APIServerProxyMode, https bool) (*APIServerProxy, error)

NewAPIServerProxy creates a new APIServerProxy that's ready to start once Run is called. No network traffic will flow until Run is called.

authMode controls how the proxy behaves:

  • true: the proxy is started and requests are impersonated using the caller's Tailscale identity and the rules defined in the tailnet ACLs.
  • false: the proxy is started and requests are passed through to the Kubernetes API without any auth modifications.

func (*APIServerProxy) Run added in v1.86.0

func (ap *APIServerProxy) Run(ctx context.Context) error

Run starts the HTTP server that authenticates requests using the Tailscale LocalAPI and then proxies them to the Kubernetes API. It listens on :443 and uses the Tailscale HTTPS certificate.

It return when ctx is cancelled or ServeTLS fails.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL