podStatus

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package podStatus implements a pod health checker for Kuberhealthy. Pods are checked to ensure they are not restarting too much and are in a healthy lifecycle phase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	FailureTimeStamp map[string]time.Time
	Errors           []string
	Namespace        string
	MaxTimeInFailure float64 // TODO - make configurable
	// contains filtered or unexported fields
}

Checker validates that pods within a namespace are in a healthy state

func New

func New(namespace string) *Checker

New returns a new Checker

func (*Checker) CheckNamespace

func (psc *Checker) CheckNamespace() string

CheckNamespace returns the namespace of this checker

func (*Checker) CurrentStatus

func (psc *Checker) CurrentStatus() (bool, []string)

CurrentStatus returns the status of the check as of right now

func (*Checker) Interval

func (psc *Checker) Interval() time.Duration

Interval returns the interval at which this check runs

func (*Checker) Name

func (psc *Checker) Name() string

Name returns the name of this checker

func (*Checker) Run

func (psc *Checker) Run(client *kubernetes.Clientset) error

Run implements the entrypoint for check execution

func (*Checker) Shutdown

func (psc *Checker) Shutdown() error

Shutdown is implemented to satisfy KuberhealthyCheck but is not used

func (*Checker) Timeout

func (psc *Checker) Timeout() time.Duration

Timeout returns the maximum run time for this check before it times out

Jump to

Keyboard shortcuts

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