k8s

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrJobFailed = errors.New("job failed")
View Source
var ErrUnexpectedTypePodWatch = errors.New("unexpected type while watching pods")
View Source
var ErrUnexpectedTypeServiceWatch = errors.New("unexpected type while watching service")

Functions

func GetContexts added in v0.9.0

func GetContexts(kubeconfigPath string) ([]string, error)

func GetNamespaces added in v0.9.0

func GetNamespaces(kubeconfigPath string, ctx string) ([]string, error)

func GetPVCs added in v0.9.0

func GetPVCs(kubeconfigPath string, ctx string, namespace string) ([]string, error)

func GetServiceAddress

func GetServiceAddress(
	cli kubernetes.Interface,
	namespace string,
	name string,
	lbTimeout time.Duration,
) (string, error)

func PortForward added in v0.7.3

func PortForward(req *PortForwardRequest) error

func WaitForJobCompletion added in v0.7.2

func WaitForJobCompletion(logger *log.Entry, cli kubernetes.Interface,
	namespace string, name string, progressBarRequested bool,
) error

func WaitForPod added in v0.7.3

func WaitForPod(cli kubernetes.Interface, namespace, labelSelector string) (*corev1.Pod, error)

Types

type ClusterClient added in v0.7.0

type ClusterClient struct {
	RestConfig       *rest.Config
	KubeClient       kubernetes.Interface
	RESTClientGetter genericclioptions.RESTClientGetter
	NsInContext      string
}

func GetClusterClient added in v0.7.0

func GetClusterClient(kubeconfigPath string, context string) (*ClusterClient, error)

type HelmRESTClientGetter added in v0.7.0

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

func NewRESTClientGetter added in v0.7.0

func NewRESTClientGetter(restConfig *rest.Config,
	clientConfig clientcmd.ClientConfig,
) *HelmRESTClientGetter

func (*HelmRESTClientGetter) ToDiscoveryClient added in v0.7.0

func (*HelmRESTClientGetter) ToRESTConfig added in v0.7.0

func (c *HelmRESTClientGetter) ToRESTConfig() (*rest.Config, error)

func (*HelmRESTClientGetter) ToRESTMapper added in v0.7.0

func (c *HelmRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)

func (*HelmRESTClientGetter) ToRawKubeConfigLoader added in v0.7.0

func (c *HelmRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig

type PortForwardRequest added in v0.7.3

type PortForwardRequest struct {
	// RestConfig is the kubernetes config
	RestConfig *rest.Config
	PodNs      string
	PodName    string
	LocalPort  int
	PodPort    int
	StopCh     <-chan struct{}
	ReadyCh    chan struct{}
	Logger     *log.Entry
}

Jump to

Keyboard shortcuts

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