Documentation ¶
Index ¶
- func Connect(incluster bool, context string) *kubernetes.Clientset
- func ExternalClient(context string) (*kubernetes.Clientset, error)
- func GetDaemonset(appName string, namespaceName string, clientset *kubernetes.Clientset) (*appsv1.DaemonSet, error)
- func GetDeployment(appName string, namespaceName string, clientset *kubernetes.Clientset) (*appsv1.Deployment, error)
- func GetDeployments(clientset *kubernetes.Clientset, namespace apiv1.Namespace)
- func GetNamespaces(clientset *kubernetes.Clientset) *apiv1.NamespaceList
- func GetStatefulset(appName string, namespaceName string, clientset *kubernetes.Clientset) (*appsv1.StatefulSet, error)
- func InClusterClient() (*kubernetes.Clientset, error)
- type K8sApp
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
Click to show internal directories.
Click to hide internal directories.