k8sbuddy

package
v0.0.0-...-e90f3c6 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(incluster bool, context string) *kubernetes.Clientset

Connect return a connection to k8s api

func ExternalClient

func ExternalClient(context string) (*kubernetes.Clientset, error)

ExternalClient - use out of cluster config

func GetDaemonset

func GetDaemonset(appName string, namespaceName string, clientset *kubernetes.Clientset) (*appsv1.DaemonSet, error)

GetDaemonset return info on single deployment

func GetDeployment

func GetDeployment(appName string, namespaceName string, clientset *kubernetes.Clientset) (*appsv1.Deployment, error)

GetDeployment load info for single deployment

func GetDeployments

func GetDeployments(clientset *kubernetes.Clientset, namespace apiv1.Namespace)

GetDeployments return list of all deployments in all namespaces

func GetNamespaces

func GetNamespaces(clientset *kubernetes.Clientset) *apiv1.NamespaceList

GetNamespaces return list of all namespaces

func GetStatefulset

func GetStatefulset(appName string, namespaceName string, clientset *kubernetes.Clientset) (*appsv1.StatefulSet, error)

GetStatefulset return info on single deployment

func InClusterClient

func InClusterClient() (*kubernetes.Clientset, error)

InClusterClient - return a k8s client using incluster config

Types

type K8sApp

type K8sApp struct {
	Kind string
	SS   *appsv1.StatefulSet
	DP   *appsv1.Deployment
	DS   *appsv1.DaemonSet
	NS   *apiv1.Namespace
}

K8sApp holds info on a

func (*K8sApp) GetAppInfo

func (k8sapp *K8sApp) GetAppInfo(appName string, namespaceName string, clientset *kubernetes.Clientset)

GetAppInfo returns something about appName/namespaceName

Jump to

Keyboard shortcuts

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