Documentation ¶
Index ¶
- func FindCluster(kc *clientcmdapi.Config, inCluster *clientcmdapi.Cluster) (string, bool)
- func FindContextsByName(kc *clientcmdapi.Config, name string, filter func(string) bool) map[string]*clientcmdapi.Context
- func GetClusterContext(kc *clientcmdapi.Config, cluster string) (string, *clientcmdapi.Context)
- func GetPortForwardingCmd(localPort int, remoteAPIAddr string, via string) string
- func GetUser(kc *clientcmdapi.Config, userName string) *clientcmdapi.AuthInfo
- func IsClusterEqual(k1, k2 *clientcmdapi.Cluster) bool
- func Load(configPath string) (*clientcmdapi.Config, error)
- func Write(kc *clientcmdapi.Config) ([]byte, error)
- func WriteToFile(kc *clientcmdapi.Config, configPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindCluster ¶
func FindCluster(kc *clientcmdapi.Config, inCluster *clientcmdapi.Cluster) (string, bool)
func FindContextsByName ¶
func FindContextsByName(kc *clientcmdapi.Config, name string, filter func(string) bool) map[string]*clientcmdapi.Context
func GetClusterContext ¶
func GetClusterContext(kc *clientcmdapi.Config, cluster string) (string, *clientcmdapi.Context)
GetClusterContext extracts context from Config for given cluster.
func GetPortForwardingCmd ¶
func GetUser ¶
func GetUser(kc *clientcmdapi.Config, userName string) *clientcmdapi.AuthInfo
func IsClusterEqual ¶
func IsClusterEqual(k1, k2 *clientcmdapi.Cluster) bool
IsClusterEqual checks whether the two cluster is equal based on CertificateAuthority info.
func Load ¶
func Load(configPath string) (*clientcmdapi.Config, error)
Load reads kubeconfig from file
func WriteToFile ¶
func WriteToFile(kc *clientcmdapi.Config, configPath string) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.