Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPodNotFound = errors.New("pod not found")
ErrPodNotFound is returned when no victim could be found
Functions ¶
This section is empty.
Types ¶
type Chaoskube ¶
type Chaoskube struct {
// a kubernetes client object
Client kubernetes.Interface
// a label selector which restricts the pods to choose from
Labels labels.Selector
// a namespace selector which restricts the pods to choose from
Namespaces labels.Selector
// dry run will not allow any pod terminations
DryRun bool
// seed value for the randomizer
Seed int64
}
Chaoskube represents an instance of chaoskube
func New ¶
func New(client kubernetes.Interface, labels labels.Selector, namespaces labels.Selector, dryRun bool, seed int64) *Chaoskube
New returns a new instance of Chaoskube. It expects a kubernetes client, a label and namespace selector to reduce the amount of affected pods as well as whether to enable dryRun mode and a seed to seed the randomizer with.
func (*Chaoskube) Candidates ¶
func (c *Chaoskube) Candidates() ([]v1.Pod, error)
Candidates returns the list of pods that are available for termination. It returns all pods matching the label selector and at least one namespace.
Click to show internal directories.
Click to hide internal directories.