kubeconfig

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertFileName = "k8s-ca.crt"
)
View Source
const (
	ContextPrefix = "gs-"
)

Variables

This section is empty.

Functions

func GenerateKubeContextName added in v0.5.5

func GenerateKubeContextName(installationCodeName string) string

GenerateKubeContextName creates a context name, from an installation's code name.

func GetAuthProvider

func GetAuthProvider(config *clientcmdapi.Config, contextName string) (*clientcmdapi.AuthProviderConfig, bool)

GetAuthProvider fetches the authentication provider from kubeconfig, for a desired context name.

func GetCodeNameFromKubeContext added in v0.5.5

func GetCodeNameFromKubeContext(c string) string

GetCodeNameFromKubeContext gets an installation's code name, by knowing the context used to reference it.

func GetKubeCertFilePath

func GetKubeCertFilePath(clusterName string) (string, error)

func GetKubeCertPath

func GetKubeCertPath(clusterName string) (string, error)

func IsCodeName added in v0.5.5

func IsCodeName(s string) bool

IsCodeName checks whether a provided name is an installation's code name.

func IsKubeContext added in v0.5.5

func IsKubeContext(s string) bool

IsKubeContext checks whether the name provided, matches our pattern for naming kubernetes contexts.

func WriteCertificate

func WriteCertificate(cert, clusterName string, fs afero.Fs) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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