1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-15 17:50:58 +00:00
policy-reporter/cmd/root.go
Frank Jogeleit 72abc63ce0
External SQL DB support (#304)
* Support external Databases

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
2023-05-02 11:00:14 +02:00

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
}