k8s

package
v0.8.18 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 8 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) CheckConfig added in v0.6.20

func (k *ContextManager) CheckConfig() error

CheckConfig checks if the kubeConfig pointed to by configAccess exists

func (*ContextManager) CopyContext added in v0.5.10

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 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 {
	CheckConfig() error
	CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName, targetNamespace 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