Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require (
github.com/rancher/wharfie v0.7.1-0.20251014190711-8cfe84a9efaa
github.com/rancher/wrangler/v3 v3.7.1-rc.2
github.com/sirupsen/logrus v1.9.4
github.com/urfave/cli/v2 v2.27.5
github.com/urfave/cli/v3 v3.11.0
go.uber.org/mock v0.6.0
golang.org/x/sync v0.22.0
k8s.io/api v0.36.3
Expand All @@ -74,7 +74,6 @@ require (
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.7.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/cli v29.2.0+incompatible // indirect
Expand Down Expand Up @@ -119,13 +118,11 @@ require (
github.com/prometheus/common v0.67.5 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/cobra v1.10.2 // indirect
github.com/spf13/pflag v1.0.9 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
go.etcd.io/etcd/api/v3 v3.6.8 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.8 // indirect
go.etcd.io/etcd/client/v3 v3.6.8 // indirect
Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03V
github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=
github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -160,7 +159,6 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
Expand Down Expand Up @@ -188,16 +186,14 @@ github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE=
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk=
github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8=
github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
github.com/urfave/cli/v3 v3.11.0 h1:P/euJp99kb9p0tlVY+iYTLYYTAQlfl0hR2gUO1Img1Q=
github.com/urfave/cli/v3 v3.11.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck=
github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chqDkyE9Z4N61UnQd+KOfgp5Iu53llk=
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

"github.com/mattn/go-colorable"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"

"github.com/rancher/system-agent/pkg/applyinator"
"github.com/rancher/system-agent/pkg/config"
Expand Down Expand Up @@ -43,7 +43,7 @@
}
}

app := &cli.App{

Check failure on line 46 in main.go

View workflow job for this annotation

GitHub Actions / Integration Tests

undefined: cli.App

Check failure on line 46 in main.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: cli.App

Check failure on line 46 in main.go

View workflow job for this annotation

GitHub Actions / Build and Test (linux arm64)

undefined: cli.App
Name: "rancher-system-agent",
Usage: "Rancher System Agent runs a sentinel that reconciles desired plans with the node it is being run on",
Version: version.FriendlyVersion(),
Expand Down Expand Up @@ -73,7 +73,7 @@
}
}

func run(_ *cli.Context) error {

Check failure on line 76 in main.go

View workflow job for this annotation

GitHub Actions / Integration Tests

undefined: cli.Context

Check failure on line 76 in main.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: cli.Context

Check failure on line 76 in main.go

View workflow job for this annotation

GitHub Actions / Build and Test (linux arm64)

undefined: cli.Context
topContext := signals.SetupSignalContext()

logrus.Infof("[system-agent] rancher System Agent version %s is starting", version.FriendlyVersion())
Expand Down Expand Up @@ -129,7 +129,7 @@
return nil
}

func validateConfig(c *cli.Context) error {

Check failure on line 132 in main.go

View workflow job for this annotation

GitHub Actions / Integration Tests

undefined: cli.Context

Check failure on line 132 in main.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: cli.Context

Check failure on line 132 in main.go

View workflow job for this annotation

GitHub Actions / Build and Test (linux arm64)

undefined: cli.Context
logrus.Infof("[system-agent] rancher System Agent version %s - Configuration Validation", version.FriendlyVersion())

// Get config file from positional argument or use default
Expand Down Expand Up @@ -186,7 +186,7 @@
return nil
}

func validateConnection(c *cli.Context) error {

Check failure on line 189 in main.go

View workflow job for this annotation

GitHub Actions / Integration Tests

undefined: cli.Context

Check failure on line 189 in main.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: cli.Context

Check failure on line 189 in main.go

View workflow job for this annotation

GitHub Actions / Build and Test (linux arm64)

undefined: cli.Context
logrus.Infof("[system-agent] rancher System Agent version %s - Connection Info Validation", version.FriendlyVersion())

connectionInfoFile := c.Args().First()
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"strings"
"testing"

"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)

func TestValidateConfig(t *testing.T) {
Expand Down Expand Up @@ -130,7 +130,7 @@
}

// Create a CLI context with the config file as an argument
app := &cli.App{

Check failure on line 133 in main_test.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: cli.App
Commands: []*cli.Command{
{
Name: "validate-config",
Expand Down Expand Up @@ -250,7 +250,7 @@
t.Fatalf("Setup failed: %v", err)
}

app := &cli.App{

Check failure on line 253 in main_test.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: cli.App
Commands: []*cli.Command{
{
Name: "validate-connection",
Expand All @@ -275,7 +275,7 @@
}

t.Run("connection info file not specified", func(t *testing.T) {
app := &cli.App{

Check failure on line 278 in main_test.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: cli.App (typecheck)
Commands: []*cli.Command{
{
Name: "validate-connection",
Expand Down
Loading