kubeconfig

package
v0.0.0-...-4c17ca5 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AWSIAMAuthenticator defines the name of the AWS IAM authenticator
	AWSIAMAuthenticator = "aws-iam-authenticator"
	// HeptioAuthenticatorAWS defines the old name of AWS IAM authenticator
	HeptioAuthenticatorAWS = "heptio-authenticator-aws"
	// AWSEKSAuthenticator defines the recently added `aws eks get-token` command
	AWSEKSAuthenticator = "aws"
)

Variables

DefaultPath defines the default path

Functions

func AppendAuthenticator

func AppendAuthenticator(config *clientcmdapi.Config, spec *api.ClusterConfig, authenticatorCMD, roleARN, profile string)

AppendAuthenticator appends the AWS IAM authenticator, and if profile is non-empty string it sets AWS_PROFILE environment variable also

func AuthenticatorCommands

func AuthenticatorCommands() []string

AuthenticatorCommands returns all of authenticator commands

func AutoPath

func AutoPath(name string) string

AutoPath returns the path for the auto-generated kubeconfig

func LookupAuthenticator

func LookupAuthenticator() (string, bool)

LookupAuthenticator looks up an available authenticator

func MaybeDeleteConfig

func MaybeDeleteConfig(meta *api.ClusterMeta)

MaybeDeleteConfig will delete the auto-generated kubeconfig, if it exists

func New

func New(spec *api.ClusterConfig, username, certificateAuthorityPath string) (*clientcmdapi.Config, string, string)

New creates Kubernetes client configuration for a given username if certificateAuthorityPath is not empty, it is used instead of embedded certificate-authority-data

func NewForKubectl

func NewForKubectl(spec *api.ClusterConfig, username, roleARN, profile string) *clientcmdapi.Config

NewForKubectl creates configuration for kubectl using a suitable authenticator

func Write

func Write(path string, newConfig clientcmdapi.Config, setContext bool) (string, error)

Write will write Kubernetes client configuration to a file. If path isn't specified then the path will be determined by client-go. If file pointed to by path doesn't exist it will be created. If the file already exists then the configuration will be merged with the existing file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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