Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1158 from mikebrow/cni-debug-update
Browse files Browse the repository at this point in the history
adds cni config data to the cri status/info
  • Loading branch information
Random-Liu authored Jun 7, 2019
2 parents 0a89a04 + b87c0d7 commit 770621f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pkg/server/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ func (c *criService) Status(ctx context.Context, r *runtime.StatusRequest) (*run
return nil, err
}
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
}
2 changes: 1 addition & 1 deletion pkg/store/sandbox/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type Metadata struct {
IP string
// RuntimeHandler is the runtime handler name of the pod.
RuntimeHandler string
// CNI result
// CNIresult resulting configuration for attached network namespace interfaces
CNIResult *cni.CNIResult
}

Expand Down

0 comments on commit 770621f

Please sign in to comment.