Documentation ¶
Index ¶
- Constants
- func GenerateKubeContextName(installationCodeName string) string
- func GenerateWCKubeContextName(mcKubeContextName string, wcName string) string
- func GetAuthProvider(config *clientcmdapi.Config, contextName string) (*clientcmdapi.AuthProviderConfig, bool)
- func GetClusterNameFromKubeContext(c string) string
- func GetClusterServer(config *clientcmdapi.Config, contextName string) (string, bool)
- func GetCodeNameFromKubeContext(c string) string
- func GetKubeCertFilePath(clusterName string) (string, error)
- func GetKubeCertPath(clusterName string) (string, error)
- func IsCodeName(s string) bool
- func WriteCertificate(cert, clusterName string, fs afero.Fs) error
- type AuthType
- type ContextType
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
GenerateKubeContextName creates a context name, from an installation's code name.
func GenerateWCKubeContextName ¶ added in v1.44.0
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 GetClusterNameFromKubeContext ¶ added in v1.44.0
func GetClusterServer ¶ added in v1.48.0
func GetClusterServer(config *clientcmdapi.Config, contextName string) (string, bool)
func GetCodeNameFromKubeContext ¶ added in v0.5.5
GetCodeNameFromKubeContext gets an installation's code name, by knowing the context used to reference it.
func GetKubeCertFilePath ¶
func GetKubeCertPath ¶
func IsCodeName ¶ added in v0.5.5
IsCodeName checks whether a provided name is an installation's code name.
Types ¶
type AuthType ¶ added in v1.48.0
type AuthType int
func GetAuthType ¶ added in v1.48.0
func GetAuthType(config *clientcmdapi.Config, contextName string) AuthType
type ContextType ¶ added in v1.44.0
type ContextType int
const ( ContextTypeNone ContextType = iota ContextTypeMC ContextTypeWC )
func GetKubeContextType ¶ added in v1.44.0
func GetKubeContextType(s string) ContextType
func IsKubeContext ¶ added in v0.5.5
func IsKubeContext(s string) (bool, ContextType)
IsKubeContext checks whether the name provided, matches our pattern for naming kubernetes contexts.
Click to show internal directories.
Click to hide internal directories.