k8s

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8s

type K8s struct {
	Config     api.Config
	RestConfig *rest.Config
	Clientset  *kubernetes.Clientset
	Contexts   map[string]*api.Context
}

K8s is a struct of the commonly used kubernetes client

func NewK8s

func NewK8s(kubeconfig string) *K8s

NewK8s initializes a K8s

func (*K8s) ContextNames

func (k8s *K8s) ContextNames() []string

ContextNames returns the contexts available in a kubeconfig

func (*K8s) ContextNamesWithPrefix

func (k8s *K8s) ContextNamesWithPrefix(prefix string) []string

ContextNamesWithPrefix returns the context names that begins with the passed prefix

func (*K8s) DeploymentNamesWithPrefix

func (k8s *K8s) DeploymentNamesWithPrefix(prefix string, labelSelector string) []string

DeploymentNamesWithPrefix returns the context names that begins with the passed prefix

func (*K8s) Deployments

func (k8s *K8s) Deployments(labelSelector string) []appsv1.Deployment

Deployments returns a list of deployments

func (*K8s) SelectContext

func (k8s *K8s) SelectContext(context string)

SelectContext selects a context to connect the clientset to

Jump to

Keyboard shortcuts

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