oom

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0, BSD-2-Clause Imports: 16 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 {
	Namespace string
	Pod       string
	Container string
	Memory    resource.Quantity
	OOMAt     time.Time
}

type PodOOMRecorder

type PodOOMRecorder struct {
	client.Client
	OOMRecordMaxNumber int
	// 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