Documentation ¶
Overview ¶
Package kubeconfig manages teleport entries in a local kubeconfig file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(path string) (*clientcmdapi.Config, error)
Load tries to read a kubeconfig file and if it can't, returns an error. One exception, missing files result in empty configs, not an error.
func Remove ¶
Remove removes Teleport configuration from kubeconfig.
If `path` is empty, Remove will try to guess it based on the environment or known defaults.
func Update ¶
Update adds Teleport configuration to kubeconfig.
If `path` is empty, Update will try to guess it based on the environment or known defaults.
func UpdateWithClient ¶
func UpdateWithClient(path string, tc *client.TeleportClient) error
UpdateWithClient adds Teleport configuration to kubeconfig based on the configured TeleportClient.
If `path` is empty, UpdateWithClient will try to guess it based on the environment or known defaults.
Types ¶
type Values ¶
type Values struct { // Name is used to name kubeconfig sections ("context", "cluster" and // "user"). Should match Teleport cluster name. Name string // ClusterAddr is the public address the Kubernetes client will talk to, // usually a proxy. ClusterAddr string // Credentials are user credentials to use for authentication the // ClusterAddr. Only TLS fields (key/cert/CA) from Credentials are used. Credentials *client.Key }
Values are Teleport user data needed to generate kubeconfig entries.