Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextManager ¶
type ContextManager struct {
// contains filtered or unexported fields
}
ContextManager context manager implementing ContextOps
func (*ContextManager) CheckConfig ¶
func (k *ContextManager) CheckConfig() error
CheckConfig checks if the kubeConfig pointed to by configAccess exists
func (*ContextManager) CopyContext ¶
func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName, targetNamespace string) error
CopyContext copies context srcCtxName part of srcConfigAccess to targetCtxName part of targetConfigAccess.
func (*ContextManager) RemoveContext ¶
func (k *ContextManager) RemoveContext(ctxName string) error
RemoveKubeContext removes the contextToRemove from the kubeContext pointed to be fromConfigAccess
type ContextOps ¶
type ContextOps interface { CheckConfig() error CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName, targetNamespace string) error RemoveContext(ctxName string) error }
var ContextMgr ContextOps
func NewK8sContextManager ¶
func NewK8sContextManager() ContextOps
type K8s ¶
type K8s interface {
CoreV1() corev1.CoreV1Interface
}
var Client K8s
func GetK8sClient ¶
GetK8sClient return the k8s client from sandbox kubeconfig
Click to show internal directories.
Click to hide internal directories.