Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Mar 25, 2024
1 parent 4b4f10b commit 74b6de5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
21 changes: 1 addition & 20 deletions agent/kubviz/k8smetrics_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func main() {
err = kubescore.RunKubeScore(clientset, js)
events.LogErr(err)
}
// collectAndPublishMetrics()
collectAndPublishMetrics()
if cfg.SchedulerEnable { // Assuming "cfg.Schedule" is a boolean indicating whether to schedule or not.
scheduler := scheduler.InitScheduler(config, js, *cfg, clientset)

Expand All @@ -180,22 +180,3 @@ func main() {
s.StartBlocking()
}
}

// func collectAndPublishMetrics(config *rest.Config, js nats.JetStreamContext, clientset *kubernetes.Clientset) {
// err := outdated.OutDatedImages(config, js)
// events.LogErr(err)
// err = kubepreupgrade.KubePreUpgradeDetector(config, js)
// events.LogErr(err)
// err = ketall.GetAllResources(config, js)
// events.LogErr(err)
// err = rakkess.RakeesOutput(config, js)
// events.LogErr(err)
// err = trivy.RunTrivySbomScan(config, js)
// events.LogErr(err)
// err = trivy.RunTrivyImageScans(config, js)
// events.LogErr(err)
// err = trivy.RunTrivyK8sClusterScan(js)
// events.LogErr(err)
// err = kubescore.RunKubeScore(clientset, js)
// events.LogErr(err)
// }
21 changes: 0 additions & 21 deletions agent/kubviz/scheduler/scheduler_watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,24 +187,3 @@ func (j *RakkessJob) Run() {
err := rakkess.RakeesOutput(j.config, j.js)
events.LogErr(err)
}

// func NewTrivyJob(config *rest.Config, js nats.JetStreamContext, frequency string) (*TrivyJob, error) {
// return &TrivyJob{
// config: config,
// js: js,
// frequency: frequency,
// }, nil
// }
// func (v *TrivyJob) CronSpec() string {
// return v.frequency
// }

// func (j *TrivyJob) Run() {
// // Call the Trivy function with the provided config and js
// err := trivy.RunTrivySbomScan(j.config, j.js)
// events.LogErr(err)
// err = trivy.RunTrivyImageScans(j.config, j.js)
// events.LogErr(err)
// err = trivy.RunTrivyK8sClusterScan(j.js)
// events.LogErr(err)
// }

0 comments on commit 74b6de5

Please sign in to comment.