adds cni config data to the cri status/info

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown 2019-06-05 16:39:45 -05:00
parent 0ab79ff849
commit b87c0d74a5
2 changed files with 7 additions and 1 deletions

View File

@ -72,6 +72,12 @@ func (c *criService) Status(ctx context.Context, r *runtime.StatusRequest) (*run
return nil, err return nil, err
} }
resp.Info["golang"] = string(versionByt) resp.Info["golang"] = string(versionByt)
cniConfig, err := json.Marshal(c.netPlugin.GetConfig())
if err != nil {
logrus.WithError(err).Errorf("Failed to marshal CNI config %v", err)
}
resp.Info["cniconfig"] = string(cniConfig)
} }
return resp, nil return resp, nil
} }

View File

@ -57,7 +57,7 @@ type Metadata struct {
IP string IP string
// RuntimeHandler is the runtime handler name of the pod. // RuntimeHandler is the runtime handler name of the pod.
RuntimeHandler string RuntimeHandler string
// CNI result // CNIresult resulting configuration for attached network namespace interfaces
CNIResult *cni.CNIResult CNIResult *cni.CNIResult
} }