Documentation ¶
Index ¶
- func AnnotateConnectRequest(cr *connector.ConnectRequest, cacheDir, kubeContext string)
- func AnnotateOutboundInfo(ctx context.Context, oi *daemon.OutboundInfo, kubeContext string)
- func CreateExternalKubeConfig(ctx context.Context, loader clientcmd.ClientConfig, kubeContext string, ...) (*clientcmdapi.Config, error)
- type AddressProvider
- type Patcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateConnectRequest ¶ added in v2.17.0
func AnnotateConnectRequest(cr *connector.ConnectRequest, cacheDir, kubeContext string)
AnnotateConnectRequest is used when the CLI connects to a containerized user-daemon. It adds a ContainerKubeFlagOverrides to the given ConnectRequest containing the path to the modified kubeconfig file to be used in the container.
func AnnotateOutboundInfo ¶ added in v2.17.0
func AnnotateOutboundInfo(ctx context.Context, oi *daemon.OutboundInfo, kubeContext string)
AnnotateOutboundInfo is used when a non-containerized user-daemon connects to the root-daemon. The KubeFlags are modified to contain the path to the modified kubeconfig file.
func CreateExternalKubeConfig ¶ added in v2.17.0
func CreateExternalKubeConfig( ctx context.Context, loader clientcmd.ClientConfig, kubeContext string, authAddressFunc AddressProvider, patcher Patcher, ) (*clientcmdapi.Config, error)
CreateExternalKubeConfig will load the current kubeconfig and minimize it so that it just contains the current context. It will then check if that context contains an Exec config, and if it does, replace that config with an Exec config that instead runs a process that will use a gRPC call to the address returned by the given authAddressFunc.
Types ¶
type AddressProvider ¶ added in v2.17.0
AddressProvider is a function that returns the path to the telepresence executable and an address to a service that implements the Authenticator gRPC.
The function will typically start the gRPC service, and the service is therefore given a list of files that it must listen to in order to reliably resolve requests. It is also passed a pointer to the minified config that will be stored in a file so that it has a chance to modify it.
type Patcher ¶ added in v2.17.0
type Patcher func(*clientcmdapi.Config) error
AddressProvider is a function that returns the path to the telepresence executable and an address to a service that implements the Authenticator gRPC.
The function will typically start the gRPC service, and the service is therefore given a list of files that it must listen to in order to reliably resolve requests. It is also passed a pointer to the minified config that will be stored in a file so that it has a chance to modify it.