Skip to content

Commit

Permalink
plugins/logger: Add NRI network messages to logger plugin
Browse files Browse the repository at this point in the history
Log NRI network messages

Signed-off-by: Patrik Flykt <[email protected]>
  • Loading branch information
pfl committed Oct 20, 2023
1 parent dba6704 commit d14b6a1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions plugins/logger/nri-logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,26 @@ func (p *plugin) RemoveContainer(_ context.Context, pod *api.PodSandbox, contain
return nil
}

func (p *plugin) NetworkConfigurationChanged(_ context.Context, cniconfigs []*api.CNIConfig) ([]*api.CNIConfig, error) {
dump("NetworkConfigurationchanged", "cniconfigs", cniconfigs)
return nil, nil
}

func (p *plugin) PreSetupNetwork(_ context.Context, pod *api.PodSandbox, cniconfigs []*api.CNIConfig) ([]*api.CNICapabilities, error) {
dump("PreSetupNetwork", "pod", pod, "cniconfigs", cniconfigs)
return nil, nil
}

func (p *plugin) PostSetupNetwork(_ context.Context, pod *api.PodSandbox, result []*api.Result) ([]*api.Result, error) {
dump("PostSetupNetwork", "pod", pod, "result", result)
return nil, nil
}

func (p *plugin) NetworkDeleted(_ context.Context, pod *api.PodSandbox) error {
dump("NetworkDeleted", "pod", pod)
return nil
}

func (p *plugin) onClose() {
os.Exit(0)
}
Expand Down

0 comments on commit d14b6a1

Please sign in to comment.