Skip to content

Commit

Permalink
feat(client): add node kernel name info to GetNodeInfo payload (#18)
Browse files Browse the repository at this point in the history
Signed-off-by: Niladri Halder <[email protected]>
  • Loading branch information
niladrih authored and Abhinandan-Purkait committed May 8, 2024
1 parent ec872cc commit 22721fc
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Code of Conduct
<BR>

## Umbrella Project
OpenEBS is an "umbrella project". Every project, repository and file in the OpenEBS organization adopts and follows the policies found in the Community repo umbrella project files.
<BR>

This project follows the [OpenEBS Code of Conduct](https://github.com/openebs/community/CODE_OF_CONDUCT.md)
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing Guidelines
<BR>

## Umbrella Project
OpenEBS is an "umbrella project". Every project, repository and file in the OpenEBS organization adopts and follows the policies found in the Community repo umbrella project files.
<BR>

This project follows the [OpenEBS Contributor Guidelines](https://github.com/openebs/community/CONTRIBUTING.md)

8 changes: 8 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Governance
<BR>

## Umbrella Project
OpenEBS is an "umbrella project". Every project, repository and file in the OpenEBS organization adopts and follows the policies found in the Community repo umbrella project files.
<BR>

This project follows the [OpenEBS Governance](https://github.com/openebs/community/GOVERNANCE.md)
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See [OpenEBS Maintainers](https://github.com/openebs/community/MAINTAINERS.md)
6 changes: 4 additions & 2 deletions pkg/client/k8s/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,19 @@ func GetOSAndKernelVersion() (string, error) {
}

// GetNodeInfo gathers details from the first Kubernetes Node and returns -- OS, Kernel version and Arch.
func GetNodeInfo() (nodeOs, nodeKernelVersion, nodeArch string, err error) {
func GetNodeInfo() (nodeOs, nodeKernelName, nodeKernelVersion, nodeArch string, err error) {
nodes := Node()
firstNode, err := nodes.List(metav1.ListOptions{Limit: 1})
if err != nil {
return "unknown",
"unknown",
"unknown",
errors.Wrapf(err, "failed to get the os kernel/arch")
"unknown",
errors.Wrapf(err, "failed to get kubernetes Node os/kernel/arch")
}

nodeOs = firstNode.Items[0].Status.NodeInfo.OSImage
nodeKernelName = firstNode.Items[0].Status.NodeInfo.OperatingSystem
nodeKernelVersion = firstNode.Items[0].Status.NodeInfo.KernelVersion
nodeArch = firstNode.Items[0].Status.NodeInfo.Architecture

Expand Down

0 comments on commit 22721fc

Please sign in to comment.