Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteContext ¶
TODO: Should we rename this to CleanupContext? new package / file for kubeconfig stuff? DeleteContext deletes the context from the kubeconfig file and also deletes the corresponding cluster and user from the kubeconfig file
func UseKubeConfigContext ¶
Types ¶
type KubeClient ¶
type KubeClient struct {
kubernetes.Interface
}
With the below we can have sugar coat methods on KubeClient and also to the full power of kube client golang library as that field is exposed
func GetKubeClient ¶
func GetKubeClient(kubeConfigPath string, context string) (*KubeClient, error)
GetKubeClient creates a Kubernetes client for a given kubeconfig path and kubeconfig context in the kubeconfig. When context is empty, the current context mentioned in the kubeconfig is used by the kube client
func (*KubeClient) GetAllNodes ¶
func (kubeclient *KubeClient) GetAllNodes() (*v1.NodeList, error)
TODO: Should we return []Node instead of *v1.PodList ? Something to think about
func (*KubeClient) GetAllPodsFromAllNamespaces ¶
func (kubeclient *KubeClient) GetAllPodsFromAllNamespaces() (*v1.PodList, error)
TODO: Should we return []Pod instead of *v1.PodList ? Something to think about TODO: Maybe change the name of the below receiver? It's the same as the package name