mirror of
https://github.com/kyverno/policy-reporter.git
synced 2024-12-14 11:57:32 +00:00
f3b980bfd3
* Implement MetadataClient Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
27 lines
647 B
Go
27 lines
647 B
Go
package cmd
|
|
|
|
import (
|
|
"flag"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/kyverno/policy-reporter/cmd/send"
|
|
)
|
|
|
|
func newSendCMD() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "send",
|
|
Short: "Send different kinds of email reports",
|
|
}
|
|
|
|
// For local usage
|
|
cmd.PersistentFlags().StringP("kubeconfig", "k", "", "absolute path to the kubeconfig file")
|
|
cmd.PersistentFlags().StringP("config", "c", "", "target configuration file")
|
|
cmd.PersistentFlags().StringP("template-dir", "t", "./templates", "template directory for email reports")
|
|
cmd.AddCommand(send.NewSummaryCMD())
|
|
cmd.AddCommand(send.NewViolationsCMD())
|
|
|
|
flag.Parse()
|
|
|
|
return cmd
|
|
}
|