k8s

package
v0.5.20 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextManager added in v0.5.10

type ContextManager struct {
	// contains filtered or unexported fields
}

ContextManager context manager implementing ContextOps

func (*ContextManager) CopyContext added in v0.5.10

func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error

CopyKubeContext copies context srcCtxName part of srcConfigAccess to targetCtxName part of targetConfigAccess.

func (*ContextManager) RemoveContext added in v0.5.10

func (k *ContextManager) RemoveContext(ctxName string) error

RemoveKubeContext removes the contextToRemove from the kubeContext pointed to be fromConfigAccess

type ContextOps added in v0.5.10

type ContextOps interface {
	CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error
	RemoveContext(ctxName string) error
}
var ContextMgr ContextOps

func NewK8sContextManager added in v0.5.10

func NewK8sContextManager() ContextOps

type K8s

type K8s interface {
	CoreV1() corev1.CoreV1Interface
}
var Client K8s

func GetK8sClient

func GetK8sClient(cfg, master string) (K8s, error)

GetK8sClient return the k8s client from sandbox kubeconfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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