manager

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CPUAnnotationKey    = "zeropod.ctrox.dev/cpu-requests"
	MemoryAnnotationKey = "zeropod.ctrox.dev/memory-requests"
)

Variables

View Source
var (
	ScaledDownCPU    = resource.MustParse("1m")
	ScaledDownMemory = resource.MustParse("1Ki")
)

Functions

func AttachRedirectors added in v0.2.0

func AttachRedirectors(ctx context.Context) error

AttachRedirectors scans the zeropod maps path in the bpf file system for directories named after the pid of the sandbox container. It does an initial iteration over all directories and then starts a goroutine which watches for fsevents. When the associated netns of the sandbox container can be found it attaches the redirector BPF programs to the network interfaces of the sandbox. The directories are expected to be created by the zeropod shim on startup.

func Handler

func Handler(w http.ResponseWriter, req *http.Request)

func StartSubscribers added in v0.3.0

func StartSubscribers(ctx context.Context, handlers ...StatusHandler) error

Types

type PodScaler added in v0.3.0

type PodScaler struct {
	// contains filtered or unexported fields
}

func NewPodScaler added in v0.3.0

func NewPodScaler() (*PodScaler, error)

func (*PodScaler) Handle added in v0.3.0

func (ps *PodScaler) Handle(ctx context.Context, status *v1.ContainerStatus) error

type Redirector added in v0.2.0

type Redirector struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type StatusHandler added in v0.3.0

type StatusHandler interface {
	Handle(context.Context, *v1.ContainerStatus) error
}

Jump to

Keyboard shortcuts

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