Documentation
¶
Index ¶
- func RandomPodName(pods []v1.Pod) string
- type Victim
- type VictimApiCalls
- type VictimBase
- func (v *VictimBase) DeletePod(clientset kube.Interface, podName string) error
- func (v *VictimBase) DeleteRandomPod(clientset kube.Interface) error
- func (v *VictimBase) DeleteRandomPods(clientset kube.Interface, killNum int) error
- func (v *VictimBase) Identifier() string
- func (v *VictimBase) IsBlacklisted() bool
- func (v *VictimBase) IsWhitelisted() bool
- func (v *VictimBase) Kind() string
- func (v *VictimBase) Mtbf() int
- func (v *VictimBase) Name() string
- func (v *VictimBase) Namespace() string
- func (v *VictimBase) Pods(clientset kube.Interface) ([]v1.Pod, error)
- func (v *VictimBase) RunningPods(clientset kube.Interface) (runningPods []v1.Pod, err error)
- func (v *VictimBase) TerminateAllPods(clientset kube.Interface) error
- type VictimBaseTemplate
- type VictimSpecificApiCalls
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomPodName ¶
func RandomPodName(pods []v1.Pod) string
Pick a random pod name from a list of Pods
Types ¶
type Victim ¶
type Victim interface {
VictimBaseTemplate
VictimSpecificApiCalls
}
type VictimApiCalls ¶
type VictimApiCalls interface {
// Exposed Api Calls
RunningPods(kube.Interface) ([]v1.Pod, error)
Pods(kube.Interface) ([]v1.Pod, error)
DeletePod(kube.Interface, string) error
DeleteRandomPod(kube.Interface) error // Deprecated, but faster than DeleteRandomPods for single pod termination
DeleteRandomPods(kube.Interface, int) error
TerminateAllPods(kube.Interface) error
IsBlacklisted() bool
IsWhitelisted() bool
}
type VictimBase ¶
type VictimBase struct {
VictimBaseTemplate
// contains filtered or unexported fields
}
func New ¶
func New(kind, name, namespace, identifier string, mtbf int) *VictimBase
func (*VictimBase) DeletePod ¶
func (v *VictimBase) DeletePod(clientset kube.Interface, podName string) error
Removes specified pod for victim
func (*VictimBase) DeleteRandomPod ¶
func (v *VictimBase) DeleteRandomPod(clientset kube.Interface) error
Deprecated for DeleteRandomPods(clientset, 1) Remove a random pod for the victim
func (*VictimBase) DeleteRandomPods ¶
func (v *VictimBase) DeleteRandomPods(clientset kube.Interface, killNum int) error
Removes specified number of random pods for the victim
func (*VictimBase) Identifier ¶
func (v *VictimBase) Identifier() string
func (*VictimBase) IsBlacklisted ¶
func (v *VictimBase) IsBlacklisted() bool
Check if this victim is blacklisted
func (*VictimBase) IsWhitelisted ¶
func (v *VictimBase) IsWhitelisted() bool
Check if this victim is whitelisted
func (*VictimBase) Kind ¶
func (v *VictimBase) Kind() string
func (*VictimBase) Mtbf ¶
func (v *VictimBase) Mtbf() int
func (*VictimBase) Name ¶
func (v *VictimBase) Name() string
func (*VictimBase) Namespace ¶
func (v *VictimBase) Namespace() string
func (*VictimBase) Pods ¶
func (v *VictimBase) Pods(clientset kube.Interface) ([]v1.Pod, error)
Returns a list of pods under the victim
func (*VictimBase) RunningPods ¶
func (v *VictimBase) RunningPods(clientset kube.Interface) (runningPods []v1.Pod, err error)
Returns a list of running pods for the victim
func (*VictimBase) TerminateAllPods ¶
func (v *VictimBase) TerminateAllPods(clientset kube.Interface) error
Terminate all pods for the victim, regardless of status
type VictimBaseTemplate ¶
type VictimSpecificApiCalls ¶
type VictimSpecificApiCalls interface {
// Depends on which version i.e. apps/v1 or extensions/v1beta2
IsEnrolled(kube.Interface) (bool, error) // Get updated enroll status
KillType(kube.Interface) (string, error) // Get updated kill config type
KillValue(kube.Interface) (int, error) // Get updated kill config value
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package factory is responsible for generating eligible victim kinds New types of kinds can be added easily
|
Package factory is responsible for generating eligible victim kinds New types of kinds can be added easily |
Click to show internal directories.
Click to hide internal directories.