Add missing sandbox labels when invoking nri plugins

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
This commit is contained in:
Moritz Johner 2020-10-03 23:16:23 +02:00
parent d620c30d7e
commit f87302ab20

View File

@ -126,7 +126,8 @@ func (c *criService) StartContainer(ctx context.Context, r *runtime.StartContain
} }
if nric != nil { if nric != nil {
nriSB := &nri.Sandbox{ nriSB := &nri.Sandbox{
ID: sandboxID, ID: sandboxID,
Labels: sandbox.Config.Labels,
} }
if _, err := nric.InvokeWithSandbox(ctx, task, v1.Create, nriSB); err != nil { if _, err := nric.InvokeWithSandbox(ctx, task, v1.Create, nriSB); err != nil {
return nil, errors.Wrap(err, "nri invoke") return nil, errors.Wrap(err, "nri invoke")