diff --git a/agent/config/config.go b/agent/config/config.go index 26161f31..53abb572 100644 --- a/agent/config/config.go +++ b/agent/config/config.go @@ -11,7 +11,7 @@ type AgentConfigurations struct { OutdatedInterval string `envconfig:"OUTDATED_INTERVAL" default:"*/20 * * * *"` GetAllInterval string `envconfig:"GETALL_INTERVAL" default:"*/30 * * * *"` KubeScoreInterval string `envconfig:"KUBESCORE_INTERVAL" default:"*/40 * * * *"` - RakkessInterval string `envconfig:"KUBESCORE_INTERVAL" default:"*/50 * * * *"` + RakkessInterval string `envconfig:"RAKKESS_INTERVAL" default:"*/50 * * * *"` KubePreUpgradeInterval string `envconfig:"KUBEPREUPGRADE_INTERVAL" default:"*/60 * * * *"` TrivyInterval string `envconfig:"TRIVY_INTERVAL" default:"*/10 * * * *"` Scheduler bool `envconfig:"SCHEDULER" default:"true"` diff --git a/agent/kubviz/k8smetrics_agent.go b/agent/kubviz/k8smetrics_agent.go index dc6cd9b9..a27149a5 100644 --- a/agent/kubviz/k8smetrics_agent.go +++ b/agent/kubviz/k8smetrics_agent.go @@ -61,15 +61,16 @@ var ( ) func runTrivyScans(config *rest.Config, js nats.JetStreamContext) error { - err := RunTrivyK8sClusterScan(js) + + err := RunTrivyImageScans(config, js) if err != nil { return err } - err = RunTrivyImageScans(config, js) + err = RunTrivySbomScan(config, js) if err != nil { return err } - err = RunTrivySbomScan(config, js) + err = RunTrivyK8sClusterScan(js) if err != nil { return err } @@ -126,12 +127,10 @@ func main() { err = RakeesOutput(config, js) LogErr(err) // //getK8sEvents(clientset) - // // err = RunTrivyK8sClusterScan(js) - // // LogErr(err) err = runTrivyScans(config, js) LogErr(err) - // err = RunKubeScore(clientset, js) - // LogErr(err) + err = RunKubeScore(clientset, js) + LogErr(err) } collectAndPublishMetrics()