Skip to content

Commit

Permalink
Update go-commons remove ipsec func
Browse files Browse the repository at this point in the history
Moving to latest go-commons and using those functions to determine ipsec

Signed-off-by: Joe Talerico <[email protected]>
  • Loading branch information
Joe Talerico committed Jun 5, 2024
1 parent be41e10 commit 189775f
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 142 deletions.
8 changes: 0 additions & 8 deletions cmd/k8s-netperf/k8s-netperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,12 @@ var rootCmd = &cobra.Command{
}
}

var fTime time.Time
var lTime time.Time
if pavail {
for i, npr := range sr.Results {
sr.Results[i].ClientMetrics, _ = metrics.QueryNodeCPU(npr.ClientNodeInfo, pcon, npr.StartTime, npr.EndTime)
sr.Results[i].ServerMetrics, _ = metrics.QueryNodeCPU(npr.ServerNodeInfo, pcon, npr.StartTime, npr.EndTime)
sr.Results[i].ClientPodCPU, _ = metrics.TopPodCPU(npr.ClientNodeInfo, pcon, npr.StartTime, npr.EndTime)
sr.Results[i].ServerPodCPU, _ = metrics.TopPodCPU(npr.ServerNodeInfo, pcon, npr.StartTime, npr.EndTime)
fTime = npr.StartTime
lTime = npr.EndTime
}
}

Expand All @@ -228,10 +224,6 @@ var rootCmd = &cobra.Command{
shortReg, _ := regexp.Compile(`([0-9]\.[0-9]+)-*`)
short := shortReg.FindString(sr.Metadata.OCPVersion)
sr.Metadata.OCPShortVersion = short
sec, err := metrics.IPSecEnabled(pcon, fTime, lTime)
if err == nil {
sr.Metadata.IPsec = sec
}
mtu, err := metrics.NodeMTU(pcon)
if err == nil {
sr.Metadata.MTU = mtu
Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ go 1.18

require (
github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794
github.com/cloud-bulldozer/go-commons v1.0.11
github.com/cloud-bulldozer/go-commons v1.0.16
github.com/google/uuid v1.3.0
github.com/montanaflynn/stats v0.6.6
github.com/olekukonko/tablewriter v0.0.5
github.com/prometheus/common v0.44.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1
golang.org/x/text v0.9.0
golang.org/x/text v0.13.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.27.1
k8s.io/apimachinery v0.27.1
k8s.io/client-go v0.27.1
k8s.io/api v0.28.4
k8s.io/apimachinery v0.28.4
k8s.io/client-go v0.28.4
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
)

require (
Expand All @@ -24,11 +25,11 @@ require (
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
Expand All @@ -44,18 +45,17 @@ require (
github.com/opensearch-project/opensearch-go v1.1.0 // indirect
github.com/prometheus/client_golang v1.15.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
Loading

0 comments on commit 189775f

Please sign in to comment.