controller

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TerminationReasonOOMKilled is the reason of a ContainerStateTerminated that reflects an OOM kill
	TerminationReasonOOMKilled = "OOMKilled"
)

Variables

View Source
var (
	// ProcessedContainerUpdates stores the number of processed containers
	ProcessedContainerUpdates = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: "kubernetes_oom_event_generator",
		Name:      "container_updates_processed_total",
		Help:      "The total number of processed container updates.",
	}, []string{"update_type"})
)

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Stop chan struct{}
	// contains filtered or unexported fields
}

Controller is a controller that listens on Pod changes and create Kubernetes Events when a container reports it was previously killed

func NewController

func NewController(stop chan struct{}) *Controller

NewController returns an instance of the Controller

func (*Controller) Run

func (c *Controller) Run() error

Run is the main loop that processes Kubernetes Pod changes

Jump to

Keyboard shortcuts

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