Skip to content

Commit

Permalink
added scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Sep 14, 2023
1 parent c2a024b commit 0e68ca2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion agent/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
13 changes: 6 additions & 7 deletions agent/kubviz/k8smetrics_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0e68ca2

Please sign in to comment.