kube

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	GetClusterDeployments(kubernetes.Interface, string) ([]appsv1.Deployment, error)
	GetClusterStatefulSets(kubernetes.Interface, string) ([]appsv1.StatefulSet, error)
	GetClusterStatus(kubernetes.Interface, string) bool
}

Agent is used for communication with Kubernetes, made into an interface for testability

type DefaultAgent

type DefaultAgent struct{}

DefaultAgent is the default implementation of the KubeAgent

func (DefaultAgent) GetClusterDeployments

func (k DefaultAgent) GetClusterDeployments(kube kubernetes.Interface, name string) ([]appsv1.Deployment, error)

GetClusterDeployments gets all the deployments for a particular cluster

func (DefaultAgent) GetClusterStatefulSets

func (k DefaultAgent) GetClusterStatefulSets(kube kubernetes.Interface, name string) ([]appsv1.StatefulSet, error)

GetClusterStatefulSets gets all the statefulsets for a particular cluster

func (DefaultAgent) GetClusterStatus

func (k DefaultAgent) GetClusterStatus(kube kubernetes.Interface, name string) bool

GetClusterStatus returns the status of a cluster by ensuring each node is in a ready state

Jump to

Keyboard shortcuts

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