pod

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Run executes the EC2 API poller. It will update the instance cache
	// periodically.
	Run(context.Context) error

	// List returns all EC2 Instances that are currently in the cache. Those
	// instance cache will be updated in the background.
	List(context.Context) []Pod

	// SignalEmitter gets triggered every time the cache changes. See syncutil
	// package for more information.
	SignalEmitter() *syncutil.SignalEmitter

	// Healthy indicates whether the background job is running correctly.
	Healthy() bool

	// Evict deletes a pod.
	Evict(context.Context, *Pod) error
}

func New

func New(kube kubernetes.Interface) Client

type OwnerReadyReason

type OwnerReadyReason struct {
	CanDecrement bool   `logfield:"pod-owner-ready-can-decrement"`
	Short        string `logfield:"pod-owner-ready-short"`
	Reason       string `logfield:"-"`
}

func GetOwnerReadyFromReplicas

func GetOwnerReadyFromReplicas(kind string, specReplicas *int32, haveReplicas int32) OwnerReadyReason

func GetOwnerReadyStatic

func GetOwnerReadyStatic(kind string) *OwnerReadyReason

type PDBReadyReason added in v2.6.0

type PDBReadyReason struct {
	CanDecrement bool   `logfield:"pdp-owner-ready-can-decrement"`
	Short        string `logfield:"pdp-owner-ready-short"`
	Reason       string `logfield:"-"`
}

type Pod

type Pod struct {
	Name      string `logfield:"pod-name"`
	Namespace string `logfield:"pod-namespace"`
	NodeName  string `logfield:"node-name"`

	AppName      string `logfield:"app-name"`
	AppInstance  string `logfield:"app-instance"`
	AppVersion   string `logfield:"app-version"`
	AppComponent string `logfield:"app-component"`

	OwnerKind   string           `logfield:"pod-owner-kind"`
	OwnerName   string           `logfield:"pod-owner-name"`
	OwnerReady  OwnerReadyReason `logfield:",squash"`
	PDBReady    PDBReadyReason   `logfield:",squash"`
	CreatedTime time.Time        `logfield:"pod-created-time"`
}

func (*Pod) ImmuneToEviction

func (p *Pod) ImmuneToEviction() bool

Jump to

Keyboard shortcuts

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