mirror of
https://github.com/kyverno/policy-reporter.git
synced 2024-12-15 17:50:58 +00:00
72abc63ce0
* Support external Databases Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
21 lines
592 B
Go
21 lines
592 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// NewCLI creates a new instance of the root CLI
|
|
func NewCLI(version string) *cobra.Command {
|
|
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.`,
|
|
}
|
|
|
|
rootCmd.AddCommand(newVersionCMD(version))
|
|
rootCmd.AddCommand(newRunCMD(version))
|
|
rootCmd.AddCommand(newSendCMD())
|
|
|
|
return rootCmd
|
|
}
|