Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
an1l4 committed Feb 15, 2024
1 parent b5a8dff commit 562c7ec
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions agent/kubviz/k8smetrics_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import (

"github.com/intelops/kubviz/agent/config"
"github.com/intelops/kubviz/agent/kubviz/plugins/events"
//"github.com/intelops/kubviz/agent/kubviz/plugins/ketall"
//"github.com/intelops/kubviz/agent/kubviz/plugins/kubepreupgrade"
"github.com/intelops/kubviz/agent/kubviz/plugins/ketall"
"github.com/intelops/kubviz/agent/kubviz/plugins/kubepreupgrade"

"github.com/intelops/kubviz/agent/kubviz/plugins/kuberhealthy"
//"github.com/intelops/kubviz/agent/kubviz/plugins/kubescore"
"github.com/intelops/kubviz/agent/kubviz/plugins/kubescore"
"github.com/intelops/kubviz/agent/kubviz/plugins/outdated"
//"github.com/intelops/kubviz/agent/kubviz/plugins/rakkess"
//"github.com/intelops/kubviz/agent/kubviz/plugins/trivy"
"github.com/intelops/kubviz/agent/kubviz/plugins/rakkess"
"github.com/intelops/kubviz/agent/kubviz/plugins/trivy"
"github.com/intelops/kubviz/agent/kubviz/scheduler"

_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
Expand Down Expand Up @@ -63,7 +63,7 @@ var (
func main() {
log.SetFlags(log.LstdFlags | log.Lshortfile)
env := Production
//clusterMetricsChan := make(chan error, 1)
clusterMetricsChan := make(chan error, 1)
cfg, err := config.GetAgentConfigurations()
if err != nil {
log.Fatal("Failed to retrieve agent configurations", err)
Expand Down Expand Up @@ -127,28 +127,28 @@ func main() {
}
}()

//go events.PublishMetrics(clientset, js, clusterMetricsChan)
go events.PublishMetrics(clientset, js, clusterMetricsChan)
if cfg.KuberHealthyEnable {
go kuberhealthy.StartKuberHealthy(js)
}
go server.StartServer()
collectAndPublishMetrics := func() {
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)
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)
}

collectAndPublishMetrics()
Expand Down

0 comments on commit 562c7ec

Please sign in to comment.