diff --git a/api/v1/checks.go b/api/v1/checks.go index 2b53c8288..573708d46 100644 --- a/api/v1/checks.go +++ b/api/v1/checks.go @@ -972,6 +972,16 @@ type KubernetesResourceCheck struct { WaitFor KubernetesResourceCheckWaitFor `json:"waitFor,omitempty"` } +func (c KubernetesResourceCheck) GetDisplayTemplate() Template { + if !c.Templatable.Display.IsEmpty() { + return c.Templatable.Display + } + + return Template{ + Expression: "display.keys().map(k, k + ': ' + display[k]).join('\n')", + } +} + func (c KubernetesResourceCheck) TotalResources() int { return len(c.Resources) + len(c.StaticResources) } diff --git a/build/full/Dockerfile b/build/full/Dockerfile index 98e5480bf..83073a1f8 100644 --- a/build/full/Dockerfile +++ b/build/full/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-bookworm@sha256:6d71b7c3f884e7b9552bffa852d938315ecca843dcc75a86ee7000567da0923d AS builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-bookworm@sha256:f020456572fc292e9627b3fb435c6de5dfb8020fbcef1fd7b65dd092c0ac56bb AS builder WORKDIR /app ARG TARGETOS diff --git a/build/minimal/Dockerfile b/build/minimal/Dockerfile index 10b8c2d4d..6cd33bc6d 100644 --- a/build/minimal/Dockerfile +++ b/build/minimal/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-bookworm@sha256:6d71b7c3f884e7b9552bffa852d938315ecca843dcc75a86ee7000567da0923d AS builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-bookworm@sha256:f020456572fc292e9627b3fb435c6de5dfb8020fbcef1fd7b65dd092c0ac56bb AS builder WORKDIR /app ARG TARGETOS diff --git a/canary-checker.properties b/canary-checker.properties index 18c689bcc..63991988a 100644 --- a/canary-checker.properties +++ b/canary-checker.properties @@ -5,3 +5,4 @@ # check.disabled.tcp=false # topology.runNow=true +log.level.db=warn \ No newline at end of file diff --git a/checks/aws_config.go b/checks/aws_config.go index f3aed003c..f75359cdf 100644 --- a/checks/aws_config.go +++ b/checks/aws_config.go @@ -4,9 +4,7 @@ package checks import ( "github.com/aws/aws-sdk-go-v2/service/configservice" - awsUtil "github.com/flanksource/artifacts/clients/aws" "github.com/flanksource/canary-checker/api/context" - "github.com/flanksource/canary-checker/api/external" v1 "github.com/flanksource/canary-checker/api/v1" "github.com/flanksource/canary-checker/pkg" "github.com/flanksource/duty/connection" @@ -30,8 +28,7 @@ func (c *AwsConfigChecker) Type() string { return "awsconfig" } -func (c *AwsConfigChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results { - check := extConfig.(v1.AwsConfigCheck) +func (c *AwsConfigChecker) Check(ctx *context.Context, check v1.AwsConfigCheck) pkg.Results { result := pkg.Success(check, ctx.Canary) var results pkg.Results results = append(results, result) @@ -44,12 +41,17 @@ func (c *AwsConfigChecker) Check(ctx *context.Context, extConfig external.Check) } } - cfg, err := awsUtil.NewSession(ctx.Context, *check.AWSConnection) + cfg, err := check.AWSConnection.Client(ctx.Context) if err != nil { return results.ErrorMessage(err) } - client := configservice.NewFromConfig(*cfg) + client := configservice.NewFromConfig(cfg, func(o *configservice.Options) { + if check.AWSConnection.Endpoint != "" { + o.BaseEndpoint = &check.AWSConnection.Endpoint + } + }) + if check.AggregatorName != nil { output, err := client.SelectAggregateResourceConfig(ctx, &configservice.SelectAggregateResourceConfigInput{ ConfigurationAggregatorName: check.AggregatorName, diff --git a/checks/aws_config_rule.go b/checks/aws_config_rule.go index ee6489f35..ba8ca71e3 100644 --- a/checks/aws_config_rule.go +++ b/checks/aws_config_rule.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go-v2/service/configservice" "github.com/aws/aws-sdk-go-v2/service/configservice/types" - awsUtil "github.com/flanksource/artifacts/clients/aws" "github.com/flanksource/canary-checker/api/context" "github.com/flanksource/canary-checker/api/external" v1 "github.com/flanksource/canary-checker/api/v1" @@ -45,15 +44,16 @@ func (c *AwsConfigRuleChecker) Check(ctx *context.Context, extConfig external.Ch return results.Failf("failed to populate aws connection: %v", err) } - cfg, err := awsUtil.NewSession(ctx.Context, *check.AWSConnection) + cfg, err := check.AWSConnection.Client(ctx.Context) if err != nil { return results.Failf("failed to create a session: %v", err) } - client := configservice.NewFromConfig(*cfg) - if err != nil { - return results.Failf("failed to describe compliance rules: %v", err) - } + client := configservice.NewFromConfig(cfg, func(o *configservice.Options) { + if check.AWSConnection.Endpoint != "" { + o.BaseEndpoint = &check.AWSConnection.Endpoint + } + }) var complianceTypes = []types.ComplianceType{} for _, i := range check.ComplianceTypes { diff --git a/checks/cloudwatch.go b/checks/cloudwatch.go index e3c71d211..ab5131138 100644 --- a/checks/cloudwatch.go +++ b/checks/cloudwatch.go @@ -7,9 +7,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/cloudwatch" "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types" - awsUtil "github.com/flanksource/artifacts/clients/aws" "github.com/flanksource/canary-checker/api/context" - "github.com/flanksource/canary-checker/api/external" v1 "github.com/flanksource/canary-checker/api/v1" "github.com/flanksource/canary-checker/pkg" ) @@ -32,8 +30,7 @@ func (c *CloudWatchChecker) Type() string { return "cloudwatch" } -func (c *CloudWatchChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results { - check := extConfig.(v1.CloudWatchCheck) +func (c *CloudWatchChecker) Check(ctx *context.Context, check v1.CloudWatchCheck) pkg.Results { result := pkg.Success(check, ctx.Canary) var results pkg.Results results = append(results, result) @@ -42,11 +39,17 @@ func (c *CloudWatchChecker) Check(ctx *context.Context, extConfig external.Check return results.Failf("failed to populate aws connection: %v", err) } - cfg, err := awsUtil.NewSession(ctx.Context, check.AWSConnection) + cfg, err := check.AWSConnection.Client(ctx.Context) if err != nil { return results.ErrorMessage(err) } - client := cloudwatch.NewFromConfig(*cfg) + + client := cloudwatch.NewFromConfig(cfg, func(o *cloudwatch.Options) { + if check.AWSConnection.Endpoint != "" { + o.BaseEndpoint = &check.AWSConnection.Endpoint + } + }) + maxRecords := int32(100) alarms, err := client.DescribeAlarms(ctx, &cloudwatch.DescribeAlarmsInput{ AlarmNames: check.CloudWatchFilter.Alarms, diff --git a/checks/folder.go b/checks/folder.go index e0e918c45..324c95e05 100644 --- a/checks/folder.go +++ b/checks/folder.go @@ -6,9 +6,10 @@ import ( "os" "strings" + "github.com/flanksource/artifacts" + artifactFS "github.com/flanksource/artifacts/fs" "github.com/prometheus/client_golang/prometheus" - "github.com/flanksource/artifacts" "github.com/flanksource/canary-checker/api/context" "github.com/flanksource/canary-checker/api/external" v1 "github.com/flanksource/canary-checker/api/v1" @@ -111,18 +112,18 @@ func checkLocalFolder(ctx *context.Context, check v1.FolderCheck) pkg.Results { return results } -func genericFolderCheck(dirFS artifacts.Filesystem, path string, recursive bool, filter v1.FolderFilter) (FolderCheck, error) { +func genericFolderCheck(dirFS artifactFS.Filesystem, path string, recursive bool, filter v1.FolderFilter) (FolderCheck, error) { return _genericFolderCheck(true, dirFS, path, recursive, filter) } // genericFolderCheckWithoutPrecheck is used for those filesystems that do not support fetching the stat of a directory. // Eg: s3, gcs. // It will not pre check whether the given path is a directory. -func genericFolderCheckWithoutPrecheck(dirFS artifacts.Filesystem, path string, recursive bool, filter v1.FolderFilter) (FolderCheck, error) { +func genericFolderCheckWithoutPrecheck(dirFS artifactFS.Filesystem, path string, recursive bool, filter v1.FolderFilter) (FolderCheck, error) { return _genericFolderCheck(false, dirFS, path, recursive, filter) } -func _genericFolderCheck(supportsDirStat bool, dirFS artifacts.Filesystem, path string, recursive bool, filter v1.FolderFilter) (FolderCheck, error) { +func _genericFolderCheck(supportsDirStat bool, dirFS artifactFS.Filesystem, path string, recursive bool, filter v1.FolderFilter) (FolderCheck, error) { result := FolderCheck{} _filter, err := filter.New() if err != nil { @@ -170,7 +171,7 @@ func _genericFolderCheck(supportsDirStat bool, dirFS artifacts.Filesystem, path // getFolderContents walks the folder and returns all files. // Also supports recursively fetching contents -func getFolderContents(dirFs artifacts.Filesystem, path string, filter *v1.FolderFilterContext) ([]fs.FileInfo, error) { +func getFolderContents(dirFs artifactFS.Filesystem, path string, filter *v1.FolderFilterContext) ([]fs.FileInfo, error) { files, err := dirFs.ReadDir(path) if err != nil { return nil, err diff --git a/checks/folder_s3.go b/checks/folder_s3.go index 562103747..9cc540bc4 100644 --- a/checks/folder_s3.go +++ b/checks/folder_s3.go @@ -8,10 +8,10 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/flanksource/artifacts" + artifactFS "github.com/flanksource/artifacts/fs" "github.com/flanksource/canary-checker/api/context" v1 "github.com/flanksource/canary-checker/api/v1" "github.com/flanksource/canary-checker/pkg" - "github.com/flanksource/duty/models" ) type S3 struct { @@ -31,26 +31,22 @@ func CheckS3Bucket(ctx *context.Context, check v1.FolderCheck) pkg.Results { var bucket string bucket, check.Path = parseS3Path(check.Path) - connection, err := ctx.HydrateConnectionByURL(check.AWSConnection.ConnectionName) - if err != nil { - return results.Failf("failed to populate AWS connection: %v", err) - } else if connection == nil { - connection = &models.Connection{Type: models.ConnectionTypeS3} - if check.S3Connection.Bucket == "" { - check.S3Connection.Bucket = bucket - } - - connection, err = connection.Merge(ctx, check.S3Connection) - if err != nil { - return results.Failf("failed to populate AWS connection: %v", err) - } + if err := check.S3Connection.Populate(ctx); err != nil { + return results.ErrorMessage(err) } - fs, err := artifacts.GetFSForConnection(ctx.Context, *connection) + conn := check.S3Connection.ToModel() + conn.SetProperty("bucket", bucket) + + fs, err := artifacts.GetFSForConnection(ctx.Context, conn) if err != nil { return results.ErrorMessage(err) } + if limitFS, ok := fs.(artifactFS.ListItemLimiter); ok { + limitFS.SetMaxListItems(ctx.Properties().Int("s3.list.max-objects", 50_000)) + } + folders, err := genericFolderCheckWithoutPrecheck(fs, check.Path, check.Recursive, check.Filter) if err != nil { return results.ErrorMessage(err) diff --git a/checks/folder_sftp.go b/checks/folder_sftp.go index eb315baf0..ffb8f05e7 100644 --- a/checks/folder_sftp.go +++ b/checks/folder_sftp.go @@ -1,11 +1,7 @@ package checks import ( - "fmt" - "github.com/flanksource/artifacts" - "github.com/flanksource/artifacts/clients/sftp" - "github.com/flanksource/canary-checker/api/context" v1 "github.com/flanksource/canary-checker/api/v1" "github.com/flanksource/canary-checker/pkg" @@ -16,27 +12,16 @@ func CheckSFTP(ctx *context.Context, check v1.FolderCheck) pkg.Results { var results pkg.Results results = append(results, result) - foundConn, err := check.SFTPConnection.HydrateConnection(ctx) - if err != nil { + if err := check.SFTPConnection.HydrateConnection(ctx); err != nil { return results.Failf("failed to populate SFTP connection: %v", err) } - auth := check.SFTPConnection.Authentication - if !foundConn { - auth, err = ctx.GetAuthValues(check.SFTPConnection.Authentication) - if err != nil { - return results.ErrorMessage(err) - } - } - - client, err := sftp.SSHConnect(fmt.Sprintf("%s:%d", check.SFTPConnection.Host, check.SFTPConnection.GetPort()), auth.GetUsername(), auth.GetPassword()) + fs, err := artifacts.GetFSForConnection(ctx.Context, check.SFTPConnection.ToModel()) if err != nil { return results.ErrorMessage(err) } - defer client.Close() - session := artifacts.Filesystem(client) - folders, err := genericFolderCheck(session, check.Path, check.Recursive, check.Filter) + folders, err := genericFolderCheck(fs, check.Path, check.Recursive, check.Filter) if err != nil { return results.ErrorMessage(err) } diff --git a/checks/folder_smb.go b/checks/folder_smb.go index ded278ec3..5941b3d50 100644 --- a/checks/folder_smb.go +++ b/checks/folder_smb.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/flanksource/artifacts/clients/smb" + "github.com/flanksource/artifacts" "github.com/flanksource/canary-checker/api/context" v1 "github.com/flanksource/canary-checker/api/v1" "github.com/flanksource/canary-checker/pkg" @@ -15,34 +15,30 @@ func CheckSmb(ctx *context.Context, check v1.FolderCheck) pkg.Results { var results pkg.Results results = append(results, result) - var serverPath = strings.TrimPrefix(check.Path, "smb://") - server, sharename, path, err := extractServerDetails(serverPath) + serverPath := strings.TrimPrefix(check.Path, "smb://") + server, share, path, err := extractServerDetails(serverPath) if err != nil { return results.ErrorMessage(err) } - foundConn, err := check.SMBConnection.HydrateConnection(ctx) - if err != nil { + if err := check.SMBConnection.Populate(ctx); err != nil { return results.Failf("failed to populate SMB connection: %v", err) } - auth := check.SMBConnection.Authentication - if !foundConn { - auth, err = ctx.GetAuthValues(check.SMBConnection.Authentication) - if err != nil { - return results.ErrorMessage(err) - } + if server != "" { + check.SMBConnection.Domain = server + } + + if share != "" { + check.SMBConnection.Share = share } - session, err := smb.SMBConnect(server, fmt.Sprintf("%d", check.SMBConnection.GetPort()), sharename, auth) + fs, err := artifacts.GetFSForConnection(ctx.Context, check.SMBConnection.ToModel()) if err != nil { return results.ErrorMessage(err) } - if session != nil { - defer session.Close() - } - folders, err := genericFolderCheck(session, path, check.Recursive, check.Filter) + folders, err := genericFolderCheck(fs, path, check.Recursive, check.Filter) if err != nil { return results.ErrorMessage(err) } diff --git a/checks/http.go b/checks/http.go index e17d34b42..0bc3bcd30 100644 --- a/checks/http.go +++ b/checks/http.go @@ -14,7 +14,6 @@ import ( "github.com/flanksource/commons/http/middlewares" "github.com/flanksource/commons/logger" "github.com/flanksource/duty/models" - "github.com/flanksource/gomplate/v3" "github.com/flanksource/canary-checker/api/external" "github.com/prometheus/client_golang/prometheus" @@ -231,7 +230,7 @@ func (c *HTTPChecker) Check(ctx *context.Context, extConfig external.Check) pkg. body := check.Body if check.TemplateBody { - body, err = ctx.RunTemplate(gomplate.Template{Template: body}, ctx.Environment) + body, err = template(ctx, v1.Template{Template: body}) if err != nil { return results.WithError(oops.Wrap(err)).Invalidf("failed to template request body: %v", err) } @@ -252,7 +251,7 @@ func (c *HTTPChecker) Check(ctx *context.Context, extConfig external.Check) pkg. start := time.Now() - ctx.Infof("%s %s", console.Greenf(check.GetMethod()), check.URL) + ctx.Tracef("%s %s", console.Greenf(check.GetMethod()), check.URL) response, err := request.Do(check.GetMethod(), check.URL) if err != nil { diff --git a/checks/kubernetes_resource.go b/checks/kubernetes_resource.go index 6a930a1df..542d71f62 100644 --- a/checks/kubernetes_resource.go +++ b/checks/kubernetes_resource.go @@ -109,6 +109,8 @@ func (c *KubernetesResourceChecker) Check(ctx context.Context, check v1.Kubernet } ctx.Logger.V(4).Infof("found %d checks to run", len(check.Checks)) + + displayPerCheck := map[string]string{} for _, c := range check.Checks { virtualCanary := v1.Canary{ ObjectMeta: ctx.Canary.ObjectMeta, @@ -167,6 +169,9 @@ func (c *KubernetesResourceChecker) Check(ctx context.Context, check v1.Kubernet } } + for _, r := range res { + displayPerCheck[r.Check.GetName()] = r.Message + } return nil }) if retryErr != nil { @@ -174,6 +179,9 @@ func (c *KubernetesResourceChecker) Check(ctx context.Context, check v1.Kubernet } } + result.AddData(map[string]any{ + "display": displayPerCheck, + }) return results } diff --git a/checks/s3.go b/checks/s3.go index 66a94aa8c..42cbb93b3 100644 --- a/checks/s3.go +++ b/checks/s3.go @@ -4,21 +4,13 @@ package checks import ( "bytes" - "crypto/tls" "io" - "net/http" "strings" "github.com/flanksource/canary-checker/api/context" "github.com/flanksource/commons/utils" - "github.com/flanksource/duty/connection" - "github.com/henvic/httpretty" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/service/s3" - "github.com/flanksource/canary-checker/api/external" "github.com/prometheus/client_golang/prometheus" v1 "github.com/flanksource/canary-checker/api/v1" @@ -65,8 +57,7 @@ func (c *S3Checker) Type() string { return "s3" } -func (c *S3Checker) Check(ctx *context.Context, extConfig external.Check) pkg.Results { - check := extConfig.(v1.S3Check) +func (c *S3Checker) Check(ctx *context.Context, check v1.S3Check) pkg.Results { result := pkg.Success(check, ctx.Canary) var results pkg.Results results = append(results, result) @@ -75,13 +66,17 @@ func (c *S3Checker) Check(ctx *context.Context, extConfig external.Check) pkg.Re return results.Failf("failed to populate aws connection: %v", err) } - cfg, err := GetAWSConfig(ctx, check.AWSConnection) + cfg, err := check.AWSConnection.Client(ctx.Context) if err != nil { - return results.Failf("Failed to get AWS config: %v", err) + return results.Failf("Failed to get aws client: %v", err) } client := s3.NewFromConfig(cfg, func(o *s3.Options) { o.UsePathStyle = check.S3Connection.UsePathStyle + + if check.AWSConnection.Endpoint != "" { + o.BaseEndpoint = &check.AWSConnection.Endpoint + } }) listTimer := NewTimer() @@ -122,52 +117,3 @@ func (c *S3Checker) Check(ctx *context.Context, extConfig external.Check) pkg.Re return results } - -// nolint:staticcheck -// FIXME: deprecated global endpoint resolver -func GetAWSConfig(ctx *context.Context, conn connection.AWSConnection) (cfg aws.Config, err error) { - var options []func(*config.LoadOptions) error - - if conn.Region != "" { - options = append(options, config.WithRegion(conn.Region)) - } - - if conn.Endpoint != "" { - options = append(options, config.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc( - func(service, region string, options ...any) (aws.Endpoint, error) { - return aws.Endpoint{ - URL: conn.Endpoint, - }, nil - }, - ))) - } - - if !conn.AccessKey.IsEmpty() { - options = append(options, config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(conn.AccessKey.ValueStatic, conn.SecretKey.ValueStatic, ""))) - } - - if conn.SkipTLSVerify { - var tr http.RoundTripper - if ctx.IsTrace() { - httplogger := &httpretty.Logger{ - Time: true, - TLS: false, - RequestHeader: false, - RequestBody: false, - ResponseHeader: true, - ResponseBody: false, - Colors: true, - Formatters: []httpretty.Formatter{&httpretty.JSONFormatter{}}, - } - tr = httplogger.RoundTripper(tr) - } else { - tr = &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, - } - } - - options = append(options, config.WithHTTPClient(&http.Client{Transport: tr})) - } - - return config.LoadDefaultConfig(ctx, options...) -} diff --git a/checks/sql.go b/checks/sql.go index edce2dac4..38bb785f5 100644 --- a/checks/sql.go +++ b/checks/sql.go @@ -205,7 +205,7 @@ func getRowValues(columnTypes []*sql.ColumnType) []interface{} { case "UUID": var v uuid.UUID rowValues[i] = &v - case "TEXT", "VARCHAR", "CHAR", "NAME": + case "TEXT", "VARCHAR", "CHAR", "NAME", "NVARCHAR", "NTEXT": var v sql.NullString rowValues[i] = &v default: diff --git a/cmd/root.go b/cmd/root.go index 9bed88d7f..5366c37b7 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -24,7 +24,7 @@ import ( ) func InitContext() (context.Context, error) { - ctx, closer, err := duty.Start("canary-checker", duty.SkipChangelogMigration) + ctx, closer, err := duty.Start("canary-checker", duty.SkipChangelogMigration, duty.SkipMigrationByDefaultMode) if err != nil { logger.Fatalf("Failed to initialize db: %v", err.Error()) } @@ -105,6 +105,8 @@ func ServerFlags(flags *pflag.FlagSet) { _ = flags.MarkDeprecated("canary-retention-period", "") _ = flags.MarkDeprecated("check-status-retention-period", "") + _ = flags.MarkDeprecated("cache-timeout", "") + flags.StringVar(&publicEndpoint, "public-endpoint", publicEndpoint, "Host on which the health dashboard is exposed. Could be used for generting-links, redirects etc.") flags.StringVar(&runner.RunnerName, "name", "local", "Server name shown in aggregate dashboard") diff --git a/cmd/run.go b/cmd/run.go index 32c0fa9ab..32559022a 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -33,7 +33,7 @@ var Run = &cobra.Command{ log.Fatalln("Must specify at least one canary") } - ctx, closer, err := duty.Start("canary-checker", duty.ClientOnly) + ctx, closer, err := duty.Start("canary-checker", duty.ClientOnly, duty.SkipMigrationByDefaultMode) if err != nil { logger.Fatalf("Failed to initialize db: %v", err.Error()) } @@ -91,15 +91,11 @@ var Run = &cobra.Command{ } else { passed++ } - logPass := result.Canary.IsDebug() || result.Canary.IsTrace() || logPass - logFail := result.Canary.IsDebug() || result.Canary.IsTrace() || logFail - - if logPass && result.Pass || logFail && !result.Pass { - if result.Pass || result.ErrorObject == nil { - logger.GetLogger(result.LoggerName()).Infof("%s", result.String()) - } else { - logger.GetLogger(result.LoggerName()).Infof("%s %+v", result.String(), result.ErrorObject) - } + + if result.Pass || result.ErrorObject == nil { + logger.GetLogger(result.LoggerName()).Infof("%s", result.String()) + } else { + logger.GetLogger(result.LoggerName()).Infof("%s %+v", result.String(), result.ErrorObject) } results = append(results, result) } @@ -171,7 +167,7 @@ func def(a ...string) string { func init() { Run.PersistentFlags().StringVarP(&dataFile, "data", "d", "", "Template out each spec using the JSON or YAML data in this file") Run.PersistentFlags().StringVarP(&outputFile, "output-file", "o", "", "file to output the results in") - duty.BindPFlags(Run.Flags(), duty.ClientOnly) + duty.BindPFlags(Run.Flags(), duty.ClientOnly, duty.SkipMigrationByDefaultMode) Run.Flags().StringVarP(&runNamespace, "namespace", "n", "", "Namespace to run canary checks in") Run.Flags().BoolVar(&junit, "junit", false, "output results in junit format") Run.Flags().BoolVarP(&jsonExport, "json", "j", false, "output results in json format") diff --git a/cmd/topology.go b/cmd/topology.go index 8ca085dbb..db22e3e0c 100644 --- a/cmd/topology.go +++ b/cmd/topology.go @@ -74,7 +74,7 @@ var RunTopology = &cobra.Command{ defer runner.Shutdown() var err error - apicontext.DefaultContext, _, err = duty.Start("canary-checker", duty.ClientOnly) + apicontext.DefaultContext, _, err = duty.Start("canary-checker", duty.ClientOnly, duty.SkipMigrationByDefaultMode) if err != nil { logger.Errorf(err.Error()) return @@ -134,7 +134,7 @@ var RunTopology = &cobra.Command{ } func init() { - duty.BindPFlags(Topology.PersistentFlags()) + duty.BindPFlags(Topology.PersistentFlags(), duty.SkipMigrationByDefaultMode) QueryTopology.Flags().StringVar(&queryParams.ID, "component", "", "The component id to query") QueryTopology.Flags().IntVar(&queryParams.Depth, "depth", 10, "The depth of the components to return") RunTopology.Flags().StringVarP(&topologyOutput, "output", "o", "", "Output file to write results to") diff --git a/config/deploy/crd.yaml b/config/deploy/crd.yaml index df7e83084..1b194efc6 100644 --- a/config/deploy/crd.yaml +++ b/config/deploy/crd.yaml @@ -5692,8 +5692,6 @@ spec: type: string type: object type: object - required: - - host type: object smbConnection: properties: @@ -5701,7 +5699,6 @@ spec: description: ConnectionName of the connection. It'll be used to populate the connection fields. type: string domain: - description: Domain... type: string password: properties: @@ -5747,6 +5744,8 @@ spec: port: description: Port on which smb server is running. Defaults to 445 type: integer + share: + type: string username: properties: name: diff --git a/config/deploy/manifests.yaml b/config/deploy/manifests.yaml index 6d2bf8e71..3f72d42bc 100644 --- a/config/deploy/manifests.yaml +++ b/config/deploy/manifests.yaml @@ -5691,8 +5691,6 @@ spec: type: string type: object type: object - required: - - host type: object smbConnection: properties: @@ -5700,7 +5698,6 @@ spec: description: ConnectionName of the connection. It'll be used to populate the connection fields. type: string domain: - description: Domain... type: string password: properties: @@ -5746,6 +5743,8 @@ spec: port: description: Port on which smb server is running. Defaults to 445 type: integer + share: + type: string username: properties: name: diff --git a/config/schemas/canary.schema.json b/config/schemas/canary.schema.json index 1d40b3155..8ba8c4360 100644 --- a/config/schemas/canary.schema.json +++ b/config/schemas/canary.schema.json @@ -3770,27 +3770,27 @@ } }, "additionalProperties": false, - "type": "object", - "required": [ - "host" - ] + "type": "object" }, "SMBConnection": { "properties": { - "connection": { - "type": "string" - }, - "port": { - "type": "integer" - }, "username": { "$ref": "#/$defs/EnvVar" }, "password": { "$ref": "#/$defs/EnvVar" }, + "connection": { + "type": "string" + }, + "port": { + "type": "integer" + }, "domain": { "type": "string" + }, + "share": { + "type": "string" } }, "additionalProperties": false, diff --git a/config/schemas/component.schema.json b/config/schemas/component.schema.json index f1a8c6faa..dbb7cddae 100644 --- a/config/schemas/component.schema.json +++ b/config/schemas/component.schema.json @@ -4199,27 +4199,27 @@ } }, "additionalProperties": false, - "type": "object", - "required": [ - "host" - ] + "type": "object" }, "SMBConnection": { "properties": { - "connection": { - "type": "string" - }, - "port": { - "type": "integer" - }, "username": { "$ref": "#/$defs/EnvVar" }, "password": { "$ref": "#/$defs/EnvVar" }, + "connection": { + "type": "string" + }, + "port": { + "type": "integer" + }, "domain": { "type": "string" + }, + "share": { + "type": "string" } }, "additionalProperties": false, diff --git a/config/schemas/health_folder.schema.json b/config/schemas/health_folder.schema.json index a71d77836..3b5e00a9c 100644 --- a/config/schemas/health_folder.schema.json +++ b/config/schemas/health_folder.schema.json @@ -371,27 +371,27 @@ } }, "additionalProperties": false, - "type": "object", - "required": [ - "host" - ] + "type": "object" }, "SMBConnection": { "properties": { - "connection": { - "type": "string" - }, - "port": { - "type": "integer" - }, "username": { "$ref": "#/$defs/EnvVar" }, "password": { "$ref": "#/$defs/EnvVar" }, + "connection": { + "type": "string" + }, + "port": { + "type": "integer" + }, "domain": { "type": "string" + }, + "share": { + "type": "string" } }, "additionalProperties": false, diff --git a/config/schemas/topology.schema.json b/config/schemas/topology.schema.json index 56c5f4925..fb8dcbc58 100644 --- a/config/schemas/topology.schema.json +++ b/config/schemas/topology.schema.json @@ -4205,27 +4205,27 @@ } }, "additionalProperties": false, - "type": "object", - "required": [ - "host" - ] + "type": "object" }, "SMBConnection": { "properties": { - "connection": { - "type": "string" - }, - "port": { - "type": "integer" - }, "username": { "$ref": "#/$defs/EnvVar" }, "password": { "$ref": "#/$defs/EnvVar" }, + "connection": { + "type": "string" + }, + "port": { + "type": "integer" + }, "domain": { "type": "string" + }, + "share": { + "type": "string" } }, "additionalProperties": false, diff --git a/fixtures/datasources/s3_bucket_pass.yaml b/fixtures/datasources/s3_bucket_pass.yaml index ae9f8fd46..669198d41 100644 --- a/fixtures/datasources/s3_bucket_pass.yaml +++ b/fixtures/datasources/s3_bucket_pass.yaml @@ -74,9 +74,8 @@ spec: minSize: 25b - name: recursive folders namespace: default - path: s3://recursive-test/developers - minCount: 3 - recursive: true + path: s3://recursive-test/developers/**/*.txt + minCount: 4 display: expr: results.?files.orValue([]).map(i, i.name).join(", ") awsConnection: diff --git a/fixtures/k8s/kubernetes_resource_pod_exit_code_pass.yaml b/fixtures/k8s/kubernetes_resource_pod_exit_code_pass.yaml index c97a12a83..e2d3d13f5 100644 --- a/fixtures/k8s/kubernetes_resource_pod_exit_code_pass.yaml +++ b/fixtures/k8s/kubernetes_resource_pod_exit_code_pass.yaml @@ -12,6 +12,9 @@ spec: - name: "pod exit code" description: "Create pod & check its exit code" namespace: default + display: + expr: | + "Result of check 'exit-code-check': " + display["exit-code-check"] resources: - apiVersion: v1 kind: Pod diff --git a/go.mod b/go.mod index 1fd8d3733..282c90c50 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,13 @@ module github.com/flanksource/canary-checker -go 1.22.3 +go 1.22.5 + +toolchain go1.23.0 require ( cloud.google.com/go/storage v1.38.0 github.com/allegro/bigcache v1.2.1 github.com/asecurityteam/rolling v2.0.4+incompatible - github.com/aws/aws-sdk-go-v2 v1.30.4 - github.com/aws/aws-sdk-go-v2/config v1.27.29 - github.com/aws/aws-sdk-go-v2/credentials v1.17.29 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.32.2 github.com/aws/aws-sdk-go-v2/service/configservice v1.44.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0 @@ -17,10 +16,10 @@ require ( github.com/eko/gocache/lib/v4 v4.1.6 github.com/eko/gocache/store/bigcache/v4 v4.2.1 github.com/elastic/go-elasticsearch/v8 v8.13.1 - github.com/flanksource/artifacts v1.0.7 - github.com/flanksource/commons v1.28.0 - github.com/flanksource/duty v1.0.602 - github.com/flanksource/gomplate/v3 v3.24.24 + github.com/flanksource/artifacts v1.0.14 + github.com/flanksource/commons v1.29.1 + github.com/flanksource/duty v1.0.611 + github.com/flanksource/gomplate/v3 v3.24.26 github.com/flanksource/is-healthy v1.0.28 github.com/flanksource/kommons v0.31.4 github.com/friendsofgo/errors v0.9.2 @@ -32,7 +31,6 @@ require ( github.com/gobwas/glob v0.2.3 github.com/google/uuid v1.6.0 github.com/hashicorp/go-getter v1.7.5 - github.com/henvic/httpretty v0.1.3 github.com/jackc/pgx/v5 v5.6.0 github.com/joshdk/go-junit v1.0.0 github.com/jszwec/csvutil v1.9.0 @@ -103,8 +101,11 @@ require ( github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.50.8 // indirect + github.com/aws/aws-sdk-go v1.55.1 // indirect + github.com/aws/aws-sdk-go-v2 v1.30.4 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.29 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.29 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 // indirect @@ -121,6 +122,7 @@ require ( github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect + github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -149,6 +151,7 @@ require ( github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/analysis v0.22.2 // indirect github.com/go-openapi/errors v0.21.0 // indirect github.com/go-openapi/inflect v0.19.0 // indirect @@ -190,6 +193,7 @@ require ( github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/hcl/v2 v2.21.0 // indirect + github.com/henvic/httpretty v0.1.3 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/hirochachacha/go-smb2 v1.1.0 // indirect github.com/imdario/mergo v0.3.16 // indirect @@ -217,6 +221,7 @@ require ( github.com/labstack/gommon v0.4.2 // indirect github.com/lmittmann/tint v1.0.5 // indirect github.com/lrita/cmap v0.0.0-20231108122212-cb084a67f554 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -241,12 +246,15 @@ require ( github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/sftp v1.13.6 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rodaine/table v1.3.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/samber/oops v1.13.1 // indirect github.com/sergi/go-diff v1.3.1 // indirect + github.com/shirou/gopsutil/v3 v3.24.5 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect @@ -254,6 +262,8 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/sjson v1.0.4 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect github.com/ulikunitz/xz v0.5.12 // indirect github.com/vadimi/go-http-ntlm v1.0.3 // indirect @@ -275,6 +285,7 @@ require ( github.com/xlab/treeprint v1.2.0 // indirect github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect github.com/yuin/gopher-lua v1.1.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zclconf/go-cty v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect @@ -321,7 +332,10 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) -// replace github.com/flanksource/duty => /Users/moshe/go/src/github.com/flanksource/duty +// replace github.com/flanksource/duty => ../duty + +// replace github.com/flanksource/artifacts => ../artifacts // replace github.com/flanksource/gomplate/v3 => ../gomplate + // replace github.com/flanksource/commons => /Users/moshe/go/src/github.com/flanksource/commons diff --git a/go.sum b/go.sum index 7fe97b093..4525dbb5e 100644 --- a/go.sum +++ b/go.sum @@ -692,8 +692,8 @@ github.com/asecurityteam/rolling v2.0.4+incompatible h1:WOSeokINZT0IDzYGc5BVcjLl github.com/asecurityteam/rolling v2.0.4+incompatible/go.mod h1:2D4ba5ZfYCWrIMleUgTvc8pmLExEuvu3PDwl+vnG58Q= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go v1.50.8 h1:gY0WoOW+/Wz6XmYSgDH9ge3wnAevYDSQWPxxJvqAkP4= -github.com/aws/aws-sdk-go v1.50.8/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.55.1 h1:ZTNPmbRMxaK5RlTJrBullX9r/rF1MPf3yAJOLlwDiT8= +github.com/aws/aws-sdk-go v1.55.1/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.30.4 h1:frhcagrVNrzmT95RJImMHgabt99vkXGslubDaDagTk8= github.com/aws/aws-sdk-go-v2 v1.30.4/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= @@ -708,6 +708,8 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.29/go.mod h1:BPJ/yXV92ZVq6G8uYvbU github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12 h1:yjwoSyDZF8Jth+mUk5lSPJCkMC0lMy6FaCD51jm6ayE= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12/go.mod h1:fuR57fAgMk7ot3WcNQfb6rSEn+SUffl7ri+aa8uKysI= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7/go.mod h1:tDVvl8hyU6E9B8TrnNrZQEVkQlB8hjJwcgpPhgtlnNg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 h1:TNyt/+X43KJ9IJJMjKfa3bNTiZbUP7DeCxfbTROESwY= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16/go.mod h1:2DwJF39FlNAUiX5pAc0UNeiz16lK2t7IaFcm0LFHEgc= @@ -755,6 +757,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= +github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= @@ -855,15 +859,15 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fergusstrange/embedded-postgres v1.25.0 h1:sa+k2Ycrtz40eCRPOzI7Ry7TtkWXXJ+YRsxpKMDhxK0= github.com/fergusstrange/embedded-postgres v1.25.0/go.mod h1:t/MLs0h9ukYM6FSt99R7InCHs1nW0ordoVCcnzmpTYw= -github.com/flanksource/artifacts v1.0.7 h1:tLbY4+7l2H06Td3zSgGSwJy9Vfhto+M7L80cm0aqyyc= -github.com/flanksource/artifacts v1.0.7/go.mod h1:pzO1hirM9RMrkJMsLbZbZyN6elsCwz8SNOk3z+mpv34= -github.com/flanksource/commons v1.28.0 h1:7wyTIU0Q1/wgckecRmIGmCS+zcFeAkId5qNzffR9Sho= -github.com/flanksource/commons v1.28.0/go.mod h1:Q/9SkqJW5QwsVlynOYMVuVQzQtHSBGt1TJkkeX3GRjU= -github.com/flanksource/duty v1.0.602 h1:A/Vw7RDozgcVU6eTnQorKuR3s5vNRAT3/GncmJGGEL8= -github.com/flanksource/duty v1.0.602/go.mod h1:oCqo7xohZHNTnzuo6AsnUnFnzXHN+PaD1HFdo+7nKJk= +github.com/flanksource/artifacts v1.0.14 h1:Vv70bccsae0MwGaf/uSPp34J5V1/PyKfct9z5JYCTJU= +github.com/flanksource/artifacts v1.0.14/go.mod h1:qHVCnQu5k50aWNJ5UhpcAKEl7pAzqUrFFKGSm147G70= +github.com/flanksource/commons v1.29.1 h1:82vkqo0JFFcOwRXkXrKtMPfUlywOb3YQ+mPSSW9gkpo= +github.com/flanksource/commons v1.29.1/go.mod h1:Kcw3+JI04cVw2zYlv/XTMM1dkNkAwqLYqTxVb19Y/JA= +github.com/flanksource/duty v1.0.611 h1:3QXR7gJsbSMP8c4U00e5Ubf/yD0yVQLLf24AzFZxJxQ= +github.com/flanksource/duty v1.0.611/go.mod h1:LIbTR5tVMWuOxvHrHz1G2/u2UEpukrbvUslUoeMnSxA= github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc= -github.com/flanksource/gomplate/v3 v3.24.24 h1:u/30b75VNcoC7X+Q0M9Sk1PtvYUcnLe1nJjNpATHhdY= -github.com/flanksource/gomplate/v3 v3.24.24/go.mod h1:Ezcg/bzLwOHYtycHljeOf46RX2YlvLj+xxVxt/nCo30= +github.com/flanksource/gomplate/v3 v3.24.26 h1:5rtsEKWNNRmHJWliqguRpwgbAemMNloXICJfL0x5X0Y= +github.com/flanksource/gomplate/v3 v3.24.26/go.mod h1:Ezcg/bzLwOHYtycHljeOf46RX2YlvLj+xxVxt/nCo30= github.com/flanksource/is-healthy v0.0.0-20230705092916-3b4cf510c5fc/go.mod h1:4pQhmF+TnVqJroQKY8wSnSp+T18oLson6YQ2M0qPHfQ= github.com/flanksource/is-healthy v1.0.28 h1:mVPtmiWR2I+hJ8ARSOQ7smDoSpIzRQy5HaJePG0spGo= github.com/flanksource/is-healthy v1.0.28/go.mod h1:eRPXZShZqaz3Mz+QeoCNbL3857lt9BgCt67jOUQXLOU= @@ -934,6 +938,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/analysis v0.22.2 h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0= github.com/go-openapi/analysis v0.22.2/go.mod h1:pDF4UbZsQTo/oNuRfAWWd4dAh4yuYf//LYorPTjrpvo= github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= @@ -1274,6 +1280,8 @@ github.com/lmittmann/tint v1.0.5 h1:NQclAutOfYsqs2F1Lenue6OoWCajs5wJcP3DfWVpePw= github.com/lmittmann/tint v1.0.5/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/lrita/cmap v0.0.0-20231108122212-cb084a67f554 h1:a0+bIffIh/HdvvgtPQLRhOef1VDSxZ+8bQiyjQlJzqc= github.com/lrita/cmap v0.0.0-20231108122212-cb084a67f554/go.mod h1:Cn9TaoncDT8Tt/aJ7CIZy+t48MaZWDEwhu1bBXwrzLI= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -1408,6 +1416,8 @@ github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus-community/pro-bing v0.3.0 h1:SFT6gHqXwbItEDJhTkzPWVqU6CLEtqEfNAPp47RUON4= github.com/prometheus-community/pro-bing v0.3.0/go.mod h1:p9dLb9zdmv+eLxWfCT6jESWuDrS+YzpPkQBgysQF8a0= github.com/prometheus/alertmanager v0.27.0 h1:V6nTa2J5V4s8TG4C4HtrBP/WNSebCCTYGGv4qecA/+I= @@ -1482,6 +1492,12 @@ github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas= github.com/sevennt/echo-pprof v0.1.1-0.20220616082843-66a461746b5f h1:mx2Z/21bNtP+jXvuB9qHJbihaIhT3SsqL+qJUqbwoGg= github.com/sevennt/echo-pprof v0.1.1-0.20220616082843-66a461746b5f/go.mod h1:QPpsWWcK1TiLQ8uaSnmKJamNb2HryXeBxZapurHcGn0= +github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= +github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -1533,6 +1549,10 @@ github.com/tidwall/sjson v1.0.4 h1:UcdIRXff12Lpnu3OLtZvnc03g4vH2suXDXhBwBqmzYg= github.com/tidwall/sjson v1.0.4/go.mod h1:bURseu1nuBkFpIES5cz6zBtjmYeOQmEESshn7VpF15Y= github.com/timberio/go-datemath v0.1.0 h1:1OUCvSIX1qXLJ57h12OWfgt6MNpJnsdNvrp8dLIUFtg= github.com/timberio/go-datemath v0.1.0/go.mod h1:m7kjsbCuO4QKP3KLfnxiUZWiOiFXmxj30HeexjL3lc0= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= @@ -1590,6 +1610,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= @@ -1864,6 +1886,7 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1892,6 +1915,7 @@ golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=