Skip to content

GC Improvement #1091

@s1061123

Description

@s1061123

Currently GC calls with cni.dev/valid-attachments arguments, to specify current valid attachments based on network config.

GCNetworkList(ctx context.Context, net *NetworkConfigList, args *GCArgs) error

If there is multiple network config (one or more CNI is configured in container runtime or by multus), then one plugin may receives multiple GC calls for each network config. (e.g. pluginA GC for config1 and pluignA GC for config2). GC takes a bit huge computation cost, so we should optimize it as much as we can.

Hence we could improve GC calls by

  • Add new GC API (or we just change current GC API because currently none uses it yet)
 GCNetworkLists(ctx context.Context, net []*NetworkConfigList, args *GCArgs) error
  • In new API, we optimize (sort and dedup) for each plugin, invoke GC with valid arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions