oom

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMapOOMRecordName = "oom-record"
	ConfigMapDataOOMRecord = "data"
)

Variables

This section is empty.

Functions

func IsOOMKilled

func IsOOMKilled(pod *v1.Pod) bool

Types

type OOMRecord

type OOMRecord struct {
	Pod       string
	Container string
	Memory    resource.Quantity
	OOMAt     time.Time
}

type PodOOMRecorder

type PodOOMRecorder struct {
	client.Client
	// contains filtered or unexported fields
}

PodOOMRecorder is responsible for record pod oom event in configmap

func (*PodOOMRecorder) GetOOMRecord

func (r *PodOOMRecorder) GetOOMRecord() ([]OOMRecord, error)

func (*PodOOMRecorder) Reconcile

func (r *PodOOMRecorder) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PodOOMRecorder) Run

func (r *PodOOMRecorder) Run(stopCh <-chan struct{}) error

func (*PodOOMRecorder) SetupWithManager

func (r *PodOOMRecorder) SetupWithManager(mgr ctrl.Manager) error

type Recorder

type Recorder interface {
	// GetOOMRecord get OOMRecord list that stored in configmap
	GetOOMRecord() ([]OOMRecord, error)
}

Jump to

Keyboard shortcuts

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