1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00
policy-reporter/cmd/root.go

22 lines
592 B
Go
Raw Normal View History

2021-02-19 23:58:01 +00:00
package cmd
import (
"github.com/spf13/cobra"
)
2021-02-24 00:06:58 +00:00
// NewCLI creates a new instance of the root CLI
func NewCLI(version string) *cobra.Command {
2021-02-19 23:58:01 +00:00
rootCmd := &cobra.Command{
Use: "policyreporter",
Short: "Generates PolicyReport Metrics and Send Results to different targets",
Long: `Generates Prometheus Metrics from PolicyReports, ClusterPolicyReports and PolicyReportResults.
Sends notifications to different targets like Grafana's Loki.`,
2021-02-19 23:58:01 +00:00
}
rootCmd.AddCommand(newVersionCMD(version))
rootCmd.AddCommand(newRunCMD(version))
rootCmd.AddCommand(newSendCMD())
2021-02-19 23:58:01 +00:00
return rootCmd
}