containerd / containerd/nri

Support filters for NRI plugins

Open
#72 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
406
Forks
102
Avg merge
1d 10h
Merged PRs (30d)
8

Description

From https://github.com/containerd/nri/blob/main/pkg/api/api.proto#L29

```
// Runtime service is the public API runtimes expose for NRI plugins.
// On this interface RPC requests are initiated by the plugin. This
// only covers plugin registration and unsolicited container updates.
// The rest of the API is defined by the Plugin service.
service Runtime {
// RegisterPlugin registers the plugin with the runtime.
rpc RegisterPlugin(RegisterPluginRequest) returns (Empty);
// UpdateContainers requests unsolicited updates to a set of containers.
rpc UpdateContainers(UpdateContainersRequest) returns (UpdateContainersResponse);
}

message RegisterPluginRequest {
// Name of the plugin to register.
string plugin_name = 1;
// Plugin invocation index. Plugins are called in ascending index order.
string plugin_idx = 2;
}

```

Here, is it possible to support registration plugins to only handle some Pods or containers? Similar to kubernetes webhook, filter is a very common pattern. For example, we want to set some environment variables for the GPU Pod, but we do not want the GPU Pod hook server to affect the CPU Pod.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with pkg/api/api.proto at the Runtime service and RegisterPluginRequest definitions. Read the surrounding plugin and container API declarations to understand where registration behavior is defined. Done should specify and validate a filter mechanism that lets a plugin handle selected Pods or containers without affecting others, such as keeping a GPU-focused plugin from affecting CPU Pods.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.