util

package
v0.0.0-...-77b1a84 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 GetPortForwardingCmd(localPort int, remoteAPIAddr string, via string) string

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 Write

func Write(kc *clientcmdapi.Config) ([]byte, error)

func WriteToFile

func WriteToFile(kc *clientcmdapi.Config, configPath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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