plugin

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	K8s            kubernetes.Interface
	NodeName       string
	PluginName     string
	PluginIdx      string
	KubeletPodsDir string
	HostPrefixDir  string
}

Options configures the Plugin.

type Plugin

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

Plugin is an NRI plugin that applies cgroupv2 io.max limits to containers whose CSI volumes carry IO limit metadata in their VolumeAttachment.

func New

func New(opts Options) (*Plugin, error)

New creates and registers the NRI plugin stub.

func (*Plugin) CreateContainer

func (p *Plugin) CreateContainer(ctx context.Context, pod *api.PodSandbox, container *api.Container) (*api.ContainerAdjustment, []*api.ContainerUpdate, error)

CreateContainer implements stub.CreateContainerInterface.

The returned ContainerAdjustment carries io.max entries in the cgroupv2 Unified map; the runtime writes them to the container cgroup at creation time, so we never touch the cgroup filesystem directly.

func (*Plugin) Run

func (p *Plugin) Run(ctx context.Context) error

Run starts the informer cache, waits for it to sync, then starts the NRI plugin and blocks until ctx is cancelled or the runtime disconnects.

Jump to

Keyboard shortcuts

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