local

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFromHostWithCertData

func GetConfigFromHostWithCertData(kubeconfigPath string, allowedContexts []string) (clientcmd.ClientConfig, error)

GetConfigFromHostWithCertData gets the kubeconfig using default options set on the host: the kubeconfig can either be retrieved from a specified path or an environment variable. This function only outputs a clientcmd that uses the allowedContexts.

This function also populates all of the certificate data that's specified as a filepath.

func GetKubeconfigFromHost

func GetKubeconfigFromHost(kubeconfigPath string, contexts []string) ([]byte, error)

GetKubeconfigFromHost returns the kubeconfig for a list of contexts using default options set on the host, or an explicit kubeconfig path. It then strips the kubeconfig of contexts not specified in the contexts array, and returns generate kubeconfig.

func GetSelfAgentFromFileConfig added in v0.5.0

func GetSelfAgentFromFileConfig(kubeconfigPath string) (*kubernetes.Agent, error)

GetSelfAgentFromFileConfig reads a kubeconfig from a local file and generates an Agent from that kubeconfig

func ResolveKubeconfigPath

func ResolveKubeconfigPath(kubeconfigPath string) (string, error)

ResolveKubeconfigPath finds the path to a kubeconfig, first searching for the passed string, then in the home directory, then as an env variable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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