k8s

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoClusterConnectivity = errors.New("not able to connect to Kubernetes Cluster")
)

Functions

func BuildConfig

func BuildConfig(kubeConfig KubeConfig) (clientcmd.ClientConfig, error)

func Home

func Home() string

Types

type KubeAPI

type KubeAPI struct {
	Config    clientcmd.ClientConfig
	Clientset *kubernetes.Clientset
}

func NewKubeAPI

func NewKubeAPI(kubeConfig KubeConfig) (*KubeAPI, error)

func (*KubeAPI) CreateSecret

func (kubeapi *KubeAPI) CreateSecret(secret *v1.Secret) (*v1.Secret, error)

func (*KubeAPI) DeleteNamespaces

func (kubeapi *KubeAPI) DeleteNamespaces(namespaceName string) error

func (*KubeAPI) DeleteSecret

func (kubeapi *KubeAPI) DeleteSecret(secretName string) error

func (*KubeAPI) DryRun

func (kubeapi *KubeAPI) DryRun()

func (*KubeAPI) GetContainerLogs

func (kubeapi *KubeAPI) GetContainerLogs(namespace string, podName string, containerName string, out io.Writer) error

func (*KubeAPI) GetContainers

func (kubeapi *KubeAPI) GetContainers(namespace string, podName string) ([]v1.Container, error)

func (*KubeAPI) GetDeployments

func (kubeapi *KubeAPI) GetDeployments(namespace v1.Namespace) ([]appsv1.Deployment, error)

func (*KubeAPI) GetEvents

func (kubeapi *KubeAPI) GetEvents() ([]v1.Event, error)

func (*KubeAPI) GetInfo

func (kubeapi *KubeAPI) GetInfo() (map[string]string, error)

func (*KubeAPI) GetNamespaces

func (kubeapi *KubeAPI) GetNamespaces() ([]v1.Namespace, error)

func (*KubeAPI) GetNodes

func (kubeapi *KubeAPI) GetNodes() ([]v1.Node, error)

func (*KubeAPI) GetPods

func (kubeapi *KubeAPI) GetPods(namespace string) ([]v1.Pod, error)

func (*KubeAPI) GetSecrets

func (kubeapi *KubeAPI) GetSecrets() ([]v1.Secret, error)

func (*KubeAPI) GetServices

func (kubeapi *KubeAPI) GetServices(namespace string) ([]v1.Service, error)

func (*KubeAPI) WatchEvents

func (kubeapi *KubeAPI) WatchEvents() (watch.Interface, error)

func (*KubeAPI) WatchNamespaces

func (kubeapi *KubeAPI) WatchNamespaces() (watch.Interface, error)

func (*KubeAPI) WatchPodLogs

func (kubeapi *KubeAPI) WatchPodLogs(namespace string, podName string) (watch.Interface, error)

type KubeConfig

type KubeConfig struct {
	Type     string
	Manifest string
}

Jump to

Keyboard shortcuts

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